Package com.google.auto.common
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
ConstructorsModifierConstructorDescriptionprivate -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) static BasicAnnotationProcessor.ElementNameforAnnotatedElement(Element element) AnBasicAnnotationProcessor.ElementNamefor an annotated element.(package private) static BasicAnnotationProcessor.ElementNameforPackageName(String packageName) AnBasicAnnotationProcessor.ElementNamefor a package.(package private) static BasicAnnotationProcessor.ElementNameforTypeName(String typeName) AnBasicAnnotationProcessor.ElementNamefor a type.(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
-
forPackageName
AnBasicAnnotationProcessor.ElementNamefor a package. -
forTypeName
AnBasicAnnotationProcessor.ElementNamefor a type. -
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
public int hashCode()
-