Package org.springframework.core.type
Class StandardClassMetadata
java.lang.Object
org.springframework.core.type.StandardClassMetadata
- All Implemented Interfaces:
ClassMetadata
- Direct Known Subclasses:
StandardAnnotationMetadata
ClassMetadata implementation that uses standard reflection
to introspect a given Class.- Since:
- 2.5
- Author:
- Juergen Hoeller, Sam Brannen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the name of the underlying class.Return the name of the enclosing class of the underlying class, ornullif the underlying class is a top-level class.String[]Return the names of all interfaces that the underlying class implements, or an empty array if there are none.final Class<?>Return the underlying Class.String[]Return the names of all classes declared as members of the class represented by this ClassMetadata object.Return the name of the super class of the underlying class, ornullif there is no super class defined.inthashCode()booleanReturn whether the underlying class is marked as abstract.booleanReturn whether the underlying class represents an annotation.booleanisFinal()Return whether the underlying class is marked as 'final'.booleanDetermine whether the underlying class is independent, i.e.booleanReturn whether the underlying class represents an interface.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.type.ClassMetadata
hasEnclosingClass, hasSuperClass, isConcrete
-
Constructor Details
-
StandardClassMetadata
Deprecated.since 5.2 in favor ofStandardAnnotationMetadataCreate a new StandardClassMetadata wrapper for the given Class.- Parameters:
introspectedClass- the Class to introspect
-
-
Method Details
-
getIntrospectedClass
Return the underlying Class. -
getClassName
Description copied from interface:ClassMetadataReturn the name of the underlying class.- Specified by:
getClassNamein interfaceClassMetadata
-
isInterface
public boolean isInterface()Description copied from interface:ClassMetadataReturn whether the underlying class represents an interface.- Specified by:
isInterfacein interfaceClassMetadata
-
isAnnotation
public boolean isAnnotation()Description copied from interface:ClassMetadataReturn whether the underlying class represents an annotation.- Specified by:
isAnnotationin interfaceClassMetadata
-
isAbstract
public boolean isAbstract()Description copied from interface:ClassMetadataReturn whether the underlying class is marked as abstract.- Specified by:
isAbstractin interfaceClassMetadata
-
isFinal
public boolean isFinal()Description copied from interface:ClassMetadataReturn whether the underlying class is marked as 'final'.- Specified by:
isFinalin interfaceClassMetadata
-
isIndependent
public boolean isIndependent()Description copied from interface:ClassMetadataDetermine 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.- Specified by:
isIndependentin interfaceClassMetadata
-
getEnclosingClassName
Description copied from interface:ClassMetadataReturn the name of the enclosing class of the underlying class, ornullif the underlying class is a top-level class.- Specified by:
getEnclosingClassNamein interfaceClassMetadata
-
getSuperClassName
Description copied from interface:ClassMetadataReturn the name of the super class of the underlying class, ornullif there is no super class defined.- Specified by:
getSuperClassNamein interfaceClassMetadata
-
getInterfaceNames
Description copied from interface:ClassMetadataReturn the names of all interfaces that the underlying class implements, or an empty array if there are none.- Specified by:
getInterfaceNamesin interfaceClassMetadata
-
getMemberClassNames
Description copied from interface:ClassMetadataReturn 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:
getMemberClassNamesin interfaceClassMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
StandardAnnotationMetadata