com.ibm.wsspi.anno.info
Interface ClassInfo
- public interface ClassInfo
- extends Info
Info type used to represent a class.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
EJB_EXCEPTION_CLASS_NAME
Naming constant: The qualified name of
javax.ejb.EJBException .
|
|
EXTERNALIZABLE_CLASS_NAME
Naming constant: The qualified name of
java.io.Externalizable .
|
|
OBJECT_CLASS_NAME
Naming constant: The qualified name of
java.lang.Object .
|
|
REMOTE_EXCEPTION_CLASS_NAME
Naming constant: The qualified name of
java.rmi.RemoteException .
|
|
SERIALIZABLE_CLASS_NAME
Naming constant: The qualified name of
java.io.Serializable .
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getDeclaredConstructors()
Answer the declared constructors of the receiver.
|
|
getDeclaredFields()
Answer the declared fields of the receiver.
|
|
getDeclaredMethods()
Answer the declared methods of the receiver.
|
|
getInterfaceNames()
Answer the names of the immediately declared interfaces of this
class object as a set.
|
|
getInterfaces()
Answer the immediately declared interfaces of this class object.
|
|
getMethods()
Answer the methods of the receiver.
|
getPackage()
Answer the package object of this class object.
|
|
|
getPackageName()
Answer the name of the package of this class object.
|
getSuperclass()
Answer the superclass of this class.
|
|
|
getSuperclassName()
Answer the name of the superclass of this class.
|
|
isAnnotationClass()
Tell if this class object is for an annotation class.
|
|
isArray()
Tell if this class object represents an array type.
|
|
isArtificial()
Tell if this class info was created to represent an unloadable class.
|
|
isAssignableFrom(java.lang.String className)
Tell if a variable of this type can be assigned a value having
a specified type, as specified by the name of the type.
|
|
isDelayedClass()
Tell if this class object is implemented as a delayed class (as opposed to
a non-delayed class).
|
|
isFieldAnnotationPresent()
Tell if this class object has an annotations on a field.
|
|
isInstanceOf(java.lang.Class<?> clazz)
|
|
isInstanceOf(java.lang.String className)
Tell if this type is a sub-type of another type.
|
|
isInterface()
Tell if this class object represents an interface (that is, is defined using the
keyword
interface , as opposed to representing a concrete (although possibly
abstract) class.
|
|
isJavaClass()
Tell if this class object encodes a distinguished java class.
|
|
isMethodAnnotationPresent()
Tell if this class object has an annotations on a method.
|
|
isNonDelayedClass()
Tell if this class object is implemented as a non-delayed class (as opposed to
a delayed class).
|
|
isPrimitive()
Tell if this class object represents a primitive type (for
example,
int ).
|
Methods inherited from interface com.ibm.wsspi.anno.info.Info |
---|
getAnnotation, getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotations, getHashText, getInfoStore, getModifiers, getName, getQualifiedName, isAnnotationPresent, isAnnotationPresent, isAnnotationWithin, isDeclaredAnnotationPresent, isDeclaredAnnotationPresent, isDeclaredAnnotationWithin, isPackagePrivate, isPrivate, isProtected, isPublic, log |
Field Detail
OBJECT_CLASS_NAME
- static final java.lang.String OBJECT_CLASS_NAME
SERIALIZABLE_CLASS_NAME
- static final java.lang.String SERIALIZABLE_CLASS_NAME
Naming constant: The qualified name of java.io.Serializable
.
EXTERNALIZABLE_CLASS_NAME
- static final java.lang.String EXTERNALIZABLE_CLASS_NAME
Naming constant: The qualified name of java.io.Externalizable
.
REMOTE_EXCEPTION_CLASS_NAME
- static final java.lang.String REMOTE_EXCEPTION_CLASS_NAME
Naming constant: The qualified name of java.rmi.RemoteException
.
EJB_EXCEPTION_CLASS_NAME
- static final java.lang.String EJB_EXCEPTION_CLASS_NAME
Naming constant: The qualified name of javax.ejb.EJBException
.
Method Detail
isArtificial
- boolean isArtificial()
Tell if this class info was created to represent an unloadable class. Stub values are assigned, and the interface and superclass values are forced.
isArray
- boolean isArray()
Tell if this class object represents an array type.
isPrimitive
- boolean isPrimitive()
Tell if this class object represents a primitive type (for
example, int
).
isDelayedClass
- boolean isDelayedClass()
Tell if this class object is implemented as a delayed class (as opposed to a non-delayed class).
A delayed class will have a backing non-delayed class. Whether a class object
is returned as a delayed or as a non-delayed class object is a detail of the
implementation. However, the expectation is that frequently used classes (for example,
classes from java.lang
are never returned as delayed classes. Very
likely, classes with annotations will not be returned as delayed classes.
isNonDelayedClass
- boolean isNonDelayedClass()
Tell if this class object is implemented as a non-delayed class (as opposed to a delayed class).
getPackageName
- java.lang.String getPackageName( )
Answer the name of the package of this class object.
Retrieval of the package name is preferred to retrieving the entire package object.
getPackage
- PackageInfo getPackage()
Answer the package object of this class object.
Retrieval of the package name is preferred to retrieving the entire package object.
isJavaClass
- boolean isJavaClass()
Tell if this class object encodes a distinguished java class. Which java classes
are distinguished is an implementation detail. (The current implementation distinguishes
all classes under java
, as well as all class under javax.ejb
and all classes under javax.servlet
.) Classes are distinguished
to assist in telling which classes are to be delayed.
isInterface
- boolean isInterface()
Tell if this class object represents an interface (that is, is defined using the
keyword interface
, as opposed to representing a concrete (although possibly
abstract) class.
getInterfaceNames
- java.util.List<java.lang.String> getInterfaceNames( )
Answer the names of the immediately declared interfaces of this class object as a set.
getInterfaces
- java.util.List<? extends ClassInfo> getInterfaces( )
Answer the immediately declared interfaces of this class object.
Retrieval of the interface names is preferred to retrieval of the class objects of the interfaces.
isAnnotationClass
- boolean isAnnotationClass()
Tell if this class object is for an annotation class. That is,
whether java.lang.annotation.Annotation
getSuperclassName
- java.lang.String getSuperclassName( )
Answer the name of the superclass of this class. An interface
has a null superclass name. The root class java.lang.Object
has a null superclass name. All other classes have a non-null
superclass name.
Retrieval of the superclass name is preferred to retrieving the superclass object.
java.lang.Object
getSuperclass
- ClassInfo getSuperclass()
Answer the superclass of this class. An interface has a null superclass.
The root class java.lang.Object
has a null superclass. All other
classes have a non-null
superclass name.
Retrieval of the superclass name is preferred to retrieving the superclass object.
java.lang.Object
isAssignableFrom
- boolean isAssignableFrom(java.lang.String className)
Tell if a variable of this type can be assigned a value having a specified type, as specified by the name of the type.
That is, is the type as represented by this class object coarser (the same or strictly coarser) than the specified type.
Assignment tests are the reverse of instance-of tests. That is, if type X is assignable from type Y, then Y is an instance of X. Conversely, if Y is an instance of X, then X is assignable from Y.
#isAssignableFrom(ClassInfo)
,
#isAssignableFrom(Class)
,
isInstanceOf(String)
,
#isInstanceOf(ClassInfo)
,
isInstanceOf(Class)
isInstanceOf
- boolean isInstanceOf(java.lang.String className)
Tell if this type is a sub-type of another type. The other type is specified by the name of the type.
That is, is the type as represented by this class object finer (the same or strictly finer) than the specified type.
Instance-of tests are the reverse of assignment tests. That is, if type X is an instance of type Y, then Y is assignable from of X. Conversely, if Y is assignable from X, then X is an instance of Y.
isInstanceOf
- boolean isInstanceOf(java.lang.Class<?> clazz)
getDeclaredFields
- java.util.List<? extends FieldInfo> getDeclaredFields( )
Answer the declared fields of the receiver.
The result collection does not support additions.
#getFields()
getDeclaredConstructors
- java.util.List<? extends MethodInfo> getDeclaredConstructors( )
Answer the declared constructors of the receiver.
The result collection does not support additions.
Note: The difference between #getDeclaredConstructor()
and #getConstructors()
is not clear, as constructors are not
inherited.
#getConstructors()
getDeclaredMethods
- java.util.List<? extends MethodInfo> getDeclaredMethods( )
Answer the declared methods of the receiver.
The result collection does not support additions.
getMethods
- java.util.List<? extends MethodInfo> getMethods( )
Answer the methods of the receiver. These are the methods, plus any acquired through inheritance.
The result collection does not support additions.
isFieldAnnotationPresent
- boolean isFieldAnnotationPresent( )
Tell if this class object has an annotations on a field. (Annotations other than declared annotations are those which are added as a result of applications of JSR250.)
isMethodAnnotationPresent
- boolean isMethodAnnotationPresent( )
Tell if this class object has an annotations on a method. (Annotations other than declared annotations are those which are added as a result of applications of JSR250.)
Naming constant: The qualified name of
java.lang.Object
.