public class ClassWeaverService extends java.lang.Object implements ClassMatchVisitorFactory, ContextClassTransformer
NO_OP_FACTORY| Constructor and Description |
|---|
ClassWeaverService(java.lang.instrument.Instrumentation instrumentation) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addTraceInformation(java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Set<TracedWeaveInstrumentationTracker>> weaveTraceDetailsTrackers,
java.lang.String weavePackageName,
InstrumentationContext context,
org.objectweb.asm.tree.ClassNode composite,
java.lang.String originalClassName)
For every tracer that originated from weaved code:
Add WeaveInstrumentation info to the context
Remove the tracer from the composite method
|
java.lang.Runnable |
createRetransformRunnable(java.lang.Class<?>[] loadedClasses) |
com.newrelic.weave.weavepackage.WeavePackageManager |
getWeavePackageManger() |
org.objectweb.asm.ClassVisitor |
newClassMatchVisitor(java.lang.ClassLoader loader,
java.lang.Class<?> classBeingRedefined,
org.objectweb.asm.ClassReader reader,
org.objectweb.asm.ClassVisitor cv,
InstrumentationContext context)
Returns a chaining class visitor that applies matching logic to the class referenced by the class reader and
classBeingRedefined.
|
void |
registerInstrumentation()
Registers the weave instrumentation jars that are packaged into the agent jar's instrumentation directory and
present in the extension directory.
|
void |
registerInstrumentationCloseable(java.lang.String instrumentationName,
java.io.Closeable closeable)
Register a closable which will run if/when a
WeavePackage is deregistered. |
void |
registerSecurityInstrumentation()
Registers the security weave instrumentation jars that are packaged into the Security agent jar's instrumentation directory.
|
java.lang.Runnable |
reloadExternalWeavePackages(java.util.Collection<java.io.File> newWeaveExtensions,
java.util.Collection<java.io.File> removedWeaveExtensions)
Given a set of weave extensions, this method loads them, validates them and provides a runnable which will
retransform any classes that match any old or new instrumentation.
|
byte[] |
transform(java.lang.ClassLoader loader,
java.lang.String className,
java.lang.Class<?> classBeingRedefined,
java.security.ProtectionDomain protectionDomain,
byte[] classfileBuffer,
InstrumentationContext context,
OptimizedClassMatcher.Match match) |
public ClassWeaverService(java.lang.instrument.Instrumentation instrumentation)
public void registerInstrumentation()
public void registerSecurityInstrumentation()
public java.lang.Runnable createRetransformRunnable(java.lang.Class<?>[] loadedClasses)
public void registerInstrumentationCloseable(java.lang.String instrumentationName,
java.io.Closeable closeable)
WeavePackage is deregistered.public java.lang.Runnable reloadExternalWeavePackages(java.util.Collection<java.io.File> newWeaveExtensions,
java.util.Collection<java.io.File> removedWeaveExtensions)
public org.objectweb.asm.ClassVisitor newClassMatchVisitor(java.lang.ClassLoader loader,
java.lang.Class<?> classBeingRedefined,
org.objectweb.asm.ClassReader reader,
org.objectweb.asm.ClassVisitor cv,
InstrumentationContext context)
ClassMatchVisitorFactoryInstrumentationContext.newClassMatchVisitor in interface ClassMatchVisitorFactorypublic byte[] transform(java.lang.ClassLoader loader,
java.lang.String className,
java.lang.Class<?> classBeingRedefined,
java.security.ProtectionDomain protectionDomain,
byte[] classfileBuffer,
InstrumentationContext context,
OptimizedClassMatcher.Match match)
throws java.lang.instrument.IllegalClassFormatException
transform in interface ContextClassTransformerjava.lang.instrument.IllegalClassFormatExceptionpublic static void addTraceInformation(java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Set<TracedWeaveInstrumentationTracker>> weaveTraceDetailsTrackers, java.lang.String weavePackageName, InstrumentationContext context, org.objectweb.asm.tree.ClassNode composite, java.lang.String originalClassName)
public com.newrelic.weave.weavepackage.WeavePackageManager getWeavePackageManger()