Class Validator<F extends FormatterSupport>

java.lang.Object
de.cuioss.tools.formatting.template.Validator<F>
Type Parameters:
F - at least FormatterSupport
All Implemented Interfaces:
Serializable

public class Validator<F extends FormatterSupport> extends Object implements Serializable
See Also:
  • Method Details

    • validate

      public void validate(String template)
      Parameters:
      template - must not be null if template doesn't fit to el-expression or use tokens which are not supported.
    • builder

      public static <E extends FormatterSupport> Validator.ValidatorBuilder<E> builder()
      Returns:
      an Validator.ValidatorBuilder
    • validateTemplate

      public static <E extends FormatterSupport> void validateTemplate(String template, E source)
      This method provide only validation of simple expression language with squared brackets. If some other expression language is used on the template validation will fail. If there is a need for usage of other expression language use validateTemplate(String, Lexer)
      Parameters:
      template - input which should be validated
      source - source must not be null
    • validateTemplate

      public static <E extends FormatterSupport> void validateTemplate(String template, Class<E> source)
      This method provide only validation of simple expression language with squared brackets. If some other expression language is used on the template validation will fail. If there is a need for usage of other expression language use validateTemplate(String, Lexer)
      Parameters:
      template - input which should be validated
      source - target type must not be null
    • validateTemplate

      public static <E extends FormatterSupport> void validateTemplate(String template, Lexer<E> lexer)
      This method provide validation for template of specific expression language. Therefore, you need to provide a fitting Lexer.
      Parameters:
      template - input which should be validated
      lexer - Lexer for usage of specific expression language on template