|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.jpamodelgen.util.TypeUtils
public final class TypeUtils
Utility class.
Field Summary | |
---|---|
static String |
DEFAULT_ANNOTATION_PARAMETER_NAME
|
Method Summary | |
---|---|
static boolean |
containsAnnotation(Element element,
Class<?>... annotations)
|
static void |
determineAccessTypeForHierarchy(TypeElement searchedElement,
Context context)
|
static javax.persistence.AccessType |
determineAnnotationSpecifiedAccessType(Element element)
|
static String |
extractClosestRealTypeAsString(TypeMirror type,
Context context)
|
static AnnotationMirror |
getAnnotationMirror(Element element,
Class<? extends Annotation> clazz)
Checks whether the Element hosts an annotation of the specified class. |
static AnnotationMirror |
getAnnotationMirror(Element element,
String fqcn)
Checks whether the Element hosts the annotation with the given fully qualified class name. |
static Object |
getAnnotationValue(AnnotationMirror annotationMirror,
String parameterValue)
|
static TypeMirror |
getCollectionElementType(DeclaredType t,
String fqNameOfReturnedType,
String explicitTargetEntityName,
Context context)
|
static ElementKind |
getElementKindForAccessType(javax.persistence.AccessType accessType)
|
static String |
getKeyType(DeclaredType t,
Context context)
|
static TypeElement |
getSuperclassTypeElement(TypeElement element)
|
static boolean |
isAnnotationMirrorOfType(AnnotationMirror annotationMirror,
Class<? extends Annotation> clazz)
Returns true if the provided annotation type is of the same type as the provided class, false otherwise. |
static boolean |
isAnnotationMirrorOfType(AnnotationMirror annotationMirror,
String fqcn)
Returns true if the provided annotation type is of the same type as the provided class, false otherwise. |
static boolean |
isTypeElementOfType(TypeElement element,
Class<?> clazz)
|
static String |
toTypeString(TypeMirror type)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_ANNOTATION_PARAMETER_NAME
Method Detail |
---|
public static String toTypeString(TypeMirror type)
public static TypeElement getSuperclassTypeElement(TypeElement element)
public static String extractClosestRealTypeAsString(TypeMirror type, Context context)
public static boolean containsAnnotation(Element element, Class<?>... annotations)
public static boolean isAnnotationMirrorOfType(AnnotationMirror annotationMirror, Class<? extends Annotation> clazz)
true
if the provided annotation type is of the same type as the provided class, false
otherwise.
This method uses the string class names for comparison. See also http://www.retep.org/2009/02/getting-class-values-from-annotations.html
.
annotationMirror
- The annotation mirrorclazz
- the class name to check against
true
if the provided annotation type is of the same type as the provided class, false
otherwise.public static boolean isAnnotationMirrorOfType(AnnotationMirror annotationMirror, String fqcn)
true
if the provided annotation type is of the same type as the provided class, false
otherwise.
This method uses the string class names for comparison. See also http://www.retep.org/2009/02/getting-class-values-from-annotations.html
.
annotationMirror
- The annotation mirrorfqcn
- the fully qualified class name to check against
true
if the provided annotation type is of the same type as the provided class, false
otherwise.public static boolean isTypeElementOfType(TypeElement element, Class<?> clazz)
public static AnnotationMirror getAnnotationMirror(Element element, String fqcn)
Element
hosts the annotation with the given fully qualified class name.
element
- the element to check for the hosted annotationfqcn
- the fully qualified class name of the annotation to check for
Element
or null
in case
the TypeElement
does not host the specified annotation.public static AnnotationMirror getAnnotationMirror(Element element, Class<? extends Annotation> clazz)
Element
hosts an annotation of the specified class.
element
- the element to check for the hosted annotationclazz
- the annotation class to check for
Element
or null
in case
the TypeElement
does not host the specified annotation.public static Object getAnnotationValue(AnnotationMirror annotationMirror, String parameterValue)
public static void determineAccessTypeForHierarchy(TypeElement searchedElement, Context context)
public static TypeMirror getCollectionElementType(DeclaredType t, String fqNameOfReturnedType, String explicitTargetEntityName, Context context)
public static javax.persistence.AccessType determineAnnotationSpecifiedAccessType(Element element)
public static ElementKind getElementKindForAccessType(javax.persistence.AccessType accessType)
public static String getKeyType(DeclaredType t, Context context)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |