public class AnnotationProcessors extends Object
Do your worst! :-)
Modifier and Type | Method and Description |
---|---|
static String |
extractAnnotationStringValue(Elements elementUtils,
AnnotationMirror annotation,
CharSequence paramName)
Retrieves a string parameter value from an annotation.
|
static AnnotationMirror |
getAnnotation(Element target,
CharSequence annotationQualifiedName) |
static TypeElement |
getEnclosingTypeElement(Element element) |
static boolean |
hasAnnotation(Element target,
CharSequence annotationQualifiedName) |
public static boolean hasAnnotation(Element target, CharSequence annotationQualifiedName)
public static AnnotationMirror getAnnotation(Element target, CharSequence annotationQualifiedName)
public static String extractAnnotationStringValue(Elements elementUtils, AnnotationMirror annotation, CharSequence paramName)
elements
- Reference to the element utilities see
ProcessingEnvironment.getElementUtils()
.annotation
- The annotation to retrieve the parameter value from.paramName
- the name of the annotation parameter to retrieve.public static TypeElement getEnclosingTypeElement(Element element)
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.