org.apache.jdo.impl.model.java.reflection
Class ReflectionJavaField
java.lang.Object
org.apache.jdo.impl.model.java.AbstractJavaMember
org.apache.jdo.impl.model.java.BaseReflectionJavaField
org.apache.jdo.impl.model.java.reflection.ReflectionJavaField
- All Implemented Interfaces:
- JavaElement, JavaField, JavaMember
- public class ReflectionJavaField
- extends BaseReflectionJavaField
A reflection based JavaField implementation used at runtime.
The implementation takes java.lang.reflect.Field
instances
to get Java related metadata about fields.
- Since:
- JDO 1.1
- Version:
- JDO 2.0
- Author:
- Michael Bouschen
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ReflectionJavaField
public ReflectionJavaField(java.lang.reflect.Field field,
JavaType declaringClass)
- Constructor for fields w/o JDO metadata.
- Parameters:
field
- the reflection field representation.declaringClass
- the JavaType of the class that declares the field.
ReflectionJavaField
public ReflectionJavaField(java.lang.String fieldName,
JavaType type,
JavaType declaringClass)
- Constructor for fields having JDO metadata.
- Parameters:
fieldName
- the name of the field.type
- the field type.declaringClass
- the JavaType of the class that declares the field.
getType
public JavaType getType()
- Returns the JavaType representation of the field type.
- Specified by:
getType
in interface JavaMember
- Overrides:
getType
in class BaseReflectionJavaField
- Returns:
- field type
getJavaTypeForClass
public JavaType getJavaTypeForClass(java.lang.Class clazz)
- Returns a JavaType instance for the specified Class object.
This method provides a hook such that ReflectionJavaField subclasses can
implement their own mapping of Class objects to JavaType instances.
Copyright © 2005 Apache Software Foundation. All Rights Reserved.