Interface IParameterResolver


public interface IParameterResolver
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    resolveParameter(String template, String parameterName, Matcher parameterMatcher, int copyStart, StringBuffer result)
    Provides a way for components to inject their own replacements of parameter markers in the provided template.
  • Method Details

    • resolveParameter

      int resolveParameter(String template, String parameterName, Matcher parameterMatcher, int copyStart, StringBuffer result)
      Provides a way for components to inject their own replacements of parameter markers in the provided template. This currently exposes too much of the internals of TemplateUtil IMO, but without serious surgery on the TemplateUtil, this is about the only way to accomplish the task.
      Parameters:
      template - The string containing replacement parameters
      parameterName - The name of the located parameter in the template
      parameterMatcher - The Regex matcher that located the parameter
      copyStart - The current start to copy from the template
      result - The final string with the parameter replacements inlined
      Returns:
      integer indicating the new copyStart to be used in the TemplateUtil in the event that the component handled the parameter. If negative, then no processing was done in the component. Any value greater than or equal to zero indicates processing happened in the component. TODO: Change this interface to make it easier to do things without exposing the internals of TemplateUtil.