Top Description Fields Constructors Methods
com.sun.tools.jxc.ap

public final Class AnnotationParser

extends AbstractProcessor
Class Inheritance
Annotations
@SupportedAnnotationTypes:jakarta.xml.bind.annotation.*
@SupportedOptions:jaxb.config
Imports
com.sun.tools.jxc.ConfigReader, com.sun.tools.jxc.api.JXC, .J2SJAXBModel, .Reference, com.sun.tools.xjc.ErrorReceiver, org.xml.sax.SAXException, javax.annotation.processing.AbstractProcessor, .ProcessingEnvironment, .RoundEnvironment, .SupportedAnnotationTypes, .SupportedOptions, javax.lang.model.SourceVersion, javax.lang.model.element.Element, .ElementKind, .TypeElement, javax.lang.model.util.ElementFilter, jakarta.xml.bind.SchemaOutputResolver, java.io.File, .IOException, java.util.ArrayList, .Collection, .Collections, .Set, .StringTokenizer

This class behaves as a JAXB Annotation Processor, It reads the user specified typeDeclarations and the config files It also reads config files Used in unit tests
Author
Bhakti Mehta ([email protected])

Field Summary

Modifier and TypeField and Description
private ErrorReceiver
Inherited from javax.annotation.processing.AbstractProcessor:
processingEnv

Constructor Summary

AccessConstructor and Description
public
AnnotationParser()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
private void
filterClass(Collection<TypeElement> rootElements, Collection<? extends Element> elements)

public SourceVersion
public void
init(ProcessingEnvironment processingEnv)

Overrides javax.annotation.processing.AbstractProcessor.init.

Implements javax.annotation.processing.Processor.init.

Initializes the processor with the processing environment.

public boolean
process(Set<? extends TypeElement> annotations, RoundEnvironment 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.

Inherited from javax.annotation.processing.AbstractProcessor:
getCompletionsgetSupportedAnnotationTypesgetSupportedOptionsisInitialized

Field Detail

errorListenerback to summary
private ErrorReceiver errorListener

Constructor Detail

AnnotationParserback to summary
public AnnotationParser()

Default constructor.

Method Detail

filterClassback to summary
private void filterClass(Collection<TypeElement> rootElements, Collection<? extends Element> elements)
getSupportedSourceVersionback to summary
public SourceVersion getSupportedSourceVersion()

Overrides javax.annotation.processing.AbstractProcessor.getSupportedSourceVersion.

Implements javax.annotation.processing.Processor.getSupportedSourceVersion.

Doc from javax.annotation.processing.AbstractProcessor.getSupportedSourceVersion.

Returns the latest source version supported by this annotation processor.

Annotations
@Override
initback to summary
public void init(ProcessingEnvironment processingEnv)

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.

Annotations
@Override
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.

Annotations
@Override