|
||||||||||
| 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
public class 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 | |
|---|---|
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. |
| 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 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 java.lang.Class getJavaClass()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||