Package de.codecamp
Class ProcessorUtils
- java.lang.Object
-
- de.codecamp.ProcessorUtils
-
public class ProcessorUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ProcessorUtils(ProcessingEnvironment processingEnv)
-
Method Summary
-
-
-
Constructor Detail
-
ProcessorUtils
public ProcessorUtils(ProcessingEnvironment processingEnv)
-
-
Method Detail
-
getOptionAsEnum
public <T extends Enum<T>> T getOptionAsEnum(String name, Class<T> enumType, T defaultValue)
-
getGeneratedAnnotation
public static TypeElement getGeneratedAnnotation(Elements elements, SourceVersion sourceVersion)
-
getPackage
public static PackageElement getPackage(Element element)
-
getDeclaredMethods
public static List<ExecutableElement> getDeclaredMethods(TypeElement element)
-
getDeclaredFields
public static List<VariableElement> getDeclaredFields(TypeElement element)
-
getEnumConstants
public static List<VariableElement> getEnumConstants(TypeElement enumTypeElement)
-
getTypeNesting
public static List<TypeElement> getTypeNesting(TypeElement typeElement)
-
getEnclosingTypeElement
public static TypeElement getEnclosingTypeElement(Element element)
-
getElementsAnnotatedWith
public Set<? extends Element> getElementsAnnotatedWith(RoundEnvironment roundEnv, Class<? extends Annotation> annotationType)
If the annotation is repeatable, this method will also find elements with the container annotation.
-
getAnnotationMirror
public static AnnotationMirror getAnnotationMirror(Element element, Class<? extends Annotation> annotationType)
-
getAnnotationMirrors
public Set<AnnotationMirror> getAnnotationMirrors(Element element, Class<? extends Annotation> annotationType)
-
getAnnotationValue
public AnnotationValue getAnnotationValue(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAs
public <T> T getAnnotationValueAs(AnnotationMirror annotationMirror, String key, Class<T> type, T defaultValue)
-
getAnnotationValuesAs
public <T> List<T> getAnnotationValuesAs(AnnotationMirror annotationMirror, String key, Class<T> listElementType)
-
getAnnotationValues
public List<AnnotationValue> getAnnotationValues(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAsType
public TypeElement getAnnotationValueAsType(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAsTypes
public List<TypeElement> getAnnotationValueAsTypes(AnnotationMirror annotationMirror, String key)
-
getAnnotationValueAsAnnotationMirrors
public 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)
-
findMetaAnnotation
public static <A extends Annotation> A findMetaAnnotation(Element element, Class<A> annotationType)
-
findMetaAnnotations
public static <A extends Annotation> List<A> findMetaAnnotations(Element element, Class<A> annotationType)
-
findMetaAnnotationsWithSource
public static <A extends Annotation> Map<AnnotationMirror,A> findMetaAnnotationsWithSource(Element element, Class<A> annotationType)
-
getSourceOutputPath
public Path getSourceOutputPath()
-
getClassOutputPath
public Path getClassOutputPath()
-
findBeanProperties
public List<org.apache.commons.lang3.tuple.Triple<String,String,ExecutableElement>> findBeanProperties(TypeElement beanTypeElement)
-
-