Class FF4jAnnotationPreProcessorHelper


  • @FeatureToggle(featureID="CM-0013.H01")
    public class FF4jAnnotationPreProcessorHelper
    extends Object
    During the processing of annotations some simple functions are needed, wich implemented for reuse in this class. Processing Annotations have achive several challenges. As first, everything is related to annotation processing need to be compiled before the code manipulation is started. For that reason, tools like loggers or template engine are just present, when this library is used as annotation processor, not for it's functionality inside. This circumstances are reasons why we have a explicit print method instead of the Logger.
    • Constructor Detail

      • FF4jAnnotationPreProcessorHelper

        public FF4jAnnotationPreProcessorHelper()
    • Method Detail

      • prepareCollection

        public List<AnnotatedClass> prepareCollection​(List<Element> elements)
        Collect annotation Elements as List from Annotation Processor and transform them into AnnotatedClass.
        Parameters:
        elements - as List
        Returns:
        AnnotatedClass as List
      • mergeAnnotatedElements

        public List<AnnotatedClass> mergeAnnotatedElements​(List<AnnotatedClass> collection)
        Merge the different annotations together, to allow the code generating for deactivated classes, methods & etc.
        Parameters:
        collection - as List
        Returns:
        annotatedElements as List
      • print

        public static void print​(String message)
        Write logging information on the command line.
        Parameters:
        message - as String
      • textProcessor

        public static String textProcessor​(String source,
                                           String regex)
        Process the content of a java class file and replace implementations by RegEx.
        Parameters:
        source - as String
        regex - as String
        Returns:
        processedText as String