public class CollectMethodData extends MethodVisitor
api, mv
Constructor and Description |
---|
CollectMethodData(CollectClassData.ClassType classType,
int access,
String name,
String desc,
String signature,
String[] exceptions)
Prepare to collect data for a method from bytecode.
|
Modifier and Type | Method and Description |
---|---|
int |
getAccess() |
List<CollectAnnotationData> |
getAnnotations() |
List<CollectAnnotationData>[] |
getArgAnnotations() |
String[] |
getArgNames() |
Type[] |
getArgTypes() |
String |
getDesc() |
String[] |
getExceptions() |
String |
getName() |
String |
getSignature() |
boolean |
hasActualArgNames() |
String |
toString() |
AnnotationVisitor |
visitAnnotation(String desc,
boolean visible)
Visits an annotation of this method.
|
void |
visitLocalVariable(String name,
String desc,
String signature,
Label start,
Label end,
int index)
Visits a local variable declaration.
|
AnnotationVisitor |
visitParameterAnnotation(int parameter,
String desc,
boolean visible)
Visits an annotation of a parameter this method.
|
visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMultiANewArrayInsn, visitTableSwitchInsn, visitTryCatchBlock, visitTypeInsn, visitVarInsn
public CollectMethodData(CollectClassData.ClassType classType, int access, String name, String desc, String signature, String[] exceptions)
classType
- access
- name
- desc
- signature
- exceptions
- public int getAccess()
public List<CollectAnnotationData> getAnnotations()
public List<CollectAnnotationData>[] getArgAnnotations()
public String[] getArgNames()
public Type[] getArgTypes()
public String getDesc()
public String[] getExceptions()
public String getName()
public String getSignature()
public boolean hasActualArgNames()
public AnnotationVisitor visitAnnotation(String desc, boolean visible)
MethodVisitor
visitAnnotation
in class MethodVisitor
desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index)
MethodVisitor
visitLocalVariable
in class MethodVisitor
name
- the name of a local variable.desc
- the type descriptor of this local variable.signature
- the type signature of this local variable. May be
null if the local variable type does not use generic
types.start
- the first instruction corresponding to the scope of this local
variable (inclusive).end
- the last instruction corresponding to the scope of this local
variable (exclusive).index
- the local variable's index.public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible)
MethodVisitor
visitParameterAnnotation
in class MethodVisitor
parameter
- the parameter index.desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.Copyright © 2018. All rights reserved.