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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the name of the underlying class.Return the name of the enclosing class of the underlying class, ornull
if 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 superclass of the underlying class, ornull
if there is no superclass defined.int
hashCode()
boolean
Return whether the underlying class is marked as abstract.boolean
Return whether the underlying class represents an annotation.boolean
isFinal()
Return whether the underlying class is marked as 'final'.boolean
Determine whether the underlying class is independent, i.e.boolean
Return whether the underlying class represents an interface.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 Details
-
StandardClassMetadata
Deprecated.since 5.2 in favor ofStandardAnnotationMetadata
Create 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:ClassMetadata
Return the name of the underlying class.- Specified by:
getClassName
in interfaceClassMetadata
-
isInterface
public boolean isInterface()Description copied from interface:ClassMetadata
Return whether the underlying class represents an interface.- Specified by:
isInterface
in interfaceClassMetadata
-
isAnnotation
public boolean isAnnotation()Description copied from interface:ClassMetadata
Return whether the underlying class represents an annotation.- Specified by:
isAnnotation
in interfaceClassMetadata
-
isAbstract
public boolean isAbstract()Description copied from interface:ClassMetadata
Return whether the underlying class is marked as abstract.- Specified by:
isAbstract
in interfaceClassMetadata
-
isFinal
public boolean isFinal()Description copied from interface:ClassMetadata
Return whether the underlying class is marked as 'final'.- Specified by:
isFinal
in interfaceClassMetadata
-
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 interfaceClassMetadata
-
getEnclosingClassName
Description copied from interface:ClassMetadata
Return the name of the enclosing class of the underlying class, ornull
if the underlying class is a top-level class.- Specified by:
getEnclosingClassName
in interfaceClassMetadata
-
getSuperClassName
Description copied from interface:ClassMetadata
Return the name of the superclass of the underlying class, ornull
if there is no superclass defined.- Specified by:
getSuperClassName
in interfaceClassMetadata
-
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 interfaceClassMetadata
-
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 interfaceClassMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
StandardAnnotationMetadata