com.sun.tools.javac.sym
Class CreateSymbols

java.lang.Object
  extended by javax.annotation.processing.AbstractProcessor
      extended by com.sun.tools.javac.sym.CreateSymbols
All Implemented Interfaces:
Processor

@SupportedOptions(value={"com.sun.tools.javac.sym.Jar","com.sun.tools.javac.sym.Dest"})
@SupportedAnnotationTypes(value="*")
public class CreateSymbols
extends AbstractProcessor

Used to generate a "symbol file" representing rt.jar that only includes supported or legacy proprietary API. Valid annotation processor options:

com.sun.tools.javac.sym.Jar
Specifies the location of rt.jar.
com.sun.tools.javac.sym.Dest
Specifies the destination directory.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Field Summary
 
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
 
Constructor Summary
CreateSymbols()
           
 
Method Summary
(package private)  void createSymbols()
           
(package private) static java.util.Set<java.lang.String> getLegacyPackages()
           
 SourceVersion getSupportedSourceVersion()
          If the processor class is annotated with SupportedSourceVersion, return the source version in the annotation.
static void main(java.lang.String... args)
           
 boolean process(java.util.Set<? extends TypeElement> tes, RoundEnvironment renv)
          Processes a set of annotation types on type elements originating from the prior round and returns whether or not these annotations are claimed by this processor.
(package private)  void writeClass(Pool pool, Symbol.ClassSymbol cs, ClassWriter writer)
           
 
Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, init, isInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateSymbols

public CreateSymbols()
Method Detail

getLegacyPackages

static java.util.Set<java.lang.String> getLegacyPackages()

process

public boolean process(java.util.Set<? extends TypeElement> tes,
                       RoundEnvironment renv)
Description copied from class: AbstractProcessor
Processes a set of annotation types on type elements originating from the prior round and returns whether or not these annotations are claimed by this processor. If true is returned, the annotations are claimed and subsequent processors will not be asked to process them; if false is returned, the annotations 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 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.

Specified by:
process in interface Processor
Specified by:
process in class AbstractProcessor
Parameters:
tes - the annotation types requested to be processed
renv - environment for information about the current and prior round
Returns:
whether or not the set of annotations are claimed by this processor

createSymbols

void createSymbols()
             throws java.io.IOException
Throws:
java.io.IOException

writeClass

void writeClass(Pool pool,
                Symbol.ClassSymbol cs,
                ClassWriter writer)
          throws java.io.IOException
Throws:
java.io.IOException

getSupportedSourceVersion

public SourceVersion getSupportedSourceVersion()
Description copied from class: AbstractProcessor
If the processor class is annotated with SupportedSourceVersion, return the source version in the annotation. If the class is not so annotated, SourceVersion.RELEASE_6 is returned.

Specified by:
getSupportedSourceVersion in interface Processor
Overrides:
getSupportedSourceVersion in class AbstractProcessor
Returns:
the latest source version supported by this processor
See Also:
SupportedSourceVersion, ProcessingEnvironment.getSourceVersion()

main

public static void main(java.lang.String... args)