类 MethodMetadataReadingVisitor
- java.lang.Object
- org.springframework.asm.MethodVisitor
- org.springframework.core.type.classreading.MethodMetadataReadingVisitor
- 所有已实现的接口:
AnnotatedTypeMetadata
,MethodMetadata
@Deprecated public class MethodMetadataReadingVisitor extends MethodVisitor implements MethodMetadata
已过时。As of Spring Framework 5.2, this class and related classes in this package have been replaced bySimpleAnnotationMetadataReadingVisitor
and related classes for internal use within the framework.ASM method visitor which looks for the annotations defined on a method, exposing them through theMethodMetadata
interface.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller, Mark Pollack, Costin Leau, Chris Beams, Phillip Webb
字段概要
字段 修饰符和类型 字段 说明 protected int
access
已过时。protected LinkedMultiValueMap<String,AnnotationAttributes>
attributesMap
已过时。protected ClassLoader
classLoader
已过时。protected String
declaringClassName
已过时。protected Map<String,Set<String>>
metaAnnotationMap
已过时。protected Set<MethodMetadata>
methodMetadataSet
已过时。protected String
methodName
已过时。protected String
returnTypeName
已过时。从类继承的字段 org.springframework.asm.MethodVisitor
api, mv
构造器概要
构造器 构造器 说明 MethodMetadataReadingVisitor(String methodName, int access, String declaringClassName, String returnTypeName, ClassLoader classLoader, Set<MethodMetadata> methodMetadataSet)
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 MultiValueMap<String,Object>
getAllAnnotationAttributes(String annotationName, boolean classValuesAsString)
已过时。Retrieve all attributes of all annotations of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation).AnnotationAttributes
getAnnotationAttributes(String annotationName, boolean classValuesAsString)
已过时。Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation), also taking attribute overrides on composed annotations into account.MergedAnnotations
getAnnotations()
已过时。Return annotation details based on the direct annotations of the underlying element.String
getDeclaringClassName()
已过时。Return the fully-qualified name of the class that declares this method.String
getMethodName()
已过时。Return the name of the method.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. marked as abstract on a class or declared as a regular, non-default method in an interface.boolean
isAnnotated(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. not marked as static, final or private.boolean
isStatic()
已过时。Return whether the underlying method is declared as 'static'.AnnotationVisitor
visitAnnotation(String desc, boolean visible)
已过时。Visits an annotation of this method.从类继承的方法 org.springframework.asm.MethodVisitor
visitAnnotableParameterCount, 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, visitVarInsn
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.core.type.AnnotatedTypeMetadata
getAllAnnotationAttributes, getAnnotationAttributes
字段详细资料
methodName
protected final String methodName
已过时。
access
protected final int access
已过时。
declaringClassName
protected final String declaringClassName
已过时。
returnTypeName
protected final String returnTypeName
已过时。
classLoader
@Nullable protected final ClassLoader classLoader
已过时。
methodMetadataSet
protected final Set<MethodMetadata> methodMetadataSet
已过时。
metaAnnotationMap
protected final Map<String,Set<String>> metaAnnotationMap
已过时。
attributesMap
protected final LinkedMultiValueMap<String,AnnotationAttributes> attributesMap
已过时。
构造器详细资料
MethodMetadataReadingVisitor
public MethodMetadataReadingVisitor(String methodName, int access, String declaringClassName, String returnTypeName, @Nullable ClassLoader classLoader, Set<MethodMetadata> methodMetadataSet)
已过时。
方法详细资料
getAnnotations
public MergedAnnotations getAnnotations()
已过时。从接口复制的说明:AnnotatedTypeMetadata
Return annotation details based on the direct annotations of the underlying element.- 指定者:
getAnnotations
在接口中AnnotatedTypeMetadata
- 返回:
- merged annotations based on the direct annotations
visitAnnotation
@Nullable public AnnotationVisitor visitAnnotation(String desc, boolean visible)
已过时。从类复制的说明:MethodVisitor
Visits an annotation of this method.- 覆盖:
visitAnnotation
在类中MethodVisitor
- 参数:
desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.- 返回:
- a visitor to visit the annotation values, or null if this visitor is not interested in visiting this annotation.
getMethodName
public String getMethodName()
已过时。从接口复制的说明:MethodMetadata
Return the name of the method.- 指定者:
getMethodName
在接口中MethodMetadata
isAbstract
public boolean isAbstract()
已过时。从接口复制的说明:MethodMetadata
Return whether the underlying method is effectively abstract: i.e. marked as abstract on a class or declared as a regular, non-default method in an interface.- 指定者:
isAbstract
在接口中MethodMetadata
isStatic
public boolean isStatic()
已过时。从接口复制的说明:MethodMetadata
Return whether the underlying method is declared as 'static'.- 指定者:
isStatic
在接口中MethodMetadata
isFinal
public boolean isFinal()
已过时。从接口复制的说明:MethodMetadata
Return whether the underlying method is marked as 'final'.- 指定者:
isFinal
在接口中MethodMetadata
isOverridable
public boolean isOverridable()
已过时。从接口复制的说明:MethodMetadata
Return whether the underlying method is overridable, i.e. not marked as static, final or private.- 指定者:
isOverridable
在接口中MethodMetadata
isAnnotated
public boolean isAnnotated(String annotationName)
已过时。从接口复制的说明:AnnotatedTypeMetadata
Determine whether the underlying element has an annotation or meta-annotation of the given type defined.If this method returns
true
, thenAnnotatedTypeMetadata.getAnnotationAttributes(java.lang.String)
will return a non-null Map.- 指定者:
isAnnotated
在接口中AnnotatedTypeMetadata
- 参数:
annotationName
- the fully qualified class name of the annotation type to look for- 返回:
- whether a matching annotation is defined
getAnnotationAttributes
@Nullable public AnnotationAttributes getAnnotationAttributes(String annotationName, boolean classValuesAsString)
已过时。从接口复制的说明:AnnotatedTypeMetadata
Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation), also taking attribute overrides on composed annotations into account.- 指定者:
getAnnotationAttributes
在接口中AnnotatedTypeMetadata
- 参数:
annotationName
- 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 first- 返回:
- a Map of attributes, with the attribute name as key (e.g. "value") and the defined attribute value as Map value. This return value will be
null
if no matching annotation is defined.
getAllAnnotationAttributes
@Nullable public MultiValueMap<String,Object> getAllAnnotationAttributes(String annotationName, boolean classValuesAsString)
已过时。从接口复制的说明:AnnotatedTypeMetadata
Retrieve all attributes of all annotations of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation). Note that this variant does not take attribute overrides into account.- 指定者:
getAllAnnotationAttributes
在接口中AnnotatedTypeMetadata
- 参数:
annotationName
- the fully qualified class name of the annotation type to look forclassValuesAsString
- whether to convert class references to String- 返回:
- a MultiMap of attributes, with the attribute name as key (e.g. "value") and a list of the defined attribute values as Map value. This return value will be
null
if no matching annotation is defined. - 另请参阅:
AnnotatedTypeMetadata.getAllAnnotationAttributes(String)
getDeclaringClassName
public String getDeclaringClassName()
已过时。从接口复制的说明:MethodMetadata
Return the fully-qualified name of the class that declares this method.- 指定者:
getDeclaringClassName
在接口中MethodMetadata
getReturnTypeName
public String getReturnTypeName()
已过时。从接口复制的说明:MethodMetadata
Return the fully-qualified name of this method's declared return type.- 指定者:
getReturnTypeName
在接口中MethodMetadata