Class JavaXMember
- java.lang.Object
-
- org.hibernate.annotations.common.reflection.java.JavaXMember
-
- All Implemented Interfaces:
XAnnotatedElement,XMember
- Direct Known Subclasses:
JavaXMethod
public abstract class JavaXMember extends Object implements XMember
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJavaXMember(Member member, Type type, TypeEnvironment env, JavaReflectionManager factory, org.hibernate.annotations.common.reflection.java.JavaXType xType)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Returns true if the underlying artefact is the same<T extends Annotation>
TgetAnnotation(Class<T> annotationType)Annotation[]getAnnotations()XClassgetClassOrElementClass()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.XClassgetDeclaringClass()Retrieve the XClass reference for the class which declares this member.XClassgetElementClass()This property's type for simple properties, the type of its elements for arrays and collections.protected JavaReflectionManagergetFactory()TypegetJavaType()XClassgetMapKey()The type of this map's key, or null for anything that is not a map.MembergetMember()intgetModifiers()Same modifiers as java.lang.Member#getModifiers()abstract StringgetName()XClassgetType()This property's XClass.protected TypeEnvironmentgetTypeEnvironment()inthashCode()<T extends Annotation>
booleanisAnnotationPresent(Class<T> annotationType)booleanisArray()booleanisCollection()booleanisTypeResolved()voidsetAccessible(boolean accessible)StringtoString()protected static TypetypeOf(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.XAnnotatedElement
equals, getAnnotation, getAnnotations, isAnnotationPresent
-
-
-
-
Constructor Detail
-
JavaXMember
protected JavaXMember(Member member, Type type, TypeEnvironment env, JavaReflectionManager factory, org.hibernate.annotations.common.reflection.java.JavaXType xType)
-
-
Method Detail
-
typeOf
protected static Type typeOf(Member member, TypeEnvironment env)
-
getJavaType
public Type getJavaType()
-
getTypeEnvironment
protected TypeEnvironment getTypeEnvironment()
-
getMember
public Member getMember()
-
getDeclaringClass
public XClass getDeclaringClass()
Description copied from interface:XMemberRetrieve the XClass reference for the class which declares this member.- Specified by:
getDeclaringClassin interfaceXMember- Returns:
- The XClass representing the declaring class of the underlying member
-
getCollectionClass
public Class<? extends Collection> getCollectionClass()
Description copied from interface:XMemberThe collection class for collections, null for others.- Specified by:
getCollectionClassin interfaceXMember
-
getClassOrElementClass
public XClass getClassOrElementClass()
Description copied from interface:XMemberThe type of this property's elements for arrays, the type of the property itself for everything else.- Specified by:
getClassOrElementClassin interfaceXMember
-
getElementClass
public XClass getElementClass()
Description copied from interface:XMemberThis property's type for simple properties, the type of its elements for arrays and collections.- Specified by:
getElementClassin interfaceXMember
-
getMapKey
public XClass getMapKey()
Description copied from interface:XMemberThe type of this map's key, or null for anything that is not a map.
-
isCollection
public boolean isCollection()
- Specified by:
isCollectionin interfaceXMember
-
getModifiers
public int getModifiers()
Description copied from interface:XMemberSame modifiers as java.lang.Member#getModifiers()- Specified by:
getModifiersin interfaceXMember
-
isTypeResolved
public final boolean isTypeResolved()
- Specified by:
isTypeResolvedin interfaceXMember
-
setAccessible
public void setAccessible(boolean accessible)
- Specified by:
setAccessiblein interfaceXMember
-
getFactory
protected JavaReflectionManager getFactory()
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
- Specified by:
getAnnotationin interfaceXAnnotatedElement
-
isAnnotationPresent
public <T extends Annotation> boolean isAnnotationPresent(Class<T> annotationType)
- Specified by:
isAnnotationPresentin interfaceXAnnotatedElement
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfaceXAnnotatedElement
-
equals
public boolean equals(Object obj)
Description copied from interface:XAnnotatedElementReturns true if the underlying artefact is the same- Specified by:
equalsin interfaceXAnnotatedElement- Overrides:
equalsin classObject
-
-