public class ProcessorInfo
extends java.lang.Object
Processor in the context
of annotation processor dispatch.
This class supports inclusion in a collection by implementing equals() and hashCode(). Its concept of identity is based on the class object of the Processor that it wraps; so, for instance, it is not possible to have a Set that contains more than one instance of a particular Processor class. In fact, it is possible to have more than one instance of a Processor if there are multiple build threads, but within the context of a particular dispatch manager, there will only be one of any given Processor class.
| Constructor and Description |
|---|
ProcessorInfo(javax.annotation.processing.Processor p)
Create a ProcessorInfo wrapping a particular Processor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
computeSupportedAnnotations(java.util.Set<javax.lang.model.element.TypeElement> annotations,
java.util.Set<javax.lang.model.element.TypeElement> result)
Compute the subset of
annotations that are described by annotationTypes,
and determine whether the processor should be called. |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getSupportedAnnotationTypesAsString() |
int |
hashCode() |
void |
reset()
Must be called at the beginning of a build to ensure that no information is
carried over from the previous build.
|
boolean |
supportsStar() |
java.lang.String |
toString() |
public ProcessorInfo(javax.annotation.processing.Processor p)
Processor.init(javax.annotation.processing.ProcessingEnvironment) must already have
been called). Its getSupportedXXX() methods will be called and the results will be cached.public boolean computeSupportedAnnotations(java.util.Set<javax.lang.model.element.TypeElement> annotations,
java.util.Set<javax.lang.model.element.TypeElement> result)
annotations that are described by annotationTypes,
and determine whether the processor should be called. A processor will be called if it has
any annotations to process, or if it supports "*", or if it was called in a previous round.
If the return value of this method is true once for a given processor, then it will always be true on
subsequent calls.annotations - a set of annotation typesresult - an empty modifiable set, which upon return will contain a subset of annotations, which may be empty but will not be null.public boolean supportsStar()
public void reset()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getSupportedAnnotationTypesAsString()