public class TypeAnnotationUtils
extends java.lang.Object
AnnotationUtils
Modifier and Type | Method and Description |
---|---|
static com.sun.tools.javac.code.Attribute |
attributeFromAnnotationValue(javax.annotation.processing.ProcessingEnvironment env,
javax.lang.model.element.ExecutableElement meth,
javax.lang.model.element.AnnotationValue av)
Returns a newly created Attribute corresponding to an argument
AnnotationValue.
|
static com.sun.tools.javac.code.Attribute.Compound |
createCompoundFromAnnotationMirror(javax.annotation.processing.ProcessingEnvironment env,
javax.lang.model.element.AnnotationMirror am)
Returns a newly created Attribute.Compound corresponding to an
argument AnnotationMirror.
|
static com.sun.tools.javac.code.Attribute.TypeCompound |
createTypeCompoundFromAnnotationMirror(javax.annotation.processing.ProcessingEnvironment env,
javax.lang.model.element.AnnotationMirror am,
com.sun.tools.javac.code.TypeAnnotationPosition tapos)
Returns a newly created Attribute.TypeCompound corresponding to an
argument AnnotationMirror.
|
static boolean |
isSameTAPosition(com.sun.tools.javac.code.TypeAnnotationPosition p1,
com.sun.tools.javac.code.TypeAnnotationPosition p2)
Compare two TypeAnnotationPositions for equality.
|
static boolean |
isTypeCompoundContained(javax.lang.model.util.Types types,
com.sun.tools.javac.util.List<com.sun.tools.javac.code.Attribute.TypeCompound> list,
com.sun.tools.javac.code.Attribute.TypeCompound tc)
Check whether a TypeCompound is contained in a list of TypeCompounds.
|
public static boolean isTypeCompoundContained(javax.lang.model.util.Types types, com.sun.tools.javac.util.List<com.sun.tools.javac.code.Attribute.TypeCompound> list, com.sun.tools.javac.code.Attribute.TypeCompound tc)
list
- The input list of TypeCompounds.tc
- The TypeCompound to find.public static boolean isSameTAPosition(com.sun.tools.javac.code.TypeAnnotationPosition p1, com.sun.tools.javac.code.TypeAnnotationPosition p2)
p1
- The first position.p2
- The second position.public static com.sun.tools.javac.code.Attribute.Compound createCompoundFromAnnotationMirror(javax.annotation.processing.ProcessingEnvironment env, javax.lang.model.element.AnnotationMirror am)
am
- an AnnotationMirror, which may be part of an AST or an internally
created subclass.public static com.sun.tools.javac.code.Attribute.TypeCompound createTypeCompoundFromAnnotationMirror(javax.annotation.processing.ProcessingEnvironment env, javax.lang.model.element.AnnotationMirror am, com.sun.tools.javac.code.TypeAnnotationPosition tapos)
am
- an AnnotationMirror, which may be part of an AST or an internally
created subclass.tapos
- the type annotation position to use.public static com.sun.tools.javac.code.Attribute attributeFromAnnotationValue(javax.annotation.processing.ProcessingEnvironment env, javax.lang.model.element.ExecutableElement meth, javax.lang.model.element.AnnotationValue av)
meth
- the ExecutableElement that is assigned the value, needed for empty arrays.av
- an AnnotationValue, which may be part of an AST or an internally
created subclass.