Class StringTemplateMatcher.StringTemplateMatcherCompiled

java.lang.Object
jodd.util.StringTemplateMatcher.StringTemplateMatcherCompiled
Enclosing class:
StringTemplateMatcher

public class StringTemplateMatcher.StringTemplateMatcherCompiled extends Object
  • Field Details

    • macrosCount

      private final int macrosCount
    • names

      private final String[] names
    • patterns

      private final String[] patterns
    • fixed

      private final String[] fixed
  • Constructor Details

    • StringTemplateMatcherCompiled

      private StringTemplateMatcherCompiled(int macrosCount)
    • StringTemplateMatcherCompiled

      private StringTemplateMatcherCompiled()
  • Method Details

    • names

      public String[] names()
    • patterns

      public String[] patterns()
      Returns all patterns. Some elements may be null if some macro does not define a pattern.
    • macrosCount

      public int macrosCount()
      Returns macros count.
    • matches

      public boolean matches(String input)
      Returns true if the input matches the compiled pattern.
    • match

      public StringTemplateMatcher.Match[] match(String input)
      Returns all the matches or the empty array if no matches found.
    • process

      private String[] process(String input, boolean match)
      Process input in two modes: matching mode and extracting mode.
      Returns:
      string array of extracted macro values (null element is allowed) or null