Top Fields Constructors Methods
org.kordamp.jipsy.processor

public abstract Class AbstractSpiProcessor

extends AbstractProcessor
Class Inheritance
Known Direct Subclasses
org.kordamp.jipsy.processor.service.ServiceProviderProcessor, org.kordamp.jipsy.processor.sisu.SisuIndexProviderProcessor, org.kordamp.jipsy.processor.type.TypeProviderProcessor
Imports
org.kordamp.jipsy.processor.service.ServiceProviderProcessor, javax.annotation.processing.AbstractProcessor, .ProcessingEnvironment, .RoundEnvironment, javax.lang.model.element.*, javax.lang.model.type.DeclaredType, .TypeMirror, javax.lang.model.util.ElementFilter, .Types, javax.tools.Diagnostic, .FileObject, .StandardLocation, java.io.IOException, java.lang.annotation.Annotation, java.util.*, java.util.regex.Pattern

Author
Andres Almiray

Field Summary

Modifier and TypeField and Description
protected Logger
protected Options
protected static final Pattern
Inherited from javax.annotation.processing.AbstractProcessor:
processingEnv

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static boolean
protected void
protected void
protected String
protected static List<AnnotationMirror>
protected Collection<AnnotationValue>
protected AnnotationValue
protected abstract Class<? extends Annotation>
protected void
protected abstract void
protected boolean
hasModifier(Element element, Modifier modifier)

protected boolean
public synchronized void
init(ProcessingEnvironment
environment to access facilities the tool framework provides to the processor
environment
)

Overrides javax.annotation.processing.AbstractProcessor.init.

Implements javax.annotation.processing.Processor.init.

Initializes the processor with the processing environment.

protected void
protected boolean
protected boolean
isAssignable(TypeMirror currentClass, TypeMirror type)

protected CheckResult
protected boolean
public boolean
process(Set<? extends TypeElement>
the annotation interfaces requested to be processed
annotations
,
RoundEnvironment
environment for information about the current and prior round
roundEnv
)

Implements abstract javax.annotation.processing.AbstractProcessor.process.

Implements javax.annotation.processing.Processor.process.

Processes a set of annotation interfaces on root elements originating from the prior round and returns whether or not these annotation interfaces are claimed by this processor.

protected abstract void
protected void
protected static TypeElement
protected void
warning(String message)

protected abstract void
Inherited from javax.annotation.processing.AbstractProcessor:
getCompletionsgetSupportedAnnotationTypesgetSupportedOptionsgetSupportedSourceVersionisInitialized

Field Detail

loggerback to summary
protected Logger logger
optionsback to summary
protected Options options
RELEASE_PATTERNback to summary
protected static final Pattern RELEASE_PATTERN

Constructor Detail

AbstractSpiProcessorback to summary
public AbstractSpiProcessor()

Method Detail

annotationMirrorMatchesback to summary
protected static boolean annotationMirrorMatches(AnnotationMirror annotation, String lookingFor)
checkCompatibilityback to summary
protected void checkCompatibility()
checkJavacOnLinuxback to summary
protected void checkJavacOnLinux()
createProperQualifiedNameback to summary
protected String createProperQualifiedName(TypeElement type)
findAnnotationMirrorsback to summary
protected static List<AnnotationMirror> findAnnotationMirrors(TypeElement element, String lookingFor)
findCollectionValueMemberback to summary
protected Collection<AnnotationValue> findCollectionValueMember(AnnotationMirror mirror, String memberName)
Annotations
@SuppressWarnings:unchecked
findSingleValueMemberback to summary
protected AnnotationValue findSingleValueMember(AnnotationMirror mirror, String memberName)
getAnnotationClassback to summary
protected abstract Class<? extends Annotation> getAnnotationClass()
handleAnnotationsback to summary
protected void handleAnnotations(RoundEnvironment roundEnv)
handleElementback to summary
protected abstract void handleElement(Element e)
hasModifierback to summary
protected boolean hasModifier(Element element, Modifier modifier)
hasPublicNoArgsConstructorback to summary
protected boolean hasPublicNoArgsConstructor(TypeElement currentClass)
initback to summary
public synchronized void init(ProcessingEnvironment environment)

Overrides javax.annotation.processing.AbstractProcessor.init.

Implements javax.annotation.processing.Processor.init.

Doc from javax.annotation.processing.AbstractProcessor.init.

Initializes the processor with the processing environment.

Parameters
environment:ProcessingEnvironment

environment to access facilities the tool framework provides to the processor

Annotations
@Override
initializeback to summary
protected void initialize()
isAbstractClassback to summary
protected boolean isAbstractClass(TypeElement element)
isAssignableback to summary
protected boolean isAssignable(TypeMirror currentClass, TypeMirror type)
isImplementationback to summary
protected CheckResult isImplementation(TypeElement currentClass, TypeElement type)
isStaticClassback to summary
protected boolean isStaticClass(TypeElement element)
processback to summary
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)

Implements abstract javax.annotation.processing.AbstractProcessor.process.

Implements javax.annotation.processing.Processor.process.

Doc from javax.annotation.processing.AbstractProcessor.process.

Processes a set of annotation interfaces on root elements originating from the prior round and returns whether or not these annotation interfaces are claimed by this processor. If true is returned, the annotation interfaces are claimed and subsequent processors will not be asked to process them; if false is returned, the annotation interfaces are unclaimed and subsequent processors may be asked to process them. A processor may always return the same boolean value or may vary the result based on its own chosen criteria.

The input set will be empty if the processor supports "*" and the root elements have no annotations. A Processor must gracefully handle an empty set of annotations.

Parameters
annotations:Set<? extends TypeElement>

the annotation interfaces requested to be processed

roundEnv:RoundEnvironment

environment for information about the current and prior round

Returns:boolean

Doc from javax.annotation.processing.Processor.process.

whether or not the set of annotation interfaces are claimed by this processor

Annotations
@Override
removeStaleDataback to summary
protected abstract void removeStaleData(RoundEnvironment roundEnv)
reportErrorback to summary
protected void reportError(TypeElement element, CheckResult result)
toElementback to summary
protected static TypeElement toElement(AnnotationValue value)
warningback to summary
protected void warning(String message)
writeDataback to summary
protected abstract void writeData()