org.springframework.core.type

Class StandardClassMetadata

    • Constructor Summary

      Constructors  
      Constructor and Description
      StandardClassMetadata(Class introspectedClass)
      Create a new StandardClassMetadata wrapper for the given Class.
    • Constructor Detail

      • StandardClassMetadata

        public StandardClassMetadata(Class introspectedClass)
        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.
      • isInterface

        public boolean isInterface()
        Description copied from interface: ClassMetadata
        Return whether the underlying class represents an interface.
        Specified by:
        isInterface 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
      • isConcrete

        public boolean isConcrete()
        Description copied from interface: ClassMetadata
        Return whether the underlying class represents a concrete class, i.e. neither an interface nor an abstract class.
        Specified by:
        isConcrete 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 independent from an enclosing class.
        Specified by:
        isIndependent in interface  ClassMetadata
      • hasEnclosingClass

        public boolean hasEnclosingClass()
        Description copied from interface: ClassMetadata
        Return whether the underlying class has 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.

        Specified by:
        hasEnclosingClass in interface  ClassMetadata
      • getEnclosingClassName

        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
      • hasSuperClass

        public boolean hasSuperClass()
        Description copied from interface: ClassMetadata
        Return whether the underlying class has a super class.
        Specified by:
        hasSuperClass in interface  ClassMetadata
      • getSuperClassName

        public String getSuperClassName()
        Description copied from interface: ClassMetadata
        Return the name of the super class of the underlying class, or null if there is no super class 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