AnnotationMirror
instances.ArrayType
if the TypeMirror
represents a primitive array or
throws an IllegalArgumentException
.DeclaredType
if the TypeMirror
represents a declared type such
as a class, interface, union/compound, or enum or throws an IllegalArgumentException
.Types.asElement(javax.lang.model.type.TypeMirror)
that does not require a Types
instance with the notable difference that it will throw IllegalArgumentException
instead of returning null if the TypeMirror
can not be converted to an Element
.ExecutableType
if the TypeMirror
represents an executable type such
as may result from missing code, or bad compiles or throws an IllegalArgumentException
.Element
instance as ExecutableElement
.ExecutableType
if the TypeMirror
represents an executable type such
as a method, constructor, or initializer or throws an IllegalArgumentException
.VariableElement
parameter to a method or constructor based on the given
container, or a member of a class.NoType
if the TypeMirror
represents an non-type such
as void, or package, etc.NullType
if the TypeMirror
represents the null type
or throws an IllegalArgumentException
.Element
instance as PackageElement
.PrimitiveType
if the TypeMirror
represents a primitive type
or throws an IllegalArgumentException
.Element
instance as TypeElement
.TypeVariable
if the TypeMirror
represents a type variable
or throws an IllegalArgumentException
.Element
instance as VariableElement
.WildcardType
if the TypeMirror
represents a wildcard type
or throws an IllegalArgumentException
.AutoFactory
annotations.ServiceLoader
.AutoService
annotations and generates the service provider
configuration files described in ServiceLoader
.AutoValue.Builder
is applied to is
nested inside an @AutoValue
class.@AutoValue
class, defined by one of its abstract methods.AutoFactory
API.AutoService
API.AutoValue
API.Equivalence
for AnnotationMirror
as some implementations
delegate equality tests to Object.equals(java.lang.Object)
whereas the documentation explicitly
states that instance/reference equality is not the proper test.Element
which are themselves annotated with annotationType
.ExecutableElement
and its associated AnnotationValue
if such
an element was either declared in the usage represented by the provided
AnnotationMirror
, or if such an element was defined with a default.AnnotationMirror
for the annotation of type annotationClass
on
element
, or Optional.absent()
if no such annotation exists.AnnotationValue
for the named element if such an element was
either declared in the usage represented by the provided AnnotationMirror
, or if
such an element was defined with a default.AnnotationMirror
's map of AnnotationValue
indexed by
ExecutableElement
, supplying default values from the annotation if the
annotation property has not been set.@AutoValue
class.Elements.getPackageOf(javax.lang.model.element.Element)
that does not require an
Elements
instance.Predicate
that can be used to filter elements by Modifier
.Predicate
that can be used to filter elements by Modifier
.true
iff the given element has an AnnotationMirror
whose
annotation type has the same canonical name
as that of annotationClass
.Element
instance is a TypeElement
.TypeMirror
represents a type that can
be referenced by a Class
.TypeMirror
represents the
same raw type as the given Class
and throws an IllegalArgumentException if the
TypeMirror
does not represent a type that can be referenced by a Class
Element
instances.TypeMirror
instances.Element
.AutoService
Verify the AutoService
interface value is correct
Categorize the class by its service interface
For each AutoService
interface
Create a file named META-INF/services/<interface>
For each AutoService
annotated class for this interface
Create an entry in the file
Provider
in a generated factory.TypeMirror
.Element
instances and ensures that all type information
is present and resolvable.Element
: public
, protected
,
private
or default/package-private.Copyright © 2017 Google, Inc.. All Rights Reserved.