public class TypeUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TypeUtil.DataFormat |
static class |
TypeUtil.TypeWithFormat |
| Modifier and Type | Method and Description |
|---|---|
static TypeUtil.TypeWithFormat |
arrayFormat() |
static boolean |
equalTypes(org.jboss.jandex.Type type1,
org.jboss.jandex.Type type2) |
static boolean |
equalWrappedTypes(org.jboss.jandex.Type primitiveCandidate,
org.jboss.jandex.Type wrappedCandidate) |
static org.jboss.jandex.AnnotationInstance |
getAnnotation(org.jboss.jandex.AnnotationTarget annotationTarget,
org.jboss.jandex.DotName annotationName) |
static org.jboss.jandex.AnnotationInstance |
getAnnotation(org.jboss.jandex.ClassInfo field,
org.jboss.jandex.DotName annotationName) |
static org.jboss.jandex.AnnotationInstance |
getAnnotation(org.jboss.jandex.FieldInfo field,
org.jboss.jandex.DotName annotationName) |
static org.jboss.jandex.AnnotationInstance |
getAnnotation(org.jboss.jandex.Type type,
org.jboss.jandex.DotName annotationName) |
static Collection<org.jboss.jandex.AnnotationInstance> |
getAnnotations(org.jboss.jandex.AnnotationTarget type) |
static <T> T |
getAnnotationValue(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName)
Convenience method to retrieve the "value" parameter from an annotation bound to the target.
|
static <T> T |
getAnnotationValue(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName,
String propertyName)
Convenience method to retrieve the named parameter from an annotation bound to the target.
|
static <T> T |
getAnnotationValue(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName,
String propertyName,
T defaultValue)
Convenience method to retrieve the named parameter from an annotation bound to the target.
|
static org.jboss.jandex.Type |
getBound(org.jboss.jandex.WildcardType wct) |
static Class<?> |
getClass(String name) |
static Class<?> |
getClass(org.jboss.jandex.Type type) |
static org.jboss.jandex.ClassInfo |
getDeclaringClass(org.jboss.jandex.AnnotationTarget type) |
static org.jboss.jandex.DotName |
getName(org.jboss.jandex.Type type) |
static org.jboss.jandex.AnnotationInstance |
getSchemaAnnotation(org.jboss.jandex.AnnotationTarget annotationTarget) |
static org.jboss.jandex.AnnotationInstance |
getSchemaAnnotation(org.jboss.jandex.ClassInfo field) |
static org.jboss.jandex.AnnotationInstance |
getSchemaAnnotation(org.jboss.jandex.FieldInfo field) |
static org.jboss.jandex.AnnotationInstance |
getSchemaAnnotation(org.jboss.jandex.Type type) |
static TypeUtil.TypeWithFormat |
getTypeFormat(org.jboss.jandex.PrimitiveType primitiveType) |
static TypeUtil.TypeWithFormat |
getTypeFormat(org.jboss.jandex.Type classType) |
static boolean |
hasAnnotation(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName) |
static boolean |
isA(org.jboss.jandex.IndexView index,
org.jboss.jandex.Type testSubject,
org.jboss.jandex.Type testObject)
Test whether testSubject is an instanceof type test.
|
static boolean |
isPrimitiveWrapper(org.jboss.jandex.PrimitiveType primitive,
org.jboss.jandex.Type wrapped) |
static TypeUtil.TypeWithFormat |
objectFormat() |
static org.jboss.jandex.Type |
resolveWildcard(org.jboss.jandex.Type type) |
static org.jboss.jandex.Type |
resolveWildcard(org.jboss.jandex.WildcardType wildcardType) |
public static TypeUtil.TypeWithFormat getTypeFormat(org.jboss.jandex.PrimitiveType primitiveType)
public static TypeUtil.TypeWithFormat getTypeFormat(org.jboss.jandex.Type classType)
public static TypeUtil.TypeWithFormat arrayFormat()
public static TypeUtil.TypeWithFormat objectFormat()
public static Class<?> getClass(org.jboss.jandex.Type type) throws ClassNotFoundException
ClassNotFoundExceptionpublic static Class<?> getClass(String name) throws ClassNotFoundException
ClassNotFoundExceptionpublic static boolean isA(org.jboss.jandex.IndexView index,
org.jboss.jandex.Type testSubject,
org.jboss.jandex.Type testObject)
For example, test whether List is a Collection.
Attempts to work with both Jandex and using standard class.
index - Jandex indextestSubject - type to testtestObject - type to test againstpublic static org.jboss.jandex.DotName getName(org.jboss.jandex.Type type)
public static org.jboss.jandex.Type getBound(org.jboss.jandex.WildcardType wct)
public static org.jboss.jandex.Type resolveWildcard(org.jboss.jandex.WildcardType wildcardType)
public static org.jboss.jandex.Type resolveWildcard(org.jboss.jandex.Type type)
public static boolean equalTypes(org.jboss.jandex.Type type1,
org.jboss.jandex.Type type2)
public static boolean equalWrappedTypes(org.jboss.jandex.Type primitiveCandidate,
org.jboss.jandex.Type wrappedCandidate)
public static boolean isPrimitiveWrapper(org.jboss.jandex.PrimitiveType primitive,
org.jboss.jandex.Type wrapped)
public static org.jboss.jandex.AnnotationInstance getSchemaAnnotation(org.jboss.jandex.AnnotationTarget annotationTarget)
public static org.jboss.jandex.AnnotationInstance getSchemaAnnotation(org.jboss.jandex.ClassInfo field)
public static org.jboss.jandex.AnnotationInstance getSchemaAnnotation(org.jboss.jandex.FieldInfo field)
public static org.jboss.jandex.AnnotationInstance getSchemaAnnotation(org.jboss.jandex.Type type)
public static boolean hasAnnotation(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName)
public static org.jboss.jandex.AnnotationInstance getAnnotation(org.jboss.jandex.AnnotationTarget annotationTarget,
org.jboss.jandex.DotName annotationName)
public static <T> T getAnnotationValue(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName)
AnnotationValue.T - the type of the parameter being retrievedtarget - the target object annotated with the annotation named by annotationNameannotationName - name of the annotation from which to retrieve the valuepublic static <T> T getAnnotationValue(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName,
String propertyName)
AnnotationValue.T - the type of the parameter being retrievedtarget - the target object annotated with the annotation named by annotationNameannotationName - name of the annotation from which to retrieve the valuepropertyName - the name of the parameter/property in the annotationpublic static <T> T getAnnotationValue(org.jboss.jandex.AnnotationTarget target,
org.jboss.jandex.DotName annotationName,
String propertyName,
T defaultValue)
AnnotationValue.T - the type of the parameter being retrievedtarget - the target object annotated with the annotation named by annotationNameannotationName - name of the annotation from which to retrieve the valuepropertyName - the name of the parameter/property in the annotationdefaultValue - a default value to return if either the annotation or the value are missingpublic static Collection<org.jboss.jandex.AnnotationInstance> getAnnotations(org.jboss.jandex.AnnotationTarget type)
public static org.jboss.jandex.ClassInfo getDeclaringClass(org.jboss.jandex.AnnotationTarget type)
public static org.jboss.jandex.AnnotationInstance getAnnotation(org.jboss.jandex.Type type,
org.jboss.jandex.DotName annotationName)
public static org.jboss.jandex.AnnotationInstance getAnnotation(org.jboss.jandex.ClassInfo field,
org.jboss.jandex.DotName annotationName)
public static org.jboss.jandex.AnnotationInstance getAnnotation(org.jboss.jandex.FieldInfo field,
org.jboss.jandex.DotName annotationName)
Copyright © 2018–2019. All rights reserved.