org.squashtest.tm.tools.annotation.processor
Class DynamicComponentProcessor<ANNOTATION extends Annotation>
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.squashtest.tm.tools.annotation.processor.DynamicComponentProcessor<ANNOTATION>
- All Implemented Interfaces:
- Processor
- Direct Known Subclasses:
- DynamicDaoProcessor, DynamicManagerProcessor
public abstract class DynamicComponentProcessor<ANNOTATION extends Annotation>
- extends AbstractProcessor
- Author:
- Gregory Fouquet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DYNAMIC_COMPONENT_TEMPLATE
protected static final String DYNAMIC_COMPONENT_TEMPLATE
- See Also:
- Constant Field Values
DynamicComponentProcessor
public DynamicComponentProcessor()
init
public final void init(ProcessingEnvironment processingEnv)
- Specified by:
init in interface Processor- Overrides:
init in class AbstractProcessor
process
public final boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnvironment)
- Specified by:
process in interface Processor- Specified by:
process in class AbstractProcessor
- See Also:
AbstractProcessor.process(java.util.Set,
javax.annotation.processing.RoundEnvironment)
annotationClass
protected abstract Class<ANNOTATION> annotationClass()
entityClass
protected abstract Class<?> entityClass(ANNOTATION componentDefinition)
- Should get the entity property of the given component definition. Which should puke a
MirroredTypeException but it's OK.
- Parameters:
componentDefinition -
- Returns:
beanName
protected abstract String beanName(ANNOTATION componentDefinition)
- Should get the "name" property of the annotation.
- Parameters:
componentDefinition -
- Returns:
beanFactoryClass
protected abstract String beanFactoryClass()
generatedFileName
protected abstract String generatedFileName()
lookupCustomImplementation
protected abstract boolean lookupCustomImplementation(ANNOTATION definition)
- Parameters:
definition -
- Returns:
- whether dynamic component factory should lookup custom implementation or not.
sessionFactoryName
protected abstract CharSequence sessionFactoryName(ANNOTATION definition,
Element component)
- This method should issue an error if no sessionFactoryName is extractible from annotation.
- Parameters:
definition - component -
- Returns:
- the bean name of the session factory which should be used.
getMessager
protected final Messager getMessager()
- Returns:
- the messager
checkSessionFactoryName
protected void checkSessionFactoryName(String name,
Element component)
Copyright © 2010-2014 Henix, henix.fr. All Rights Reserved.