|
||||||||||
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
org.apache.jdo.impl.model.java.reflection.ReflectionJavaType
public abstract class ReflectionJavaType
/**
A reflection based JavaType implementation used at runtime.
The implementation takes java.lang.Class
and
java.lang.reflect.Field
instances to get Java related
metadata about types and fields.
Field Summary |
---|
Fields inherited from class org.apache.jdo.impl.model.java.BaseReflectionJavaType |
---|
clazz, superclass |
Constructor Summary | |
---|---|
ReflectionJavaType(java.lang.Class clazz,
JDOModel jdoModel)
Constructor. |
Method Summary | |
---|---|
JavaField |
createJavaField(JDOField jdoField,
JavaType type)
RegisterClassListener calls this method to create a ReflectionJavaField instance when processing the enhancer generated metadata. |
JavaType |
getArrayComponentType()
Returns the JavaType representing the component type of an array. |
JavaField |
getDeclaredJavaField(java.lang.String fieldName)
Returns a JavaField instance that reflects the declared field with the specified name of the class or interface represented by this JavaType instance. |
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. |
protected abstract JavaType |
getJavaTypeInternal(java.lang.Class clazz)
Returns a JavaType instance for the specified Class object. |
JDOClass |
getJDOClass()
Returns the JDOClass instance if this JavaType represents a persistence capable class. |
JavaType |
getSuperclass()
Returns the JavaType representing the superclass of the entity represented by this JavaType. |
boolean |
isArray()
Determines if this JavaType object represents an array type. |
boolean |
isPersistenceCapable()
Returns true if this JavaType represents a persistence
capable class. |
Methods inherited from class org.apache.jdo.impl.model.java.BaseReflectionJavaType |
---|
getJavaClass, getModifiers, getName, isCompatibleWith, isInterface |
Methods inherited from class org.apache.jdo.impl.model.java.AbstractJavaType |
---|
equals, hashCode, isFloatingPoint, isIntegral, isJDOSupportedCollection, isJDOSupportedMap, isOrderable, isPrimitive, isTrackable, isValue, isWrapperClass, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReflectionJavaType(java.lang.Class clazz, JDOModel jdoModel)
Method Detail |
---|
public boolean isArray()
isArray
in interface JavaType
isArray
in class AbstractJavaType
true
if this object represents an array type;
false
otherwise.public boolean isPersistenceCapable() throws ModelFatalException
true
if this JavaType represents a persistence
capable class.
A ModelFatalException
indicates a
problem accessing the JDO meta data for this JavaType.
isPersistenceCapable
in interface JavaType
isPersistenceCapable
in class AbstractJavaType
true
if this JavaType represents a persistence
capable class; false
otherwise.
ModelFatalException
- if there is a problem accessing the
JDO metadatapublic 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 BaseReflectionJavaType
public JDOClass getJDOClass() throws ModelFatalException
null
,
if this JavaType does not represent a persistence capable class.
A ModelFatalException
indicates a
problem accessing the JDO meta data for this JavaType.
getJDOClass
in interface JavaType
getJDOClass
in class AbstractJavaType
null
otherwise.
ModelFatalException
- if there is a problem accessing the
JDO metadatapublic JavaType getArrayComponentType()
null
.
getArrayComponentType
in interface JavaType
getArrayComponentType
in class AbstractJavaType
null
otherwise.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 BaseReflectionJavaType
fieldName
- the name of the field
null
if there is no such field.public JavaField createJavaField(JDOField jdoField, JavaType type)
jdoField
- the JDO field metadatatype
- the type of the field
public JavaField getDeclaredJavaField(java.lang.String fieldName)
null
, if the
class or interface does not declared a field with that name. It does
not check whether one of its superclasses declared such a field.
fieldName
- the name of the field
protected abstract JavaType getJavaTypeInternal(java.lang.Class clazz)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |