public class TypeAnnotationUtils extends Object
AnnotationUtils
Modifier and Type | Method and Description |
---|---|
static com.sun.tools.javac.code.Attribute |
attributeFromAnnotationValue(ProcessingEnvironment env,
ExecutableElement meth,
AnnotationValue av)
Returns a newly created Attribute corresponding to an argument AnnotationValue.
|
static com.sun.tools.javac.code.TypeAnnotationPosition |
classExtendsTAPosition(int implidx,
int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
copyTAPosition(com.sun.tools.javac.code.TypeAnnotationPosition tapos) |
static com.sun.tools.javac.code.Attribute.Compound |
createCompoundFromAnnotationMirror(ProcessingEnvironment env,
AnnotationMirror am)
Returns a newly created Attribute.Compound corresponding to an argument AnnotationMirror.
|
static com.sun.tools.javac.code.Attribute.TypeCompound |
createTypeCompoundFromAnnotationMirror(ProcessingEnvironment env,
AnnotationMirror am,
com.sun.tools.javac.code.TypeAnnotationPosition tapos)
Returns a newly created Attribute.TypeCompound corresponding to an argument AnnotationMirror.
|
static com.sun.tools.javac.code.TypeAnnotationPosition |
fieldTAPosition(int pos) |
static boolean |
isSameTAPosition(com.sun.tools.javac.code.TypeAnnotationPosition p1,
com.sun.tools.javac.code.TypeAnnotationPosition p2)
Compare two TypeAnnotationPositions for equality.
|
static boolean |
isSameTAPositionExceptTreePos(com.sun.tools.javac.code.TypeAnnotationPosition p1,
com.sun.tools.javac.code.TypeAnnotationPosition p2) |
static boolean |
isTypeCompoundContained(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.
|
static com.sun.tools.javac.code.TypeAnnotationPosition |
methodParameterTAPosition(int pidx,
int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
methodReceiverTAPosition(int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
methodReturnTAPosition(int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
methodThrowsTAPosition(int tidx,
int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
methodTypeParameterBoundTAPosition(int tpidx,
int bndidx,
int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
methodTypeParameterTAPosition(int tpidx,
int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
typeParameterBoundTAPosition(int tpidx,
int bndidx,
int pos) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
typeParameterTAPosition(int tpidx,
int pos) |
static com.sun.tools.javac.code.Type |
unannotatedType(TypeMirror in) |
static com.sun.tools.javac.code.TypeAnnotationPosition |
unknownTAPosition() |
public static boolean isTypeCompoundContained(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 TypeCompoundstc
- the TypeCompound to findpublic static boolean isSameTAPosition(com.sun.tools.javac.code.TypeAnnotationPosition p1, com.sun.tools.javac.code.TypeAnnotationPosition p2)
p1
- the first positionp2
- the second positionpublic static boolean isSameTAPositionExceptTreePos(com.sun.tools.javac.code.TypeAnnotationPosition p1, com.sun.tools.javac.code.TypeAnnotationPosition p2)
public static com.sun.tools.javac.code.Attribute.Compound createCompoundFromAnnotationMirror(ProcessingEnvironment env, AnnotationMirror am)
am
- an AnnotationMirror, which may be part of an AST or an internally created subclasspublic static com.sun.tools.javac.code.Attribute.TypeCompound createTypeCompoundFromAnnotationMirror(ProcessingEnvironment env, AnnotationMirror am, com.sun.tools.javac.code.TypeAnnotationPosition tapos)
am
- an AnnotationMirror, which may be part of an AST or an internally created subclasstapos
- the type annotation position to usepublic static com.sun.tools.javac.code.Attribute attributeFromAnnotationValue(ProcessingEnvironment env, ExecutableElement meth, AnnotationValue av)
meth
- the ExecutableElement that is assigned the value, needed for empty arraysav
- an AnnotationValue, which may be part of an AST or an internally created subclasspublic static com.sun.tools.javac.code.TypeAnnotationPosition unknownTAPosition()
public static com.sun.tools.javac.code.TypeAnnotationPosition methodReturnTAPosition(int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition methodReceiverTAPosition(int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition methodParameterTAPosition(int pidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition methodThrowsTAPosition(int tidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition fieldTAPosition(int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition classExtendsTAPosition(int implidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition typeParameterTAPosition(int tpidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition methodTypeParameterTAPosition(int tpidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition typeParameterBoundTAPosition(int tpidx, int bndidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition methodTypeParameterBoundTAPosition(int tpidx, int bndidx, int pos)
public static com.sun.tools.javac.code.TypeAnnotationPosition copyTAPosition(com.sun.tools.javac.code.TypeAnnotationPosition tapos)
public static com.sun.tools.javac.code.Type unannotatedType(TypeMirror in)