类 StandardClassMetadata
- java.lang.Object
- org.springframework.core.type.StandardClassMetadata
- 所有已实现的接口:
ClassMetadata
- 直接已知子类:
StandardAnnotationMetadata
public class StandardClassMetadata extends Object implements ClassMetadata
ClassMetadata
implementation that uses standard reflection to introspect a givenClass
.- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 StandardClassMetadata(Class<?> introspectedClass)
已过时。since 5.2 in favor ofStandardAnnotationMetadata
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getClassName()
Return the name of the underlying class.String
getEnclosingClassName()
Return the name of the enclosing class of the underlying class, ornull
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 super class of the underlying class, ornull
if there is no super class defined.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. whether it is a top-level class or a nested class (static inner class) that can be constructed independently from an enclosing class.boolean
isInterface()
Return whether the underlying class represents an interface.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.core.type.ClassMetadata
hasEnclosingClass, hasSuperClass, isConcrete
构造器详细资料
StandardClassMetadata
@Deprecated public StandardClassMetadata(Class<?> introspectedClass)
已过时。since 5.2 in favor ofStandardAnnotationMetadata
Create a new StandardClassMetadata wrapper for the given Class.- 参数:
introspectedClass
- the Class to introspect
方法详细资料
getIntrospectedClass
public final Class<?> getIntrospectedClass()
Return the underlying Class.
getClassName
public String getClassName()
从接口复制的说明:ClassMetadata
Return the name of the underlying class.- 指定者:
getClassName
在接口中ClassMetadata
isInterface
public boolean isInterface()
从接口复制的说明:ClassMetadata
Return whether the underlying class represents an interface.- 指定者:
isInterface
在接口中ClassMetadata
isAnnotation
public boolean isAnnotation()
从接口复制的说明:ClassMetadata
Return whether the underlying class represents an annotation.- 指定者:
isAnnotation
在接口中ClassMetadata
isAbstract
public boolean isAbstract()
从接口复制的说明:ClassMetadata
Return whether the underlying class is marked as abstract.- 指定者:
isAbstract
在接口中ClassMetadata
isFinal
public boolean isFinal()
从接口复制的说明:ClassMetadata
Return whether the underlying class is marked as 'final'.- 指定者:
isFinal
在接口中ClassMetadata
isIndependent
public boolean isIndependent()
从接口复制的说明: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 from an enclosing class.- 指定者:
isIndependent
在接口中ClassMetadata
getEnclosingClassName
@Nullable public String getEnclosingClassName()
从接口复制的说明:ClassMetadata
Return the name of the enclosing class of the underlying class, ornull
if the underlying class is a top-level class.- 指定者:
getEnclosingClassName
在接口中ClassMetadata
getSuperClassName
@Nullable public String getSuperClassName()
从接口复制的说明:ClassMetadata
Return the name of the super class of the underlying class, ornull
if there is no super class defined.- 指定者:
getSuperClassName
在接口中ClassMetadata
getInterfaceNames
public String[] getInterfaceNames()
从接口复制的说明:ClassMetadata
Return the names of all interfaces that the underlying class implements, or an empty array if there are none.- 指定者:
getInterfaceNames
在接口中ClassMetadata
getMemberClassNames
public String[] getMemberClassNames()
从接口复制的说明: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.- 指定者:
getMemberClassNames
在接口中ClassMetadata