public abstract class ReflectionJavaType extends BaseReflectionJavaType
java.lang.Class
and
java.lang.reflect.Field
instances to get Java related
metadata about types and fields.clazz, superclass
Constructor and Description |
---|
ReflectionJavaType(java.lang.Class clazz,
JDOModel jdoModel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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. |
getJavaClass, getModifiers, getName, isCompatibleWith, isInterface
equals, hashCode, isFloatingPoint, isIntegral, isJDOSupportedCollection, isJDOSupportedMap, isOrderable, isPrimitive, isTrackable, isValue, isWrapperClass, toString
public ReflectionJavaType(java.lang.Class clazz, JDOModel jdoModel)
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 fieldnull
if there is no such field.public JavaField createJavaField(JDOField jdoField, JavaType type)
jdoField
- the JDO field metadatatype
- the type of the fieldpublic 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 fieldprotected abstract JavaType getJavaTypeInternal(java.lang.Class clazz)
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.