类 StandardMethodMetadata

java.lang.Object
cn.taketoday.core.type.StandardMethodMetadata
所有已实现的接口:
AnnotatedTypeMetadata, MethodMetadata

public class StandardMethodMetadata extends Object implements MethodMetadata
MethodMetadata implementation that uses standard reflection to introspect a given Method.
从以下版本开始:
3.0
作者:
Juergen Hoeller, Mark Pollack, Chris Beams, Phillip Webb, Sam Brannen
  • 字段详细资料

    • introspectedMethod

      private final Method introspectedMethod
    • nestedAnnotationsAsMap

      private final boolean nestedAnnotationsAsMap
    • mergedAnnotations

      private final MergedAnnotations mergedAnnotations
  • 构造器详细资料

    • StandardMethodMetadata

      public StandardMethodMetadata(Method introspectedMethod)
      Create a new StandardMethodMetadata wrapper for the given Method.
      参数:
      introspectedMethod - the Method to introspect
    • StandardMethodMetadata

      public StandardMethodMetadata(Method introspectedMethod, boolean nestedAnnotationsAsMap)
      Create a new StandardMethodMetadata wrapper for the given Method, providing the option to return any nested annotations or annotation arrays in the form of AnnotationAttributes instead of actual Annotation instances.
      参数:
      introspectedMethod - the Method to introspect
      nestedAnnotationsAsMap - return nested annotations and annotation arrays as AnnotationAttributes for compatibility with ASM-based AnnotationMetadata implementations
  • 方法详细资料

    • getAnnotations

      public MergedAnnotations getAnnotations()
      从接口复制的说明: AnnotatedTypeMetadata
      Get annotation details based on the direct annotations and meta-annotations of the underlying element.
      指定者:
      getAnnotations 在接口中 AnnotatedTypeMetadata
      返回:
      merged annotations based on the direct annotations and meta-annotations
    • getIntrospectedMethod

      public final Method getIntrospectedMethod()
      Return the underlying Method.
    • getMethodName

      public String getMethodName()
      从接口复制的说明: MethodMetadata
      Get the name of the underlying method.
      指定者:
      getMethodName 在接口中 MethodMetadata
    • getDeclaringClassName

      public String getDeclaringClassName()
      从接口复制的说明: MethodMetadata
      Get the fully-qualified name of the class that declares the underlying method.
      指定者:
      getDeclaringClassName 在接口中 MethodMetadata
    • getReturnTypeName

      public String getReturnTypeName()
      从接口复制的说明: MethodMetadata
      Get the fully-qualified name of the underlying method's declared return type.
      指定者:
      getReturnTypeName 在接口中 MethodMetadata
    • isAbstract

      public boolean isAbstract()
      从接口复制的说明: MethodMetadata
      Determine whether the underlying method is effectively abstract: i.e. marked as abstract in a class or declared as a regular, non-default method in an interface.
      指定者:
      isAbstract 在接口中 MethodMetadata
    • isStatic

      public boolean isStatic()
      从接口复制的说明: MethodMetadata
      Determine whether the underlying method is declared as 'static'.
      指定者:
      isStatic 在接口中 MethodMetadata
    • isFinal

      public boolean isFinal()
      从接口复制的说明: MethodMetadata
      Determine whether the underlying method is marked as 'final'.
      指定者:
      isFinal 在接口中 MethodMetadata
    • isOverridable

      public boolean isOverridable()
      从接口复制的说明: MethodMetadata
      Determine whether the underlying method is overridable, i.e. not marked as static, final, or private.
      指定者:
      isOverridable 在接口中 MethodMetadata
    • isPrivate

      private boolean isPrivate()
    • getAnnotationAttributes

      @Nullable public Map<String,Object> 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).

      @AliasFor semantics are fully supported, both within a single annotation and within annotation hierarchies.

      指定者:
      getAnnotationAttributes 在接口中 AnnotatedTypeMetadata
      参数:
      annotationName - the fully-qualified class name of the annotation type to look for
      classValuesAsString - 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 each annotation attribute name as map key (e.g. "location") and the attribute's value as map value; or null if no matching annotation is found
    • 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 for
      classValuesAsString - 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.
      另请参阅:
    • equals

      public boolean equals(@Nullable Object obj)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • getParameterCount

      public int getParameterCount()
      指定者:
      getParameterCount 在接口中 MethodMetadata
    • getArgumentTypes

      public Type[] getArgumentTypes()
      指定者:
      getArgumentTypes 在接口中 MethodMetadata
    • getParameterTypes

      public Class<?>[] getParameterTypes()
      指定者:
      getParameterTypes 在接口中 MethodMetadata