Class SyntheticAnnotationMirror
java.lang.Object
org.microbean.construct.element.SyntheticAnnotationMirror
- All Implemented Interfaces:
Constable, AnnotationMirror
An experimental
AnnotationMirror implementation that is partially or wholly synthetic.
It is possible to create SyntheticAnnotationMirror instances representing annotations that a Java compiler
will not produce. For example, annotations cannot refer to each
other, directly or indirectly, but two SyntheticAnnotationMirrors may do so.
- Author:
- Laird Nelson
- External Specifications
-
Constructor Summary
ConstructorsConstructorDescriptionSyntheticAnnotationMirror(TypeElement annotationTypeElement) Creates a newSyntheticAnnotationMirror.SyntheticAnnotationMirror(TypeElement annotationTypeElement, Map<? extends String, ?> values) Creates a newSyntheticAnnotationMirror. -
Method Summary
Modifier and TypeMethodDescriptionfinal Optional<? extends ConstantDesc> final DeclaredTypefinal Map<? extends ExecutableElement, ? extends AnnotationValue>
-
Constructor Details
-
SyntheticAnnotationMirror
Creates a newSyntheticAnnotationMirror.- Parameters:
annotationTypeElement- aTypeElementrepresenting an annotation type; must not benull; must returnANNOTATION_TYPEfrom itsgetKind()method;SyntheticAnnotationTypeElementimplementations are strongly preferred- Throws:
NullPointerException- ifannotationTypeElementisnullIllegalArgumentException- ifannotationTypeElementdoes not returnANNOTATION_TYPEfrom an invocation of itsgetKind()method, or ifvalueshas more entries in it thanannotationTypeElementhas anotation elements- See Also:
-
SyntheticAnnotationMirror
public SyntheticAnnotationMirror(TypeElement annotationTypeElement, Map<? extends String, ?> values) Creates a newSyntheticAnnotationMirror.- Parameters:
annotationTypeElement- aTypeElementrepresenting an annotation type; must not benull; must returnANNOTATION_TYPEfrom itsgetKind()method;SyntheticAnnotationTypeElementimplementations are strongly preferredvalues- aMapof annotation values indexed by annotation element name; must not benull; must contain only values that are permissible for annotation elements- Throws:
NullPointerException- if any argument isnullIllegalArgumentException- ifannotationTypeElementdoes not returnANNOTATION_TYPEfrom an invocation of itsgetKind()method, or ifvalueshas more entries in it thanannotationTypeElementhas anotation elements
-
-
Method Details
-
describeConstable
- Specified by:
describeConstablein interfaceConstable
-
getAnnotationType
- Specified by:
getAnnotationTypein interfaceAnnotationMirror
-
getElementValues
- Specified by:
getElementValuesin interfaceAnnotationMirror
-