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_ENV-
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
-
-
Constructor Summary
Constructors Constructor Description MainGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
PROCESS_ENV
public static ProcessingEnvironment PROCESS_ENV
-
ANNOATION_WORKING_DIR
public static String ANNOATION_WORKING_DIR
-
-
Method Detail
-
process
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
- 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
-
getRootPath_reverseNavigation
public static File getRootPath_reverseNavigation(File dir, String name)
navigates backwards from dir location to find the directory where file name is located- Parameters:
dir-name-- Returns:
-
disableConsoleLogging
public static void disableConsoleLogging()
disable console log for annotation generation if annotations are running, without compilation error, then console log will be disabled
-
-