java.lang.Object
org.microbean.lang.element.AnnotationMirror
- All Implemented Interfaces:
AnnotationMirror
A mutable implementation of the
AnnotationMirror
interface.- Author:
- Laird Nelson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
final DeclaredType
final Map
<? extends ExecutableElement, ? extends AnnotationValue> int
hashCode()
static final AnnotationMirror
of
(AnnotationMirror am) Returns anAnnotationMirror
representing the suppliedAnnotationMirror
.final void
Installs anAnnotationValue
that corresponds to the suppliedExecutableElement
.final void
setAnnotationType
(DeclaredType annotationType) Sets thisAnnotationMirror
's associatedDeclaredType
.final void
setElementValues
(Map<? extends ExecutableElement, ? extends AnnotationValue> evs) Bulk installsAnnotationValue
s corresponding toExecutableElement
s.
-
Constructor Details
-
AnnotationMirror
public AnnotationMirror()Creates a newAnnotationMirror
.
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationType
in interfaceAnnotationMirror
-
setAnnotationType
Sets thisAnnotationMirror
's associatedDeclaredType
.- Parameters:
annotationType
- the type; must not benull
; must returnDECLARED
from itsgetKind()
method- Throws:
NullPointerException
- if the affiliated type has already been set and the suppliedannotationType
isnull
IllegalStateException
- if the suppliedannotationType
is not identical to the one already set
-
getElementValues
- Specified by:
getElementValues
in interfaceAnnotationMirror
-
putElementValue
Installs anAnnotationValue
that corresponds to the suppliedExecutableElement
.- Parameters:
ee
- theExecutableElement
; may (uselessly) benull
av
- theAnnotationValue
; may benull
-
setElementValues
Bulk installsAnnotationValue
s corresponding toExecutableElement
s.- Parameters:
evs
- the new element values; must not benull
- Throws:
NullPointerException
- ifevs
isnull
-
hashCode
public int hashCode() -
equals
-
of
Returns anAnnotationMirror
representing the suppliedAnnotationMirror
.- Parameters:
am
- theAnnotationMirror
to convert or otherwise represent; if it is already anAnnotationMirror
it is simply returned; must not benull
- Returns:
- an
AnnotationMirror
; nevernull
- Throws:
NullPointerException
- ifam
isnull
-