public abstract class AbstractJavaMember extends java.lang.Object implements JavaMember
A non-abstract subclass must implement methods
getModifiers() and getType().
| Constructor and Description |
|---|
AbstractJavaMember(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 |
getComponentType()
Returns the JavaType representation of the component type of the type
of the property, if the property type is an array or collection.
|
JavaType |
getDeclaringClass()
Returns the JavaType instance representing the class or interface
that declares the field represented by this JavaMember instance.
|
abstract int |
getModifiers()
Returns the Java language modifiers for the member represented by
this JavaMember, as an integer.
|
java.lang.String |
getName()
Returns the name of the field.
|
abstract JavaType |
getType()
Returns the JavaType representation of the type of the memeber.
|
int |
hashCode()
Returns a hash code value for the object.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUnderlyingObjectpublic AbstractJavaMember(java.lang.String name,
JavaType declaringClass)
name - field namedeclaringClass - the JavaType of the class or interface that
declares this JavaMember.public java.lang.String getName()
getName in interface JavaMemberpublic JavaType getDeclaringClass()
getDeclaringClass in interface JavaMemberpublic abstract int getModifiers()
getModifiers in interface JavaMemberModifierpublic abstract JavaType getType()
getType in interface JavaMemberpublic JavaType getComponentType()
null, if the property type is not an array
or collection.getComponentType in interface JavaMemberpublic 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 JavaMember.
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.