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.Kind
private final String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
-
Method Summary
Modifier and TypeMethodDescriptionboolean
(package private) static BasicAnnotationProcessor.ElementName
forAnnotatedElement
(Element element) AnBasicAnnotationProcessor.ElementName
for an annotated element.(package private) static BasicAnnotationProcessor.ElementName
forPackageName
(String packageName) AnBasicAnnotationProcessor.ElementName
for a package.(package private) static BasicAnnotationProcessor.ElementName
forTypeName
(String typeName) AnBasicAnnotationProcessor.ElementName
for a type.(package private) com.google.common.base.Optional<? extends Element>
getElement
(Elements elements) int
hashCode()
(package private) String
name()
The fully-qualified name of the element.
-
Field Details
-
kind
-
name
-
-
Constructor Details
-
ElementName
-
-
Method Details
-
forPackageName
AnBasicAnnotationProcessor.ElementName
for a package. -
forTypeName
AnBasicAnnotationProcessor.ElementName
for a type. -
forAnnotatedElement
AnBasicAnnotationProcessor.ElementName
for an annotated element. Ifelement
is 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()
-