Interface PreProcessingStrategy

    • Method Detail

      • of

        @SafeVarargs
        static PreProcessingStrategy of​(java.lang.String name,
                                        java.lang.Class<? extends IGeneralPreProcessor>... preProcessor)
        A construction method for a generic preprocessing strategy

        Output is always normal formatted code
        Parameters:
        name - the reference identifier to given to the strategy
        preProcessor - IPreprocessor instance(s) to be executed
        Returns:
        Generic strategy for the passed parameters
      • of

        @SafeVarargs
        static PreProcessingStrategy of​(java.lang.String name,
                                        boolean tokenise,
                                        java.lang.Class<? extends IGeneralPreProcessor>... preProcessor)
        A construction method for a generic preprocessing strategy

        Output can be either formatted code or tokenised depending on the boolean flag value
        Parameters:
        name - the reference identifier to given to the strategy
        tokenise - output will be tokenised
        preProcessor - IPreprocessor instance(s) to be executed
        Returns:
        Generic strategy for the passed parameters
      • of

        static PreProcessingStrategy of​(java.lang.String name,
                                        java.lang.Class<? extends IAdvancedPreProcessorGroup> preProcessor)
        A construction method for a generic preprocessing strategy
        Parameters:
        name - the reference identifier to given to the strategy
        preProcessor - IPreprocessor instance(s) to be executed
        Returns:
        Generic strategy for the passed parameters
      • getName

        java.lang.String getName()
        Fetches the reference identifier for the strategy
        Returns:
        identifier string
      • getPreProcessorClasses

        java.util.List<java.lang.Class<? extends IPreProcessor>> getPreProcessorClasses()
        Fetches the ordered preprocessor classes in a list, to be run in order

        If using an advanced preprocessor, this must return a singleton list (list with 1 element)
        Returns:
        ordered PreProcessor class(es)
      • getStringifier

        default ITokenStringifier getStringifier()
        Stringifier to use before passing the file to the detection algorithm, null for the default formatted code
        Returns:
        instance of the stringifier
      • isAdvanced

        boolean isAdvanced()
        Is the strategy using an IAdvancedPreProcessor instance?
        Returns:
        boolean is advanced