org.hibernate.reflection.java
Class JavaXMember

java.lang.Object
  extended by org.hibernate.reflection.java.JavaXMember
All Implemented Interfaces:
XAnnotatedElement, XMember
Direct Known Subclasses:
JavaXMethod

public abstract class JavaXMember
extends Object
implements XMember

Author:
Emmanuel Bernard

Constructor Summary
protected JavaXMember(Member member, Type type, TypeEnvironment env, JavaXFactory factory, org.hibernate.reflection.java.JavaXType xType)
           
 
Method Summary
 boolean equals(Object obj)
          Returns true if the underlying artefact is the same
<T extends java.lang.annotation.Annotation>
T
getAnnotation(Class<T> annotationType)
           
 java.lang.annotation.Annotation[] getAnnotations()
           
 XClass getClassOrElementClass()
          The type of this property's elements for arrays, the type of the property itself for everything else.
 Class<? extends Collection> getCollectionClass()
          The collection class for collections, null for others.
 XClass getElementClass()
          This property's type for simple properties, the type of its elements for arrays and collections.
protected  JavaXFactory getFactory()
           
protected  Type getJavaType()
           
 XClass getMapKey()
          The type of this map's key, or null for anything that is not a map.
protected  Member getMember()
           
 int getModifiers()
          Same modifiers as java.lang.Member#getModifiers()
abstract  String getName()
           
 XClass getType()
          This property's XClass.
protected  TypeEnvironment getTypeEnvironment()
           
 int hashCode()
           
<T extends java.lang.annotation.Annotation>
boolean
isAnnotationPresent(Class<T> annotationType)
           
 boolean isArray()
           
 boolean isCollection()
           
 boolean isTypeResolved()
           
 void setAccessible(boolean accessible)
           
 String toString()
           
protected static Type typeOf(Member member, TypeEnvironment env)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.hibernate.reflection.XMember
invoke
 
Methods inherited from interface org.hibernate.reflection.XAnnotatedElement
equals, getAnnotation, getAnnotations, isAnnotationPresent
 

Constructor Detail

JavaXMember

protected JavaXMember(Member member,
                      Type type,
                      TypeEnvironment env,
                      JavaXFactory factory,
                      org.hibernate.reflection.java.JavaXType xType)
Method Detail

typeOf

protected static Type typeOf(Member member,
                             TypeEnvironment env)

getType

public XClass getType()
Description copied from interface: XMember
This property's XClass.

Specified by:
getType in interface XMember

getName

public abstract String getName()
Specified by:
getName in interface XMember

getJavaType

protected Type getJavaType()

getTypeEnvironment

protected TypeEnvironment getTypeEnvironment()

getMember

protected Member getMember()

getCollectionClass

public Class<? extends Collection> getCollectionClass()
Description copied from interface: XMember
The collection class for collections, null for others.

Specified by:
getCollectionClass in interface XMember

getClassOrElementClass

public XClass getClassOrElementClass()
Description copied from interface: XMember
The type of this property's elements for arrays, the type of the property itself for everything else.

Specified by:
getClassOrElementClass in interface XMember

getElementClass

public XClass getElementClass()
Description copied from interface: XMember
This property's type for simple properties, the type of its elements for arrays and collections.

Specified by:
getElementClass in interface XMember

getMapKey

public XClass getMapKey()
Description copied from interface: XMember
The type of this map's key, or null for anything that is not a map.

Specified by:
getMapKey in interface XMember

isArray

public boolean isArray()
Specified by:
isArray in interface XMember

isCollection

public boolean isCollection()
Specified by:
isCollection in interface XMember

getModifiers

public int getModifiers()
Description copied from interface: XMember
Same modifiers as java.lang.Member#getModifiers()

Specified by:
getModifiers in interface XMember

isTypeResolved

public final boolean isTypeResolved()
Specified by:
isTypeResolved in interface XMember

setAccessible

public void setAccessible(boolean accessible)
Specified by:
setAccessible in interface XMember

getFactory

protected JavaXFactory getFactory()

getAnnotation

public <T extends java.lang.annotation.Annotation> T getAnnotation(Class<T> annotationType)
Specified by:
getAnnotation in interface XAnnotatedElement

isAnnotationPresent

public <T extends java.lang.annotation.Annotation> boolean isAnnotationPresent(Class<T> annotationType)
Specified by:
isAnnotationPresent in interface XAnnotatedElement

getAnnotations

public java.lang.annotation.Annotation[] getAnnotations()
Specified by:
getAnnotations in interface XAnnotatedElement

equals

public boolean equals(Object obj)
Description copied from interface: XAnnotatedElement
Returns true if the underlying artefact is the same

Specified by:
equals in interface XAnnotatedElement
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object