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 theAnnotationMirrorinterface.This type implements
equals(Object)andhashCode()usingAnnotationMirrors.equivalence()in accordance with theAnnotationMirrorspec. SomeAnnotationMirrors, 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 booleanequals(Object other)DeclaredTypegetAnnotationType()Map<ExecutableElement,? extends AnnotationValue>getElementValues()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.StringtoString()
-
-
-
Method Detail
-
of
public static AnnotationMirror of(TypeElement annotationType)
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
public DeclaredType getAnnotationType()
- Specified by:
getAnnotationTypein interfaceAnnotationMirror
-
getElementValues
public Map<ExecutableElement,? extends AnnotationValue> getElementValues()
- Specified by:
getElementValuesin interfaceAnnotationMirror
-
-