org.springframework.core.type

## Class StandardClassMetadata

- java.lang.Object
- - org.springframework.core.type.StandardClassMetadata

- All Implemented Interfaces:
    ClassMetadata
  Direct Known Subclasses:
    StandardAnnotationMetadata

      public class StandardClassMetadata
      extends Object
      implements ClassMetadata

  `ClassMetadata` implementation that uses standard reflection to introspect a given `Class`.
  Since:
    2.5
  Author:
    Juergen Hoeller, Sam Brannen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardClassMetadata(Class<?> introspectedClass)` Deprecated. since 5.2 in favor of `StandardAnnotationMetadata`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `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.
    `Class<?>` | `getIntrospectedClass()` Return the underlying Class.
    `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 superclass of the underlying class, or `null` if there is no superclass defined.
    `int` | `hashCode()`
    `boolean` | `isAbstract()` Return whether the underlying class is marked as abstract.
    `boolean` | `isAnnotation()` Return whether the underlying class represents an annotation.
    `boolean` | `isFinal()` Return whether the underlying class is marked as 'final'.
    `boolean` | `isIndependent()` Determine whether the underlying class is independent, i.e.
    `boolean` | `isInterface()` Return whether the underlying class represents an interface.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.core.type.ClassMetadata

      `hasEnclosingClass, hasSuperClass, isConcrete`

- - ### Constructor Detail

    - #### StandardClassMetadata

          @Deprecated
          public StandardClassMetadata(Class<?> introspectedClass)

      Deprecated. since 5.2 in favor of `StandardAnnotationMetadata`
      Create a new StandardClassMetadata wrapper for the given Class.
      Parameters:
        `introspectedClass` - the Class to introspect

  - ### Method Detail

    - #### getIntrospectedClass

          public final Class<?> getIntrospectedClass()

      Return the underlying Class.

    - #### getClassName

          public String getClassName()

      Description copied from interface: `ClassMetadata`
      Return the name of the underlying class.
      Specified by:
        `getClassName` in interface `ClassMetadata`

    - #### isInterface

          public boolean isInterface()

      Description copied from interface: `ClassMetadata`
      Return whether the underlying class represents an interface.
      Specified by:
        `isInterface` in interface `ClassMetadata`

    - #### isAnnotation

          public boolean isAnnotation()

      Description copied from interface: `ClassMetadata`
      Return whether the underlying class represents an annotation.
      Specified by:
        `isAnnotation` in interface `ClassMetadata`

    - #### isAbstract

          public boolean isAbstract()

      Description copied from interface: `ClassMetadata`
      Return whether the underlying class is marked as abstract.
      Specified by:
        `isAbstract` in interface `ClassMetadata`

    - #### isFinal

          public boolean isFinal()

      Description copied from interface: `ClassMetadata`
      Return whether the underlying class is marked as 'final'.
      Specified by:
        `isFinal` in interface `ClassMetadata`

    - #### isIndependent

          public boolean isIndependent()

      Description copied from interface: `ClassMetadata`
      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 of an enclosing class.
      Specified by:
        `isIndependent` in interface `ClassMetadata`

    - #### getEnclosingClassName

          @Nullable
          public String getEnclosingClassName()

      Description copied from interface: `ClassMetadata`
      Return the name of the enclosing class of the underlying class, or `null` if the underlying class is a top-level class.
      Specified by:
        `getEnclosingClassName` in interface `ClassMetadata`

    - #### getSuperClassName

          @Nullable
          public String getSuperClassName()

      Description copied from interface: `ClassMetadata`
      Return the name of the superclass of the underlying class, or `null` if there is no superclass defined.
      Specified by:
        `getSuperClassName` in interface `ClassMetadata`

    - #### getInterfaceNames

          public String[] getInterfaceNames()

      Description copied from interface: `ClassMetadata`
      Return the names of all interfaces that the underlying class implements, or an empty array if there are none.
      Specified by:
        `getInterfaceNames` in interface `ClassMetadata`

    - #### getMemberClassNames

          public String[] getMemberClassNames()

      Description copied from interface: `ClassMetadata`
      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.
      Specified by:
        `getMemberClassNames` in interface `ClassMetadata`

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`