org.springframework.core.type

## 接口 ClassMetadata

- 所有已知子接口:
    AnnotationMetadata
  所有已知实现类:
    AnnotationMetadataReadingVisitor, StandardAnnotationMetadata, StandardClassMetadata

      public interface ClassMetadata

  Interface that defines abstract metadata of a specific class, in a form that does not require that class to be loaded yet.
  从以下版本开始:
    2.5
  作者:
    Juergen Hoeller
  另请参阅:
    `StandardClassMetadata`, `MetadataReader.getClassMetadata()`, `AnnotationMetadata`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getClassName()` Return the name of the underlying class.
    `String` | `getEnclosingClassName()` Return the name of the enclosing class of the underlying class, or `null` if the underlying class is a top-level class.
    `String[]` | `getInterfaceNames()` Return the names of all interfaces that the underlying class implements, or an empty array if there are none.
    `String[]` | `getMemberClassNames()` Return the names of all classes declared as members of the class represented by this ClassMetadata object.
    `String` | `getSuperClassName()` Return the name of the super class of the underlying class, or `null` if there is no super class defined.
    `boolean` | `hasEnclosingClass()` Return whether the underlying class is declared within an enclosing class (i.e. the underlying class is an inner/nested class or a local class within a method).
    `boolean` | `hasSuperClass()` Return whether the underlying class has a super class.
    `boolean` | `isAbstract()` Return whether the underlying class is marked as abstract.
    `boolean` | `isAnnotation()` Return whether the underlying class represents an annotation.
    `boolean` | `isConcrete()` Return whether the underlying class represents a concrete class, i.e. neither an interface nor an abstract class.
    `boolean` | `isFinal()` Return whether the underlying class is marked as 'final'.
    `boolean` | `isIndependent()` 确定基础类是否独立，即它是顶级类或嵌套类（静态内部类） 可以独立于封闭类构造。
    `boolean` | `isInterface()` Return whether the underlying class represents an interface.

- - ### 方法详细资料

    - #### getClassName

          String getClassName()

      Return the name of the underlying class.

    - #### isInterface

          boolean isInterface()

      Return whether the underlying class represents an interface.

    - #### isAnnotation

          boolean isAnnotation()

      Return whether the underlying class represents an annotation.
      从以下版本开始:
        4.1

    - #### isAbstract

          boolean isAbstract()

      Return whether the underlying class is marked as abstract.

    - #### isConcrete

          boolean isConcrete()

      Return whether the underlying class represents a concrete class, i.e. neither an interface nor an abstract class.

    - #### isFinal

          boolean isFinal()

      Return whether the underlying class is marked as 'final'.

    - #### isIndependent

          boolean isIndependent()

      确定基础类是否独立，即它是顶级类或嵌套类（静态内部类） 可以独立于封闭类构造。 Determine whether the underlying class is independent, i.e. whether it is a top-level class or a nested class (static inner class) that can be constructed independently from an enclosing class.

    - #### hasEnclosingClass

          boolean hasEnclosingClass()

      Return whether the underlying class is declared within an enclosing class (i.e. the underlying class is an inner/nested class or a local class within a method).

      If this method returns `false`, then the underlying class is a top-level class.

    - #### getEnclosingClassName

          @Nullable
          String getEnclosingClassName()

      Return the name of the enclosing class of the underlying class, or `null` if the underlying class is a top-level class.

    - #### hasSuperClass

          boolean hasSuperClass()

      Return whether the underlying class has a super class.

    - #### getSuperClassName

          @Nullable
          String getSuperClassName()

      Return the name of the super class of the underlying class, or `null` if there is no super class defined.

    - #### getInterfaceNames

          String[] getInterfaceNames()

      Return the names of all interfaces that the underlying class implements, or an empty array if there are none.

    - #### getMemberClassNames

          String[] getMemberClassNames()

      Return the names of all classes declared as members of the class represented by this ClassMetadata object. This includes public, protected, default (package) access, and private classes and interfaces declared by the class, but excludes inherited classes and interfaces. An empty array is returned if no member classes or interfaces exist.
      从以下版本开始:
        3.1