Class ScriptSeparator

java.lang.Object
io.vertigo.commons.script.parser.ScriptSeparator
All Implemented Interfaces:
Serializable

public final class ScriptSeparator extends Object implements Serializable
Gestion des Séparateurs utilisés par le parser. Un séparateur est défini - soit par un caractère. (le même en début et fin) Exemple # : #name# - soit par des chaines de caractères.(qui peuvent être différentes) Exemple invalid input: '<'% et %> : XXXXinvalid input: '<'%if (1=1){%> ScriptSeparator implements Serializable because it's referenced by Serializable object (enum SeparatorType)
Author:
pchretien
See Also:
  • Constructor Details

    • ScriptSeparator

      public ScriptSeparator(String beginSeparator, String endSeparator)
      Constructor. Si le séparateur de début et de fin sont différents sous forme de String.
      Parameters:
      beginSeparator - Séparateur de début
      endSeparator - Séparateur de fin
  • Method Details

    • getBeginSeparator

      public String getBeginSeparator()
    • getEndSeparator

      public String getEndSeparator()
    • indexOfBeginCaracter

      public int indexOfBeginCaracter(String script, int start)
      Returns the next position of the begin separator.
      Parameters:
      script - text
      start - start
      Returns:
      the next position of the begin separator
    • indexOfEndCaracter

      public int indexOfEndCaracter(String script, int start)
      Returns the next position of the end separator.
      Parameters:
      script - text
      start - start
      Returns:
      the next position of the end separator
    • toString

      public String toString()
      Overrides:
      toString in class Object