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 FileObject
createSourceOutputFile(Path subfolder, Path filePath)
Stream<? extends Element>
elementStreamFromAnnotations(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv, Predicate<? super TypeElement> filter)
protected void
error(String fmt, Object... args)
protected void
error(String msg, Throwable t)
protected Class<?>
getClassFromElement(Element e)
protected String
getFullClassName(Element typeElement)
protected Map<String,String>
getOptions()
protected void
info(String fmt, Object... args)
protected <R extends Map<String,Object>>
RtoMapObject(AnnotationMirror am, Supplier<R> supplier)
protected void
warn(String fmt, Object... args)
protected void
warn(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
-
-