public class Retransformer extends Transformer
ALLOW_CONFIG_UPDATE, BYTEMAN_PACKAGE_PREFIX, BYTEMAN_SAMPLE_PACKAGE_PREFIX, BYTEMAN_TEST_PACKAGE_PREFIX, COMPILE_TO_BYTECODE, COMPILE_TO_BYTECODE_COMPATIBILITY, DEBUG, DISALLOW_DOWNCAST, 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(Instrumentation inst,
List<String> scriptPaths,
List<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(String hostname,
Integer port) |
void |
appendJarFile(PrintWriter out,
JarFile jarfile,
boolean isBoot) |
protected void |
collectAffectedNames(List<RuleScript> ruleScripts,
List<String> classList,
List<String> interfaceList,
List<String> superClassList,
List<String> superInterfaceList) |
Set<String> |
getLoadedBootJars()
Returns jars that this retransformer was asked to
add to the boot classloader. |
Set<String> |
getLoadedSystemJars()
Returns jars that this retransformer was asked to
add to the system classloader. |
void |
installScript(List<String> scriptTexts,
List<String> scriptNames,
PrintWriter out) |
protected void |
listScripts(PrintWriter out) |
void |
removeScripts(List<String> scriptTexts,
PrintWriter out) |
allowConfigUpdate, computeDumpGeneratedClasses, computeDumpGeneratedClassesDir, computeDumpGeneratedClassesIntermediate, disableTriggers, disallowDowncast, dumpScript, enableTriggers, getClassChecker, installBootScripts, installPolicy, isBytemanClass, isCompileToBytecode, isDebug, isDumpCFG, isDumpCFGPartial, isSkipClass, isTransformable, isTriggeringEnabled, isVerbose, maybeDumpClass, maybeDumpClassIntermediate, skipOverrideRules, transform, transform, updateConfiguration
public Retransformer(Instrumentation inst, List<String> scriptPaths, List<String> scriptTexts, boolean isRedefine) throws Exception
inst
- the instrumentation object used to interface to the JVMException
public void installScript(List<String> scriptTexts, List<String> scriptNames, PrintWriter out) throws Exception
Exception
protected void collectAffectedNames(List<RuleScript> ruleScripts, List<String> classList, List<String> interfaceList, List<String> superClassList, List<String> superInterfaceList)
protected void listScripts(PrintWriter out) throws Exception
Exception
public void removeScripts(List<String> scriptTexts, PrintWriter out) throws Exception
Exception
public void appendJarFile(PrintWriter out, JarFile jarfile, boolean isBoot) throws Exception
Exception
public Set<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 Set<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.Copyright © 2016. All rights reserved.