Save This Page
Home » jdo2-model-2.3-ea-src » org.apache.jdo.impl.model.java » [javadoc | source]
org.apache.jdo.impl.model.java
abstract public class: AbstractJavaMember [javadoc | source]
java.lang.Object
   org.apache.jdo.impl.model.java.AbstractJavaMember

All Implemented Interfaces:
    JavaMember

Direct Known Subclasses:
    ReflectionJavaField, ReflectionJavaMethod, JavaPropertyImpl, BaseReflectionJavaField

Abstract super class for JavaMember implementations. It provides getters for the name and declaringClass properties which are initialized in the constructor.

A non-abstract subclass must implement methods #getModifiers() and #getType() .

Constructor:
 public AbstractJavaMember(String name,
    JavaType declaringClass) 
    Constructor setting the name and declaringClass property.
    Parameters:
    name - field name
    declaringClass - the JavaType of the class or interface that declares this JavaMember.
Method from org.apache.jdo.impl.model.java.AbstractJavaMember Summary:
equals,   getComponentType,   getDeclaringClass,   getModifiers,   getName,   getType,   hashCode,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jdo.impl.model.java.AbstractJavaMember Detail:
 public boolean equals(Object obj) 
    Indicates whether some other object is "equal to" this one.
 public 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. The method returns null, if the property type is not an array or collection.
 public JavaType getDeclaringClass() 
    Returns the JavaType instance representing the class or interface that declares the field represented by this JavaMember instance.
 abstract public int getModifiers()
    Returns the Java language modifiers for the member represented by this JavaMember, as an integer. The java.lang.reflect.Modifier class should be used to decode the modifiers.
 public String getName() 
    Returns the name of the field.
 abstract public JavaType getType()
    Returns the JavaType representation of the type of the memeber.
 public int hashCode() 
    Returns a hash code value for the object.

    This is computed as the exclusive-or of the hashcodes for the underlying field's declaring class name and its name.

 public String toString() 
    Returns a string representation of the object.