org.bsc.processor
Class BaseAbstractProcessor

java.lang.Object
  extended by javax.annotation.processing.AbstractProcessor
      extended by org.bsc.processor.BaseAbstractProcessor
All Implemented Interfaces:
Processor

public abstract class BaseAbstractProcessor
extends AbstractProcessor

Author:
bsorrentino

Nested Class Summary
static interface BaseAbstractProcessor.Predicate
           
 
Field Summary
 
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv
 
Constructor Summary
BaseAbstractProcessor()
           
 
Method Summary
protected  FileObject createSourceOutputFile(String subfolder, String filePath)
           
protected  void error(String msg)
           
protected  void error(String msg, Throwable t)
           
protected  Class<?> getClassFromElement(Element e)
           
protected  void getElementsAnnotatedWith(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv, BaseAbstractProcessor.Predicate p)
           
protected  String getFullClassName(Element typeElement)
           
protected  Map<String,String> getOptions()
           
protected  FileObject getResourceFormLocation(JavaFileManager.Location location, String packageName, String resource)
           
protected  URL getResourceFromClassPath(String fqn)
           
protected  URL getResourceFromClassPath(String fqn, ClassLoader cl)
           
protected  void info(String msg)
           
protected  void warn(String msg)
           
protected  void warn(String msg, Throwable t)
           
 
Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init, isInitialized, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseAbstractProcessor

public BaseAbstractProcessor()
Method Detail

info

protected void info(String msg)

warn

protected void warn(String msg)

warn

protected void warn(String msg,
                    Throwable t)

error

protected void error(String msg)

error

protected void error(String msg,
                     Throwable t)

getResourceFromClassPath

protected URL getResourceFromClassPath(String fqn)
Parameters:
fqn -
Returns:

getResourceFromClassPath

protected URL getResourceFromClassPath(String fqn,
                                       ClassLoader cl)
Parameters:
fqn -
cl -
Returns:

getElementsAnnotatedWith

protected void getElementsAnnotatedWith(Set<? extends TypeElement> annotations,
                                        RoundEnvironment roundEnv,
                                        BaseAbstractProcessor.Predicate p)

getResourceFormLocation

protected FileObject getResourceFormLocation(JavaFileManager.Location location,
                                             String packageName,
                                             String resource)
                                      throws FileNotFoundException,
                                             IOException
Parameters:
location -
Returns:
Throws:
FileNotFoundException
IOException

createSourceOutputFile

protected FileObject createSourceOutputFile(String subfolder,
                                            String filePath)
                                     throws IOException
Parameters:
subfolder - subfolder
filePath - relative path
Returns:
Throws:
IOException

getClassFromElement

protected Class<?> getClassFromElement(Element e)
                                throws ClassNotFoundException
Parameters:
e -
Returns:
Throws:
ClassNotFoundException

getOptions

protected Map<String,String> getOptions()
Returns:

getFullClassName

protected String getFullClassName(Element typeElement)
Parameters:
typeElement -
Returns:


Copyright © 2013. All Rights Reserved.