public class MethodMetadataReadingVisitor extends MethodVisitor implements MethodMetadata
MethodMetadata
interface.| Modifier and Type | Field and Description |
|---|---|
protected int |
access |
protected LinkedMultiValueMap<java.lang.String,AnnotationAttributes> |
attributesMap |
protected java.lang.ClassLoader |
classLoader |
protected java.lang.String |
declaringClassName |
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
metaAnnotationMap |
protected java.util.Set<MethodMetadata> |
methodMetadataSet |
protected java.lang.String |
methodName |
protected java.lang.String |
returnTypeName |
api, mv| Constructor and Description |
|---|
MethodMetadataReadingVisitor(java.lang.String methodName,
int access,
java.lang.String declaringClassName,
java.lang.String returnTypeName,
java.lang.ClassLoader classLoader,
java.util.Set<MethodMetadata> methodMetadataSet) |
| Modifier and Type | Method and Description |
|---|---|
MultiValueMap<java.lang.String,java.lang.Object> |
getAllAnnotationAttributes(java.lang.String annotationName)
Retrieve all attributes of all annotations of the given type, if any (i.e.
|
MultiValueMap<java.lang.String,java.lang.Object> |
getAllAnnotationAttributes(java.lang.String annotationName,
boolean classValuesAsString)
Retrieve all attributes of all annotations of the given type, if any (i.e.
|
AnnotationAttributes |
getAnnotationAttributes(java.lang.String annotationName)
Retrieve the attributes of the annotation of the given type, if any (i.e.
|
AnnotationAttributes |
getAnnotationAttributes(java.lang.String annotationName,
boolean classValuesAsString)
Retrieve the attributes of the annotation of the given type, if any (i.e.
|
java.lang.String |
getDeclaringClassName()
Return the fully-qualified name of the class that declares this method.
|
java.lang.String |
getMethodName()
Return the name of the method.
|
java.lang.String |
getReturnTypeName()
Return the fully-qualified name of this method's declared return type.
|
boolean |
isAbstract()
Return whether the underlying method is effectively abstract:
i.e.
|
boolean |
isAnnotated(java.lang.String annotationName)
Determine whether the underlying element has an annotation or meta-annotation
of the given type defined.
|
boolean |
isFinal()
Return whether the underlying method is marked as 'final'.
|
boolean |
isOverridable()
Return whether the underlying method is overridable,
i.e.
|
boolean |
isStatic()
Return whether the underlying method is declared as 'static'.
|
AnnotationVisitor |
visitAnnotation(java.lang.String desc,
boolean visible)
Visits an annotation of this method.
|
visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFieldInsn, visitFrame, visitIincInsn, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn, visitVarInsnprotected final java.lang.String methodName
protected final int access
protected final java.lang.String declaringClassName
protected final java.lang.String returnTypeName
protected final java.lang.ClassLoader classLoader
protected final java.util.Set<MethodMetadata> methodMetadataSet
protected final java.util.Map<java.lang.String,java.util.Set<java.lang.String>> metaAnnotationMap
protected final LinkedMultiValueMap<java.lang.String,AnnotationAttributes> attributesMap
public MethodMetadataReadingVisitor(java.lang.String methodName,
int access,
java.lang.String declaringClassName,
java.lang.String returnTypeName,
java.lang.ClassLoader classLoader,
java.util.Set<MethodMetadata> methodMetadataSet)
public AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
MethodVisitorvisitAnnotation in class MethodVisitordesc - the class descriptor of the annotation class.visible - true if the annotation is visible at runtime.public java.lang.String getMethodName()
MethodMetadatagetMethodName in interface MethodMetadatapublic boolean isAbstract()
MethodMetadataisAbstract in interface MethodMetadatapublic boolean isStatic()
MethodMetadataisStatic in interface MethodMetadatapublic boolean isFinal()
MethodMetadataisFinal in interface MethodMetadatapublic boolean isOverridable()
MethodMetadataisOverridable in interface MethodMetadatapublic boolean isAnnotated(java.lang.String annotationName)
AnnotatedTypeMetadataIf this method returns true, then
AnnotatedTypeMetadata.getAnnotationAttributes(java.lang.String) will return a non-null Map.
isAnnotated in interface AnnotatedTypeMetadataannotationName - the fully qualified class name of the annotation
type to look forpublic AnnotationAttributes getAnnotationAttributes(java.lang.String annotationName)
AnnotatedTypeMetadatagetAnnotationAttributes in interface AnnotatedTypeMetadataannotationName - the fully qualified class name of the annotation
type to look fornull if no matching annotation is defined.public AnnotationAttributes getAnnotationAttributes(java.lang.String annotationName, boolean classValuesAsString)
AnnotatedTypeMetadatagetAnnotationAttributes in interface AnnotatedTypeMetadataannotationName - the fully qualified class name of the annotation
type to look forclassValuesAsString - whether to convert class references to String
class names for exposure as values in the returned Map, instead of Class
references which might potentially have to be loaded firstnull if no matching annotation is defined.public MultiValueMap<java.lang.String,java.lang.Object> getAllAnnotationAttributes(java.lang.String annotationName)
AnnotatedTypeMetadatagetAllAnnotationAttributes in interface AnnotatedTypeMetadataannotationName - the fully qualified class name of the annotation
type to look fornull if no matching annotation is defined.AnnotatedTypeMetadata.getAllAnnotationAttributes(String, boolean)public MultiValueMap<java.lang.String,java.lang.Object> getAllAnnotationAttributes(java.lang.String annotationName, boolean classValuesAsString)
AnnotatedTypeMetadatagetAllAnnotationAttributes in interface AnnotatedTypeMetadataannotationName - the fully qualified class name of the annotation
type to look forclassValuesAsString - whether to convert class references to Stringnull if no matching annotation is defined.AnnotatedTypeMetadata.getAllAnnotationAttributes(String)public java.lang.String getDeclaringClassName()
MethodMetadatagetDeclaringClassName in interface MethodMetadatapublic java.lang.String getReturnTypeName()
MethodMetadatagetReturnTypeName in interface MethodMetadata