Package com.google.auto.common
Class SimpleAnnotationMirror
- java.lang.Object
-
- com.google.auto.common.SimpleAnnotationMirror
-
- All Implemented Interfaces:
AnnotationMirror
public final class SimpleAnnotationMirror extends Object implements AnnotationMirror
A simple implementation of theAnnotationMirror
interface.This type implements
equals(Object)
andhashCode()
usingAnnotationMirrors.equivalence()
in accordance with theAnnotationMirror
spec. SomeAnnotationMirror
s, however, do not correctly implement equals, you should always compare them usingAnnotationMirrors.equivalence()
anyway.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
DeclaredType
getAnnotationType()
Map<ExecutableElement,? extends AnnotationValue>
getElementValues()
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.String
toString()
-
-
-
Method Detail
-
of
public static AnnotationMirror of(TypeElement annotationType)
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
public DeclaredType getAnnotationType()
- Specified by:
getAnnotationType
in interfaceAnnotationMirror
-
getElementValues
public Map<ExecutableElement,? extends AnnotationValue> getElementValues()
- Specified by:
getElementValues
in interfaceAnnotationMirror
-
-