public class Retransformer extends Transformer
Modifier and Type | Field and Description |
---|---|
private java.util.Set<java.lang.String> |
bootJars |
private java.util.Set<java.lang.String> |
sysJars |
ALLOW_CONFIG_UPDATE, BYTEMAN_PACKAGE_PREFIX, BYTEMAN_SAMPLE_PACKAGE_PREFIX, BYTEMAN_TEST_PACKAGE_PREFIX, COMPILE_TO_BYTECODE, COMPILE_TO_BYTECODE_COMPATIBILITY, DEBUG, DUMP_CFG, DUMP_CFG_PARTIAL, DUMP_GENERATED_CLASSES, DUMP_GENERATED_CLASSES_DIR, DUMP_GENERATED_CLASSES_INTERMEDIATE, helperManager, inst, isRedefine, JAVA_LANG_PACKAGE_PREFIX, loadCache, scriptRepository, SKIP_OVERRIDE_RULES, SYSPROPS_STRICT_MODE, TRANSFORM_ALL, TRANSFORM_ALL_COMPATIBILITY, VERBOSE, VERIFY_TRANSFORMED_BYTES
Constructor and Description |
---|
Retransformer(java.lang.instrument.Instrumentation inst,
java.util.List<java.lang.String> scriptPaths,
java.util.List<java.lang.String> scriptTexts,
boolean isRedefine)
constructor allowing this transformer to be provided with access to the JVM's instrumentation
implementation
|
Modifier and Type | Method and Description |
---|---|
void |
addTransformListener(java.lang.String hostname,
java.lang.Integer port) |
void |
appendJarFile(java.io.PrintWriter out,
java.util.jar.JarFile jarfile,
boolean isBoot) |
protected void |
collectAffectedNames(java.util.List<RuleScript> ruleScripts,
java.util.List<java.lang.String> classList,
java.util.List<java.lang.String> interfaceList,
java.util.List<java.lang.String> superClassList,
java.util.List<java.lang.String> superInterfaceList) |
java.util.Set<java.lang.String> |
getLoadedBootJars()
Returns jars that this retransformer was asked to
add to the boot classloader. |
java.util.Set<java.lang.String> |
getLoadedSystemJars()
Returns jars that this retransformer was asked to
add to the system classloader. |
void |
installScript(java.util.List<java.lang.String> scriptTexts,
java.util.List<java.lang.String> scriptNames,
java.io.PrintWriter out) |
protected void |
listScripts(java.io.PrintWriter out) |
void |
removeScripts(java.util.List<java.lang.String> scriptTexts,
java.io.PrintWriter out) |
allowConfigUpdate, computeDumpGeneratedClasses, computeDumpGeneratedClassesDir, computeDumpGeneratedClassesIntermediate, disableTriggers, dumpScript, enableTriggers, installBootScripts, isBytemanClass, isCompileToBytecode, isDebug, isDumpCFG, isDumpCFGPartial, isSkipClass, isTransformable, isTriggeringEnabled, isVerbose, maybeDumpClass, maybeDumpClassIntermediate, skipOverrideRules, transform, transform, updateConfiguration
private java.util.Set<java.lang.String> sysJars
private java.util.Set<java.lang.String> bootJars
public Retransformer(java.lang.instrument.Instrumentation inst, java.util.List<java.lang.String> scriptPaths, java.util.List<java.lang.String> scriptTexts, boolean isRedefine) throws java.lang.Exception
inst
- the instrumentation object used to interface to the JVMjava.lang.Exception
public void installScript(java.util.List<java.lang.String> scriptTexts, java.util.List<java.lang.String> scriptNames, java.io.PrintWriter out) throws java.lang.Exception
java.lang.Exception
protected void collectAffectedNames(java.util.List<RuleScript> ruleScripts, java.util.List<java.lang.String> classList, java.util.List<java.lang.String> interfaceList, java.util.List<java.lang.String> superClassList, java.util.List<java.lang.String> superInterfaceList)
protected void listScripts(java.io.PrintWriter out) throws java.lang.Exception
java.lang.Exception
public void addTransformListener(java.lang.String hostname, java.lang.Integer port)
public void removeScripts(java.util.List<java.lang.String> scriptTexts, java.io.PrintWriter out) throws java.lang.Exception
java.lang.Exception
public void appendJarFile(java.io.PrintWriter out, java.util.jar.JarFile jarfile, boolean isBoot) throws java.lang.Exception
java.lang.Exception
public java.util.Set<java.lang.String> getLoadedBootJars()
add
to the boot classloader.
Note that the returned set will not include those jars that were added to the
instrumentor object at startup via the -javaagent command line argument.public java.util.Set<java.lang.String> getLoadedSystemJars()
add
to the system classloader.
Note that the returned set will not include those jars that were added to the
instrumentor object at startup via the -javaagent command line argument.