java.lang.Object
org.microbean.lang.element.AnnotationMirror
- All Implemented Interfaces:
AnnotationMirror
A mutable implementation of the
AnnotationMirror interface.- Author:
- Laird Nelson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal DeclaredTypefinal Map<? extends ExecutableElement, ? extends AnnotationValue> inthashCode()static final AnnotationMirrorof(AnnotationMirror am) Returns anAnnotationMirrorrepresenting the suppliedAnnotationMirror.final voidInstalls anAnnotationValuethat corresponds to the suppliedExecutableElement.final voidsetAnnotationType(DeclaredType annotationType) Sets thisAnnotationMirror's associatedDeclaredType.final voidsetElementValues(Map<? extends ExecutableElement, ? extends AnnotationValue> evs) Bulk installsAnnotationValues corresponding toExecutableElements.
-
Constructor Details
-
AnnotationMirror
public AnnotationMirror()Creates a newAnnotationMirror.
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationTypein interfaceAnnotationMirror
-
setAnnotationType
Sets thisAnnotationMirror's associatedDeclaredType.- Parameters:
annotationType- the type; must not benull; must returnDECLAREDfrom itsgetKind()method- Throws:
NullPointerException- if the affiliated type has already been set and the suppliedannotationTypeisnullIllegalStateException- if the suppliedannotationTypeis not identical to the one already set
-
getElementValues
- Specified by:
getElementValuesin interfaceAnnotationMirror
-
putElementValue
Installs anAnnotationValuethat corresponds to the suppliedExecutableElement.- Parameters:
ee- theExecutableElement; may (uselessly) benullav- theAnnotationValue; may benull
-
setElementValues
Bulk installsAnnotationValues corresponding toExecutableElements.- Parameters:
evs- the new element values; must not benull- Throws:
NullPointerException- ifevsisnull
-
hashCode
public int hashCode() -
equals
-
of
Returns anAnnotationMirrorrepresenting the suppliedAnnotationMirror.- Parameters:
am- theAnnotationMirrorto convert or otherwise represent; if it is already anAnnotationMirrorit is simply returned; must not benull- Returns:
- an
AnnotationMirror; nevernull - Throws:
NullPointerException- ifamisnull
-