- java.lang.Object
-
- de.codecamp.messages.processor.LangModelUtils
-
public class LangModelUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description LangModelUtils()
-
Method Summary
-
-
-
Method Detail
-
getSuperclassType
public static Optional<TypeElement> getSuperclassType(TypeElement type)
-
getInterfaceTypes
public static List<TypeElement> getInterfaceTypes(TypeElement type)
-
getTypeNesting
public static List<TypeElement> getTypeNesting(TypeElement typeElement)
-
getEnclosingTypeElement
public static TypeElement getEnclosingTypeElement(Element element)
-
getPackage
public static PackageElement getPackage(Element element)
-
getDeclaredFields
public static List<VariableElement> getDeclaredFields(TypeElement element)
-
getDeclaredMethods
public static List<ExecutableElement> getDeclaredMethods(TypeElement element)
-
getEnumConstants
public static List<VariableElement> getEnumConstants(TypeElement enumTypeElement)
-
findDeclaredBeanProperties
public static Map<String,ExecutableElement> findDeclaredBeanProperties(TypeElement beanTypeElement)
-
findFirstMetaAnnotation
public static <A extends Annotation> Optional<A> findFirstMetaAnnotation(Element element, Class<A> metaAnnotationType)
-
findMetaAnnotations
public static <A extends Annotation> List<A> findMetaAnnotations(Element element, Class<A> metaAnnotationType)
-
getAnnotationMirror
public static AnnotationMirror getAnnotationMirror(Element element, Class<? extends Annotation> annotationType)
-
getAnnotationMirrors
public static Set<AnnotationMirror> getAnnotationMirrors(Element element, Class<? extends Annotation> annotationType)
-
getAnnotationValue
public static AnnotationValue getAnnotationValue(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAs
public static <T> T getAnnotationValueAs(AnnotationMirror annotationMirror, String key, Class<T> type, T defaultValue)
-
getAnnotationValuesAs
public static <T> List<T> getAnnotationValuesAs(AnnotationMirror annotationMirror, String key, Class<T> type, List<T> defaultValue)
-
getAnnotationValuesAs
public static <T> List<T> getAnnotationValuesAs(AnnotationMirror annotationMirror, String key, Class<T> listElementType)
-
getAnnotationValues
public static List<AnnotationValue> getAnnotationValues(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAsType
public static TypeElement getAnnotationValueAsType(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAsTypes
public static List<TypeElement> getAnnotationValueAsTypes(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAsAnnotationMirrors
public static List<AnnotationMirror> getAnnotationValueAsAnnotationMirrors(AnnotationMirror annotationMirror, String key)
-
findComposedAnnotationTypes
public static <A extends TypeElement> Set<A> findComposedAnnotationTypes(Set<A> processedAnnotations, Class<? extends Annotation> metaAnnotationType, boolean includeMetaAnnotation)
-
-