public static class AsmVisitorWrapper.ForDeclaredMethods extends AsmVisitorWrapper.AbstractBase
An ASM visitor wrapper that allows to wrap declared methods of the instrumented type with a AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper.
Note: Inherited methods are not matched by this visitor, even if they are intercepted by a normal interception.
| Modifier and Type | Class and Description |
|---|---|
protected class |
AsmVisitorWrapper.ForDeclaredMethods.DispatchingVisitor
A class visitor that applies the outer ASM visitor for identifying declared methods.
|
protected static class |
AsmVisitorWrapper.ForDeclaredMethods.Entry
An entry describing a method visitor wrapper paired with a matcher for fields to be wrapped.
|
static interface |
AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper
A method visitor wrapper that allows for wrapping a
MethodVisitor defining a declared method. |
AsmVisitorWrapper.AbstractBase, AsmVisitorWrapper.Compound, AsmVisitorWrapper.ForDeclaredFields, AsmVisitorWrapper.ForDeclaredMethods, AsmVisitorWrapper.NoOp| Modifier | Constructor and Description |
|---|---|
|
ForDeclaredMethods()
Creates a new visitor wrapper for declared methods.
|
protected |
ForDeclaredMethods(List<AsmVisitorWrapper.ForDeclaredMethods.Entry> entries)
Creates a new visitor wrapper for declared methods.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
hashCode() |
AsmVisitorWrapper.ForDeclaredMethods |
method(ElementMatcher<? super MethodDescription.InDefinedShape> matcher,
AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper methodVisitorWrapper)
Defines a new method visitor wrapper to be applied if the given method matcher is matched.
|
String |
toString() |
ClassVisitor |
wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor)
Applies a
ClassVisitorWrapper to the creation of a DynamicType. |
mergeReader, mergeWriterpublic ForDeclaredMethods()
protected ForDeclaredMethods(List<AsmVisitorWrapper.ForDeclaredMethods.Entry> entries)
entries - The list of entries that describe matched methods in their application order.public AsmVisitorWrapper.ForDeclaredMethods method(ElementMatcher<? super MethodDescription.InDefinedShape> matcher, AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapper methodVisitorWrapper)
matcher - The matcher to identify methods to be wrapped.methodVisitorWrapper - The method visitor wrapper to be applied if the given matcher is matched.public ClassVisitor wrap(TypeDescription instrumentedType, ClassVisitor classVisitor)
AsmVisitorWrapperClassVisitorWrapper to the creation of a DynamicType.instrumentedType - The instrumented type.classVisitor - A ClassVisitor to become the new primary class visitor to which the created
DynamicType is written to.ClassVisitor that usually delegates to the ClassVisitor delivered in the argument.Copyright © 2014–2016. All rights reserved.