public abstract class AbstractJavaField extends java.lang.Object implements JavaField
null.
A non-abstract subclass must implement methods
getModifiers() and getType(). Note, this
implementation of method getJDOField() always returns
null, so a subclass may want to override this method.
| Constructor and Description |
|---|
AbstractJavaField(java.lang.String name,
JavaType declaringClass)
Constructor setting the name and declaringClass property.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
JavaType |
getDeclaringClass()
Returns the JavaType instance representing the class or interface
that declares the field represented by this JavaField instance.
|
JDOField |
getJDOField()
Returns the corresponding JDOField instance, if the JDOModel
provides any JDO metadata for the field represented by this
JavaField.
|
abstract int |
getModifiers()
Returns the Java language modifiers for the field represented by
this JavaField, as an integer.
|
java.lang.String |
getName()
Returns the name of the field.
|
abstract JavaType |
getType()
Returns the JavaType representation of the field type.
|
int |
hashCode()
Returns a hash code value for the object.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public AbstractJavaField(java.lang.String name,
JavaType declaringClass)
name - field namedeclaringClass - the JavaType of the class or interface that
declares this JavaField.public java.lang.String getName()
public abstract int getModifiers()
getModifiers in interface JavaFieldModifierpublic abstract JavaType getType()
public JavaType getDeclaringClass()
getDeclaringClass in interface JavaFieldpublic JDOField getJDOField()
null.
This implementation always returns null.
getJDOField in interface JavaFieldnull otherwise.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.
This implementation matches the declaring class and the name of the specified object to the declaring class and the name of this JavaField.
true if this object is the same as the obj
argument; false otherwise.public int hashCode()
This is computed as the exclusive-or of the hashcodes for the underlying field's declaring class name and its name.
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.