AnnotationMirror interface.
This type implements equals(Object) and hashCode() using AnnotationMirrors#equivalence in accordance with the AnnotationMirror spec. Some AnnotationMirrors, however, do not correctly implement equals, you should always compare them
using AnnotationMirrors#equivalence anyway.
| Modifier and Type | Field and Description |
|---|---|
| private final TypeElement | |
| private final ImmutableMap | |
| private final ImmutableMap |
| Access | Constructor and Description |
|---|---|
| private | SimpleAnnotationMirror(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(@Nullable Object
the reference object with which to compare. other)Overrides java. |
| public DeclaredType | getAnnotationType()
Implements javax. |
| public Map | getElementValues()
Implements javax. |
| public int | |
| public static AnnotationMirror | |
| public static AnnotationMirror | of(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues)
An object representing an annotation instance. |
| public String |
| annotationType | back to summary |
|---|---|
| private final TypeElement annotationType | |
| elementValues | back to summary |
|---|---|
| private final ImmutableMap<ExecutableElement, ? extends AnnotationValue> elementValues | |
| namedValues | back to summary |
|---|---|
| private final ImmutableMap<String, ? extends AnnotationValue> namedValues | |
| SimpleAnnotationMirror | back to summary |
|---|---|
| private SimpleAnnotationMirror(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues) | |
| equals | back to summary |
|---|---|
| public boolean equals(@Nullable Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAnnotationType | back to summary |
|---|---|
| public DeclaredType getAnnotationType() Implements javax. Doc from javax. Returns the type of this annotation.
| |
| getElementValues | back to summary |
|---|---|
| public Map Implements javax. Doc from javax. Returns the values of this annotation's elements. This is returned in the form of a map that associates elements with their corresponding values. Only those elements with values explicitly present in the annotation are included, not those that are implicitly assuming their default values. The order of the map matches the order in which the values appear in the annotation's source.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| of | back to summary |
|---|---|
| public static AnnotationMirror of(TypeElement annotationType) An object representing an annotation instance. If
| |
| of | back to summary |
|---|---|
| public static AnnotationMirror of(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues) An object representing an annotation instance. If
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |