Class 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 by DynamicActive 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 Detail

      • 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.