org.hibernate.annotations.common.reflection.java
Class JavaXMember

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

public abstract class JavaXMember
extends java.lang.Object
implements XMember

Author:
Emmanuel Bernard

Constructor Summary
protected JavaXMember(java.lang.reflect.Member member, java.lang.reflect.Type type, TypeEnvironment env, JavaReflectionManager factory, org.hibernate.annotations.common.reflection.java.JavaXType xType)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if the underlying artefact is the same
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.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.
 java.lang.Class<? extends java.util.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  JavaReflectionManager getFactory()
           
protected  java.lang.reflect.Type getJavaType()
           
 XClass getMapKey()
          The type of this map's key, or null for anything that is not a map.
protected  java.lang.reflect.Member getMember()
           
 int getModifiers()
          Same modifiers as java.lang.Member#getModifiers()
abstract  java.lang.String getName()
           
 XClass getType()
          This property's XClass.
protected  TypeEnvironment getTypeEnvironment()
           
 int hashCode()
           
<T extends java.lang.annotation.Annotation>
boolean
isAnnotationPresent(java.lang.Class<T> annotationType)
           
 boolean isArray()
           
 boolean isCollection()
           
 boolean isTypeResolved()
           
 void setAccessible(boolean accessible)
           
 java.lang.String toString()
           
protected static java.lang.reflect.Type typeOf(java.lang.reflect.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.annotations.common.reflection.XMember
invoke
 
Methods inherited from interface org.hibernate.annotations.common.reflection.XAnnotatedElement
equals, getAnnotation, getAnnotations, isAnnotationPresent
 

Constructor Detail

JavaXMember

protected JavaXMember(java.lang.reflect.Member member,
                      java.lang.reflect.Type type,
                      TypeEnvironment env,
                      JavaReflectionManager factory,
                      org.hibernate.annotations.common.reflection.java.JavaXType xType)
Method Detail

typeOf

protected static java.lang.reflect.Type typeOf(java.lang.reflect.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 java.lang.String getName()
Specified by:
getName in interface XMember

getJavaType

protected java.lang.reflect.Type getJavaType()

getTypeEnvironment

protected TypeEnvironment getTypeEnvironment()

getMember

protected java.lang.reflect.Member getMember()

getCollectionClass

public java.lang.Class<? extends java.util.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 JavaReflectionManager getFactory()

getAnnotation

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

isAnnotationPresent

public <T extends java.lang.annotation.Annotation> boolean isAnnotationPresent(java.lang.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(java.lang.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 java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2010 Hibernate.org. All Rights Reserved.