Module jamal.engine

Class Processor

  • All Implemented Interfaces:
    Processor

    public class Processor
    extends java.lang.Object
    implements Processor
    • Constructor Detail

      • Processor

        public Processor​(java.lang.String macroOpen,
                         java.lang.String macroClose)
        Create a new Processor that can be used to process macros. It sets the separators to the specified values. These separators start and end macros and the usual strings are "{" and "}".

        The constructor also loads the macros that are defined either in the modules as implementations provided for the interface Macro or in library files listed in the META-INF directory (old way). The constructor uses the ServiceLoader to load the macros.

        Neither macroOpen nor macroClose can be null. In case any of these parameters are null an IllegalArgumentException will be thrown.

        Parameters:
        macroOpen - the macro opening string
        macroClose - the macro closing string
      • Processor

        public Processor()
        Complimentary constructor that creates a processor with the conventional separators: "{" and "}".

        Note that any string containing many characters can be used as separators. It is recommended to use different strings as opening and closing string or else it will not be possible to nest macros into each other.