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 typepublic 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