|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jdo.impl.model.java.AbstractJavaField
public abstract class AbstractJavaField
Abstract super class for JavaField implementations.
It provides getters for the name and declaringClass properties which are
initialized in the constructor. The implementation of method getJDOField
always returns 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 Summary | |
|---|---|
AbstractJavaField(java.lang.String name,
JavaType declaringClass)
Constructor setting the name and declaringClass property. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractJavaField(java.lang.String name,
JavaType declaringClass)
name - field namedeclaringClass - the JavaType of the class or interface that
declares this JavaField.| Method Detail |
|---|
public java.lang.String getName()
getName in interface JavaFieldpublic abstract int getModifiers()
getModifiers in interface JavaFieldModifierpublic abstract JavaType getType()
getType in interface JavaFieldpublic 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.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||