Class ValueMacroExpression.MacroExpansionProcessor

    • Constructor Detail

      • MacroExpansionProcessor

        protected MacroExpansionProcessor()
    • Method Detail

      • process

        public String process​(String sMacro,
                              ParameterResolver resolver,
                              int cDepth)
        Process macro parameter expansion on sMacro containing no registered delimiters.
        Parameters:
        sMacro - a string starting with prefix and ending with suffix
        resolver - macro parameter ParameterResolver
        cDepth - expansion depth
        Returns:
        expanded macro parameter or emptry string if macro parameter evaluates to null
      • canProcess

        public boolean canProcess​(String sMacro)
        Return true iff sMacro contains the delimiter that this processor handles.
        Parameters:
        sMacro - the macro parameter
        Returns:
        true iff this processor can process sMacro
      • getDelimiter

        public String getDelimiter()
        Return delimiter being used by the processor.
        Returns:
        delimiter used by the processor or empty string if processor does not have a delimiter
      • validateMacroExpansion

        public boolean validateMacroExpansion​(String sProp,
                                              String sPropValue,
                                              String sDefault,
                                              int cDepth)
        Validate macro expansion is not self referencing or contain circular references that will never complete expansion.
        Parameters:
        sProp - the property
        sPropValue - the expanded property value
        cDepth - count of macro expansions
        Returns:
        false if self referencing in macro expansion or exceed {#link #MAX_MACRO_EXPANSIONS}; otherwise return true