public static class AsmVisitorWrapper.ForDeclaredMethods extends Object implements AsmVisitorWrapper
 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.DispatchingVisitorA class visitor that applies the outer ASM visitor for identifying declared methods. | 
| protected static class  | AsmVisitorWrapper.ForDeclaredMethods.EntryAn entry describing a method visitor wrapper paired with a matcher for fields to be wrapped. | 
| static interface  | AsmVisitorWrapper.ForDeclaredMethods.MethodVisitorWrapperA method visitor wrapper that allows for wrapping a  MethodVisitordefining a declared method. | 
AsmVisitorWrapper.AbstractBase, AsmVisitorWrapper.Compound, AsmVisitorWrapper.ForDeclaredFields, AsmVisitorWrapper.ForDeclaredMethods, AsmVisitorWrapper.NoOpNO_FLAGS| Modifier | Constructor and Description | 
|---|---|
|   | ForDeclaredMethods()Creates a new visitor wrapper for declared methods. | 
| protected  | ForDeclaredMethods(List<AsmVisitorWrapper.ForDeclaredMethods.Entry> entries,
                  int writerFlags,
                  int readerFlags)Creates a new visitor wrapper for declared methods. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object other) | 
| int | hashCode() | 
| int | mergeReader(int flags)Defines the flags that are provided to any  ClassReaderwhen reading a class if applicable. | 
| int | mergeWriter(int flags)Defines the flags that are provided to any  ClassWriterwhen writing a class. | 
| 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. | 
| AsmVisitorWrapper.ForDeclaredMethods | readerFlags(int flags)Sets flags for the  ClassReaderthis wrapper is applied to. | 
| String | toString() | 
| ClassVisitor | wrap(TypeDescription instrumentedType,
    ClassVisitor classVisitor)Applies a  ClassVisitorWrapperto the creation of aDynamicType. | 
| AsmVisitorWrapper.ForDeclaredMethods | writerFlags(int flags)Sets flags for the  ClassWriterthis wrapper is applied to. | 
public ForDeclaredMethods()
protected ForDeclaredMethods(List<AsmVisitorWrapper.ForDeclaredMethods.Entry> entries, int writerFlags, int readerFlags)
entries - The list of entries that describe matched methods in their application order.readerFlags - The reader flags to set.writerFlags - The writer flags to set.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 AsmVisitorWrapper.ForDeclaredMethods writerFlags(int flags)
ClassWriter this wrapper is applied to.flags - The flags to set for the ClassWriter.public AsmVisitorWrapper.ForDeclaredMethods readerFlags(int flags)
ClassReader this wrapper is applied to.flags - The flags to set for the ClassReader.public int mergeWriter(int flags)
AsmVisitorWrapperClassWriter when writing a class. Typically, this gives opportunity to instruct ASM
 to compute stack map frames or the size of the local variables array and the operand stack. If no specific flags are required for
 applying this wrapper, the given value is to be returned.mergeWriter in interface AsmVisitorWrapperflags - The currently set flags. This value should be combined (e.g. flags | foo) into the value that is returned by this wrapper.ClassWriter.public int mergeReader(int flags)
AsmVisitorWrapperClassReader when reading a class if applicable. Typically, this gives opportunity to
 instruct ASM to expand or skip frames and to skip code and debug information. If no specific flags are required for applying this
 wrapper, the given value is to be returned.mergeReader in interface AsmVisitorWrapperflags - The currently set flags. This value should be combined (e.g. flags | foo) into the value that is returned by this wrapper.ClassReader.public ClassVisitor wrap(TypeDescription instrumentedType, ClassVisitor classVisitor)
AsmVisitorWrapperClassVisitorWrapper to the creation of a DynamicType.wrap in interface AsmVisitorWrapperinstrumentedType - 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.