@SupportedAnnotationTypes(value={"jdk.internal.jvmci.hotspotvmconfig.HotSpotVMConstant","jdk.internal.jvmci.hotspotvmconfig.HotSpotVMFlag","jdk.internal.jvmci.hotspotvmconfig.HotSpotVMField","jdk.internal.jvmci.hotspotvmconfig.HotSpotVMType","jdk.internal.jvmci.hotspotvmconfig.HotSpotVMValue"}) public class HotSpotVMConfigProcessor extends AbstractProcessor
Modifier and Type | Class and Description |
---|---|
(package private) static class |
HotSpotVMConfigProcessor.VMConfigField |
Modifier and Type | Field and Description |
---|---|
(package private) Element |
currentTypeElement |
private static boolean |
DEBUG
Set to true to enable logging to a local file during annotation processing.
|
private PrintWriter |
log |
(package private) String |
outputDirectory |
(package private) String |
outputName |
(package private) String[] |
prologue |
processingEnv
Constructor and Description |
---|
HotSpotVMConfigProcessor() |
Modifier and Type | Method and Description |
---|---|
private <T extends Annotation> |
collectAnnotations(RoundEnvironment roundEnv,
Map<String,HotSpotVMConfigProcessor.VMConfigField> annotationMap,
Class<T> annotationClass,
BiFunction<VariableElement,T,HotSpotVMConfigProcessor.VMConfigField> builder) |
private void |
createFiles(Map<String,HotSpotVMConfigProcessor.VMConfigField> annotations,
Element element) |
protected PrintWriter |
createSourceFile(String pkg,
String relativeName,
Filer filer,
Element... originatingElements) |
private void |
errorMessage(Element element,
String format,
Object... args) |
private PrintWriter |
getLog()
Logging facility for debugging the annotation processor.
|
SourceVersion |
getSupportedSourceVersion() |
private void |
logException(Throwable t) |
private void |
logMessage(String format,
Object... args) |
boolean |
process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) |
private void |
reportExceptionThrow(Element element,
Throwable t)
Bugs in an annotation processor can cause silent failure so try to report any exception
throws as errors.
|
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, init, isInitialized
private static final boolean DEBUG
private PrintWriter log
String outputName
String outputDirectory
Element currentTypeElement
public HotSpotVMConfigProcessor()
public SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion
in interface Processor
getSupportedSourceVersion
in class AbstractProcessor
private PrintWriter getLog()
private void logMessage(String format, Object... args)
private void logException(Throwable t)
private void reportExceptionThrow(Element element, Throwable t)
private void createFiles(Map<String,HotSpotVMConfigProcessor.VMConfigField> annotations, Element element)
protected PrintWriter createSourceFile(String pkg, String relativeName, Filer filer, Element... originatingElements)
private <T extends Annotation> void collectAnnotations(RoundEnvironment roundEnv, Map<String,HotSpotVMConfigProcessor.VMConfigField> annotationMap, Class<T> annotationClass, BiFunction<VariableElement,T,HotSpotVMConfigProcessor.VMConfigField> builder)
private void errorMessage(Element element, String format, Object... args)
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
process
in interface Processor
process
in class AbstractProcessor