public class ElementAnnotationApplier extends Object
| Constructor and Description |
|---|
ElementAnnotationApplier() |
| Modifier and Type | Method and Description |
|---|---|
static void |
annotateSupers(List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes,
TypeElement subtypeElement)
Annotate the list of supertypes using the annotations on the TypeElement representing a class or interface
|
static void |
apply(AnnotatedTypeMirror type,
Element element,
AnnotatedTypeFactory typeFactory)
Add all of the relevant annotations stored in Element to type.
|
static Pair<VariableTree,LambdaExpressionTree> |
getParamAndLambdaTree(VariableElement varEle,
AnnotatedTypeFactory typeFactory)
Helper method to get the lambda tree for ParamApplier.
|
public static void apply(AnnotatedTypeMirror type, Element element, AnnotatedTypeFactory typeFactory)
TypesIntoElements). Subsequent, calls to apply will encounter
these annotations on the provided element.
Note: This is not the ONLY place that annotations are explicitly added to types.
See TypeFromTree.type - The type to which we wish to apply the element's annotationselement - An element that possibly contains annotationstypeFactory - The typeFactory used to create the given type.public static void annotateSupers(List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes, TypeElement subtypeElement)
supertypes - Types representing supertype declarations of TypeElementsubtypeElement - An element representing the declaration of the class which is a subtype of supertypespublic static Pair<VariableTree,LambdaExpressionTree> getParamAndLambdaTree(VariableElement varEle, AnnotatedTypeFactory typeFactory)
varEle - The element that may represent a lambda's parameter