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 |
|---|---|
JavaField[] |
getDeclaredJavaFields()
Returns an array of JavaField instances representing the declared
fields of the class represented by this JavaType instance.
|
JavaProperty[] |
getDeclaredJavaProperties()
Returns an array of JavaProperty instances representing the declared
properties of the class represented by this JavaType instance.
|
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.
|
JavaProperty |
getJavaProperty(java.lang.String name)
Returns a JavaProperty instance that reflects the property 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.
|
java.lang.Object |
getUnderlyingObject()
Returns the environment specific instance wrapped by this JavaModel
element.
|
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 java.lang.Object getUnderlyingObject()
java.lang.Class instance for this JavaType.getUnderlyingObject in interface JavaElementgetUnderlyingObject in class AbstractJavaTypepublic 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 JavaField[] getDeclaredJavaFields()
JavaTypegetDeclaredJavaFields in interface JavaTypegetDeclaredJavaFields in class AbstractJavaTypepublic JavaProperty getJavaProperty(java.lang.String name)
JavaTypenull, if the
class or interface (or one of its superclasses) does not have a
property with that name.getJavaProperty in interface JavaTypegetJavaProperty in class AbstractJavaTypename - the name of the propertynull if there is no such property.public JavaProperty[] getDeclaredJavaProperties()
JavaTypegetDeclaredJavaProperties in interface JavaTypegetDeclaredJavaProperties in class AbstractJavaTypepublic java.lang.Class getJavaClass()
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.