|
|||||||||||
| 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. |
private static I18NHelper |
msg
I18N support |
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
private static I18NHelper msg
| 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 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 field
null if there is no such field.public JavaField[] getDeclaredJavaFields()
JavaType
getDeclaredJavaFields 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 AbstractJavaTypepublic JavaProperty[] getDeclaredJavaProperties()
JavaType
getDeclaredJavaProperties in interface JavaTypegetDeclaredJavaProperties in class AbstractJavaTypepublic java.lang.Class getJavaClass()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||