|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.model.java.AbstractJavaType
org.apache.jdo.impl.model.java.BaseReflectionJavaType
This class provides a basic JavaType implementation using a reflection Class instance.
Note, BaseReflectionJavaType must not be used for array types, since it inherits the default implemention of methods isArray and getArrayComponentType from its superclass AbstractJavaType.
Field Summary | |
protected java.lang.Class |
clazz
The java.lang.Class instance for this BaseReflectionJavaType. |
protected JavaType |
superclass
The superclass JavaType. |
Constructor Summary | |
BaseReflectionJavaType(java.lang.Class clazz,
JavaType superclass)
Constructor. |
Method Summary | |
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. |
Methods inherited from class org.apache.jdo.impl.model.java.AbstractJavaType |
equals, getArrayComponentType, getJDOClass, hashCode, isArray, isFloatingPoint, isIntegral, isJDOSupportedCollection, isJDOSupportedMap, isOrderable, isPersistenceCapable, isPrimitive, isTrackable, isValue, isWrapperClass, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.Class clazz
protected JavaType superclass
Constructor Detail |
public BaseReflectionJavaType(java.lang.Class clazz, JavaType superclass)
null
. The
clazz
- the Class instance representing the typesuperclass
- JavaType instance representing the superclass.Method Detail |
public java.lang.Object getUnderlyingObject()
java.lang.Class
instance for this JavaType.
getUnderlyingObject
in interface JavaElement
getUnderlyingObject
in class AbstractJavaType
public boolean isInterface()
isInterface
in interface JavaType
isInterface
in class AbstractJavaType
true
if this object represents an interface type;
false
otherwise.public boolean isCompatibleWith(JavaType javaType)
isCompatibleWith
in interface JavaType
isCompatibleWith
in class AbstractJavaType
javaType
- 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 JavaType
getName
in class AbstractJavaType
public int getModifiers()
getModifiers
in interface JavaType
getModifiers
in class AbstractJavaType
public 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 JavaType
getSuperclass
in class AbstractJavaType
public 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 JavaType
getJavaField
in class AbstractJavaType
fieldName
- the name of the field
null
if there is no such field.public JavaField[] getDeclaredJavaFields()
JavaType
getDeclaredJavaFields
in interface JavaType
getDeclaredJavaFields
in class AbstractJavaType
public JavaProperty getJavaProperty(java.lang.String name)
JavaType
null
, if the
class or interface (or one of its superclasses) does not have a
property with that name.
getJavaProperty
in interface JavaType
getJavaProperty
in class AbstractJavaType
public JavaProperty[] getDeclaredJavaProperties()
JavaType
getDeclaredJavaProperties
in interface JavaType
getDeclaredJavaProperties
in class AbstractJavaType
public java.lang.Class getJavaClass()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |