public class StandardClassMetadata extends java.lang.Object implements ClassMetadata
ClassMetadata implementation that uses standard reflection
to introspect a given Class.| Constructor and Description |
|---|
StandardClassMetadata(java.lang.Class<?> introspectedClass)
Create a new StandardClassMetadata wrapper for the given Class.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClassName()
Return the name of the underlying class.
|
java.lang.String |
getEnclosingClassName()
Return the name of the enclosing class of the underlying class,
or
null if the underlying class is a top-level class. |
java.lang.String[] |
getInterfaceNames()
Return the names of all interfaces that the underlying class
implements, or an empty array if there are none.
|
java.lang.Class<?> |
getIntrospectedClass()
Return the underlying Class.
|
java.lang.String[] |
getMemberClassNames()
Return the names of all classes declared as members of the class represented by
this ClassMetadata object.
|
java.lang.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.
|
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.
|
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.
|
public StandardClassMetadata(java.lang.Class<?> introspectedClass)
introspectedClass - the Class to introspectpublic final java.lang.Class<?> getIntrospectedClass()
public java.lang.String getClassName()
ClassMetadatagetClassName in interface ClassMetadatapublic boolean isInterface()
ClassMetadataisInterface in interface ClassMetadatapublic boolean isAnnotation()
ClassMetadataisAnnotation in interface ClassMetadatapublic boolean isAbstract()
ClassMetadataisAbstract in interface ClassMetadatapublic boolean isConcrete()
ClassMetadataisConcrete in interface ClassMetadatapublic boolean isFinal()
ClassMetadataisFinal in interface ClassMetadatapublic boolean isIndependent()
ClassMetadataisIndependent in interface ClassMetadatapublic boolean hasEnclosingClass()
ClassMetadataIf this method returns false, then the underlying
class is a top-level class.
hasEnclosingClass in interface ClassMetadatapublic java.lang.String getEnclosingClassName()
ClassMetadatanull if the underlying class is a top-level class.getEnclosingClassName in interface ClassMetadatapublic boolean hasSuperClass()
ClassMetadatahasSuperClass in interface ClassMetadatapublic java.lang.String getSuperClassName()
ClassMetadatanull if there is no super class defined.getSuperClassName in interface ClassMetadatapublic java.lang.String[] getInterfaceNames()
ClassMetadatagetInterfaceNames in interface ClassMetadatapublic java.lang.String[] getMemberClassNames()
ClassMetadatagetMemberClassNames in interface ClassMetadata