Package com.google.auto.common
Class SimpleAnnotationMirror
- java.lang.Object
-
- com.google.auto.common.SimpleAnnotationMirror
-
- All Implemented Interfaces:
javax.lang.model.element.AnnotationMirror
public final class SimpleAnnotationMirror extends java.lang.Object implements javax.lang.model.element.AnnotationMirrorA 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(@Nullable java.lang.Object other)javax.lang.model.type.DeclaredTypegetAnnotationType()java.util.Map<javax.lang.model.element.ExecutableElement,? extends javax.lang.model.element.AnnotationValue>getElementValues()inthashCode()static javax.lang.model.element.AnnotationMirrorof(javax.lang.model.element.TypeElement annotationType)An object representing an annotation instance.static javax.lang.model.element.AnnotationMirrorof(javax.lang.model.element.TypeElement annotationType, java.util.Map<java.lang.String,? extends javax.lang.model.element.AnnotationValue> namedValues)An object representing an annotation instance.java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static javax.lang.model.element.AnnotationMirror of(javax.lang.model.element.TypeElement annotationType)
An object representing an annotation instance. IfannotationTypehas any annotation members, they must have default values.
-
of
public static javax.lang.model.element.AnnotationMirror of(javax.lang.model.element.TypeElement annotationType, java.util.Map<java.lang.String,? extends javax.lang.model.element.AnnotationValue> namedValues)An object representing an annotation instance. IfannotationTypehas any annotation members, they must either be present innamedValuesor have default values.
-
getAnnotationType
public javax.lang.model.type.DeclaredType getAnnotationType()
- Specified by:
getAnnotationTypein interfacejavax.lang.model.element.AnnotationMirror
-
getElementValues
public java.util.Map<javax.lang.model.element.ExecutableElement,? extends javax.lang.model.element.AnnotationValue> getElementValues()
- Specified by:
getElementValuesin interfacejavax.lang.model.element.AnnotationMirror
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-