Package org.bsc.processor
Class BaseAbstractProcessor
- java.lang.Object
-
- javax.annotation.processing.AbstractProcessor
-
- org.bsc.processor.BaseAbstractProcessor
-
- All Implemented Interfaces:
Processor
public abstract class BaseAbstractProcessor extends AbstractProcessor
- Author:
- bsorrentino
-
-
Field Summary
-
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
-
-
Constructor Summary
Constructors Constructor Description BaseAbstractProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FileObjectcreateSourceOutputFile(Path subfolder, Path filePath)Stream<? extends Element>elementStreamFromAnnotations(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv, Predicate<? super TypeElement> filter)protected voiderror(String fmt, Object... args)protected voiderror(String msg, Throwable t)protected Class<?>getClassFromElement(Element e)protected StringgetFullClassName(Element typeElement)protected Map<String,String>getOptions()protected voidinfo(String fmt, Object... args)protected <R extends Map<String,Object>>
RtoMapObject(AnnotationMirror am, Supplier<R> supplier)protected voidwarn(String fmt, Object... args)protected voidwarn(String msg, Throwable t)-
Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init, isInitialized, process
-
-
-
-
Method Detail
-
elementStreamFromAnnotations
public Stream<? extends Element> elementStreamFromAnnotations(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv, Predicate<? super TypeElement> filter)
- Parameters:
filter-- Returns:
-
toMapObject
protected <R extends Map<String,Object>> R toMapObject(AnnotationMirror am, Supplier<R> supplier)
- Parameters:
am-supplier-- Returns:
-
createSourceOutputFile
protected FileObject createSourceOutputFile(Path subfolder, Path filePath) throws IOException
- Parameters:
subfolder- subfolderfilePath- relative path- Returns:
- Throws:
IOException
-
getClassFromElement
protected Class<?> getClassFromElement(Element e) throws ClassNotFoundException
- Parameters:
e-- Returns:
- Throws:
ClassNotFoundException
-
-