Class MainGenerator
java.lang.Object
javax.annotation.processing.AbstractProcessor
core.support.annotation.processor.MainGenerator
- All Implemented Interfaces:
Processor
@SupportedAnnotationTypes("core.support.annotation.Module") @SupportedSourceVersion(RELEASE_6) @AutoService(javax.annotation.processing.Processor.class) public class MainGenerator extends AbstractProcessor
-
Field Summary
Fields Modifier and Type Field Description static StringANNOATION_WORKING_DIRstatic ProcessingEnvironmentPROCESS_ENVFields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors Constructor Description MainGenerator() -
Method Summary
Modifier and Type Method Description protected static voidcreateMarkerClass()files created: src_dir.txt, marker.marker a marker class is to indicate when the generated files have been created used for comparison with the class files.static voiddisableConsoleLogging()disable console log for annotation generation if annotations are running, without compilation error, then console log will be disabledstatic FilegetRootPath_reverseNavigation(File dir, String name)navigates backwards from dir location to find the directory where file name is locatedbooleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)static booleanrunAnnotation()Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init, isInitialized
-
Field Details
-
PROCESS_ENV
-
ANNOATION_WORKING_DIR
-
-
Constructor Details
-
MainGenerator
public MainGenerator()
-
-
Method Details
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-
runAnnotation
public static boolean runAnnotation() -
createMarkerClass
protected static void createMarkerClass()files created: src_dir.txt, marker.marker a marker class is to indicate when the generated files have been created used for comparison with the class files. if class files are newer, than the marker class, then regenerate the code -
disableConsoleLogging
public static void disableConsoleLogging()disable console log for annotation generation if annotations are running, without compilation error, then console log will be disabled
-