Class AnnotationProcessorProvider
- java.lang.Object
-
- de.bmiag.tapir.annotationprocessing.AnnotationProcessorProvider
-
public class AnnotationProcessorProvider extends java.lang.Object
Singleton which provides the annotation processor for a given processorKey. This class is needed to determine the processor of annotations which are annotated byDynamicActive
at runtime.It does so by scanning for {processorKey}.processor files in the classpath's META-INF folders. The
AnnotationProcessorProvider
expects a properties file which has exactly one key value pair. The key is the annotation processor's class name and the value is the order which is used to calculate the precedence if multiple annotations processors feel responsible.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
- See Also:
DynamicActive
,Order
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnnotationProcessorProvider
getInstance()
Returns the singleton instance ofAnnotationProcessorProvider
java.util.Optional<java.lang.String>
getProcessorClassName(java.lang.String processorKey)
Returns the annotation processor's class name for the given processorKey.
-
-
-
Method Detail
-
getInstance
public static AnnotationProcessorProvider getInstance()
Returns the singleton instance ofAnnotationProcessorProvider
- Returns:
- the
AnnotationProcessorProvider
singleton
-
getProcessorClassName
public java.util.Optional<java.lang.String> getProcessorClassName(java.lang.String processorKey)
Returns the annotation processor's class name for the given processorKey.- Parameters:
processorKey
- The key which's annotation processor should be determined.- Returns:
- the annotation processor. Optional as it's possible that there is no registered annotation processor.
-
-