Class EnumConfigurationProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- com.github.toolarium.enumeration.configuration.processor.EnumConfigurationProcessor
-
- All Implemented Interfaces:
javax.annotation.processing.Processor
@SupportedOptions("enumconfiguration.validate.strict") public class EnumConfigurationProcessor extends javax.annotation.processing.AbstractProcessorImplements the enumeration configuration annotation processor
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTOOLARIUM_ENUM_CONFIGURATION_JSON_FILENAMEDefines the output filenamestatic java.lang.StringTOOLARIUM_ENUM_CONFIGURATION_JSON_OUTPUT_FILEDefines the output file pathstatic java.lang.StringTOOLARIUM_ENUM_CONFIGURATION_JSON_PATHDefines the output filename
-
Constructor Summary
Constructors Constructor Description EnumConfigurationProcessor()Constructor for EnumConfigurationProcessor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgenerateFileContent(java.lang.String name, EnumConfigurations enumConfigurations, java.io.OutputStream stream)Generate the file contentjava.util.Set<java.lang.String>getSupportedAnnotationTypes()javax.lang.model.SourceVersiongetSupportedSourceVersion()booleanprocess(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)
-
-
-
Field Detail
-
TOOLARIUM_ENUM_CONFIGURATION_JSON_FILENAME
public static final java.lang.String TOOLARIUM_ENUM_CONFIGURATION_JSON_FILENAME
Defines the output filename- See Also:
- Constant Field Values
-
TOOLARIUM_ENUM_CONFIGURATION_JSON_PATH
public static final java.lang.String TOOLARIUM_ENUM_CONFIGURATION_JSON_PATH
Defines the output filename- See Also:
- Constant Field Values
-
TOOLARIUM_ENUM_CONFIGURATION_JSON_OUTPUT_FILE
public static final java.lang.String TOOLARIUM_ENUM_CONFIGURATION_JSON_OUTPUT_FILE
Defines the output file path- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupportedAnnotationTypes
public java.util.Set<java.lang.String> getSupportedAnnotationTypes()
- Specified by:
getSupportedAnnotationTypesin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedAnnotationTypesin classjavax.annotation.processing.AbstractProcessor- See Also:
AbstractProcessor.getSupportedAnnotationTypes()
-
getSupportedSourceVersion
public javax.lang.model.SourceVersion getSupportedSourceVersion()
- Specified by:
getSupportedSourceVersionin interfacejavax.annotation.processing.Processor- Overrides:
getSupportedSourceVersionin classjavax.annotation.processing.AbstractProcessor- See Also:
AbstractProcessor.getSupportedSourceVersion()
-
process
public boolean process(java.util.Set<? extends javax.lang.model.element.TypeElement> annotations, javax.annotation.processing.RoundEnvironment roundEnv)- Specified by:
processin interfacejavax.annotation.processing.Processor- Specified by:
processin classjavax.annotation.processing.AbstractProcessor- See Also:
AbstractProcessor.process(java.util.Set, javax.annotation.processing.RoundEnvironment)
-
generateFileContent
protected void generateFileContent(java.lang.String name, EnumConfigurations enumConfigurations, java.io.OutputStream stream) throws java.io.IOExceptionGenerate the file content- Parameters:
name- the nameenumConfigurations- the enum-configurationstream- the stream- Throws:
java.io.IOException- In case of a stream exception
-
-