public class BaseReflectionJavaType extends AbstractJavaType
Note, BaseReflectionJavaType must not be used for array types, since it inherits the default implemention of methods isArray and getArrayComponentType from its superclass AbstractJavaType.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class |
clazz
The java.lang.Class instance for this BaseReflectionJavaType.
|
protected JavaType |
superclass
The superclass JavaType.
|
| Constructor and Description |
|---|
BaseReflectionJavaType(java.lang.Class clazz,
JavaType superclass)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class |
getJavaClass()
Returns the java.lang.Class instance wrapped by this JavaType.
|
JavaField |
getJavaField(java.lang.String fieldName)
Returns a JavaField instance that reflects the field with the
specified name of the class or interface represented by this
JavaType instance.
|
int |
getModifiers()
Returns the Java language modifiers for the field represented by
this JavaType, as an integer.
|
java.lang.String |
getName()
Returns the name of the type.
|
JavaType |
getSuperclass()
Returns the JavaType representing the superclass of the entity
represented by this JavaType.
|
boolean |
isCompatibleWith(JavaType javaType)
Returns true if this JavaType is compatible with the specified
JavaType.
|
boolean |
isInterface()
Determines if this JavaType object represents an interface type.
|
equals, getArrayComponentType, getJDOClass, hashCode, isArray, isFloatingPoint, isIntegral, isJDOSupportedCollection, isJDOSupportedMap, isOrderable, isPersistenceCapable, isPrimitive, isTrackable, isValue, isWrapperClass, toStringprotected java.lang.Class clazz
protected JavaType superclass
public BaseReflectionJavaType(java.lang.Class clazz,
JavaType superclass)
null. Theclazz - the Class instance representing the typesuperclass - JavaType instance representing the superclass.public boolean isInterface()
isInterface in interface JavaTypeisInterface in class AbstractJavaTypetrue if this object represents an interface type;
false otherwise.public boolean isCompatibleWith(JavaType javaType)
isCompatibleWith in interface JavaTypeisCompatibleWith in class AbstractJavaTypejavaType - the type this JavaType is checked with.true if this is compatible with the specified
type; false otherwise.public java.lang.String getName()
getName in interface JavaTypegetName in class AbstractJavaTypepublic int getModifiers()
getModifiers in interface JavaTypegetModifiers in class AbstractJavaTypepublic JavaType getSuperclass()
void,
then null is returned. If this object represents an
array class then the JavaType instance representing the Object class
is returned.getSuperclass in interface JavaTypegetSuperclass in class AbstractJavaTypepublic JavaField getJavaField(java.lang.String fieldName)
null, if the
class or interface (or one of its superclasses) does not have a
field with that name.getJavaField in interface JavaTypegetJavaField in class AbstractJavaTypefieldName - the name of the fieldnull if there is no such field.public java.lang.Class getJavaClass()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.