Package com.google.auto.common
Class SimpleAnnotationMirror
java.lang.Object
com.google.auto.common.SimpleAnnotationMirror
- All Implemented Interfaces:
AnnotationMirror
A simple implementation of the
AnnotationMirror
interface.
This type implements equals(Object)
and hashCode()
using AnnotationMirrors.equivalence()
in accordance with the AnnotationMirror
spec. Some AnnotationMirror
s, however, do not correctly implement equals, you should always compare them
using AnnotationMirrors.equivalence()
anyway.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeElement
private final com.google.common.collect.ImmutableMap
<ExecutableElement, ? extends AnnotationValue> private final com.google.common.collect.ImmutableMap
<String, ? extends AnnotationValue> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SimpleAnnotationMirror
(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Map
<ExecutableElement, ? extends AnnotationValue> int
hashCode()
static AnnotationMirror
of
(TypeElement annotationType) An object representing an annotation instance.static AnnotationMirror
of
(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues) An object representing an annotation instance.toString()
-
Field Details
-
annotationType
-
namedValues
-
elementValues
private final com.google.common.collect.ImmutableMap<ExecutableElement,? extends AnnotationValue> elementValues
-
-
Constructor Details
-
SimpleAnnotationMirror
private SimpleAnnotationMirror(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues)
-
-
Method Details
-
of
An object representing an annotation instance. IfannotationType
has any annotation members, they must have default values. -
of
public static AnnotationMirror of(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues) An object representing an annotation instance. IfannotationType
has any annotation members, they must either be present innamedValues
or have default values. -
getAnnotationType
- Specified by:
getAnnotationType
in interfaceAnnotationMirror
-
getElementValues
- Specified by:
getElementValues
in interfaceAnnotationMirror
-
toString
-
equals
-
hashCode
public int hashCode()
-