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 AnnotationMirrors, however, do not correctly implement equals, you should always compare them
using AnnotationMirrors.equivalence() anyway.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeElementprivate final com.google.common.collect.ImmutableMap<ExecutableElement, ? extends AnnotationValue> private final com.google.common.collect.ImmutableMap<String, ? extends AnnotationValue> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSimpleAnnotationMirror(TypeElement annotationType, Map<String, ? extends AnnotationValue> namedValues) -
Method Summary
Modifier and TypeMethodDescriptionbooleanMap<ExecutableElement, ? extends AnnotationValue> inthashCode()static AnnotationMirrorof(TypeElement annotationType) An object representing an annotation instance.static AnnotationMirrorof(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. IfannotationTypehas 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. IfannotationTypehas any annotation members, they must either be present innamedValuesor have default values. -
getAnnotationType
- Specified by:
getAnnotationTypein interfaceAnnotationMirror
-
getElementValues
- Specified by:
getElementValuesin interfaceAnnotationMirror
-
toString
-
equals
-
hashCode
-