Class BasicAnnotationProcessor.ElementName
java.lang.Object
com.google.auto.common.BasicAnnotationProcessor.ElementName
- Enclosing class:
BasicAnnotationProcessor
A package or type name.
It's unfortunate that we have to track types and packages separately, but since there are
two different methods to look them up in Elements, we end up with a lot of parallel
logic. :(
Packages declared (and annotated) in package-info.java are tracked as deferred
packages, type elements are tracked directly, and all other elements are tracked via their
nearest enclosing type.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BasicAnnotationProcessor.ElementName.Kindprivate final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateElementName(BasicAnnotationProcessor.ElementName.Kind kind, Name name) -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) static BasicAnnotationProcessor.ElementNameforAnnotatedElement(Element element) AnBasicAnnotationProcessor.ElementNamefor an annotated element.(package private) com.google.common.base.Optional<? extends Element> getElement(Elements elements) inthashCode()(package private) Stringname()The fully-qualified name of the element.
-
Field Details
-
kind
-
name
-
-
Constructor Details
-
ElementName
-
-
Method Details
-
forAnnotatedElement
AnBasicAnnotationProcessor.ElementNamefor an annotated element. Ifelementis a package, uses the fully qualified name of the package. If it's a type, uses its fully qualified name. Otherwise, uses the fully-qualified name of the nearest enclosing type. -
name
String name()The fully-qualified name of the element. -
getElement
-
equals
-
hashCode
-