Class ScriptParameters

All Implemented Interfaces:
Visitable<ScriptParam>, Serializable, Cloneable, Iterable<ScriptParam>, Collection<ScriptParam>, List<ScriptParam>, RandomAccess

public class ScriptParameters extends ArrayList<ScriptParam> implements Visitable<ScriptParam>
See Also:
  • Constructor Details

    • ScriptParameters

      public ScriptParameters()
  • Method Details

    • extractParamsComment

      public static String extractParamsComment(String text)
      Extract the first params comment section found in the given script text.
      Parameters:
      script -
      Returns:
      parameters section if found, null if not found
    • parseScriptParams

      public static ScriptParameters parseScriptParams(String text)
      Extract script parameters from the comments of the given text. The text must match the syntax defined by the ScriptParams.g ANTLR grammar.
      Parameters:
      text -
      Returns:
      the list of script parameters defined within the script comments
    • copyParams

      public static void copyParams(ScriptParameters oldParams, ScriptParameters newParams)
      Copies any values from oldParams which have matching ids in newParams.
      Parameters:
      oldParams -
      newParams -
    • copyParams

      public void copyParams(ScriptParameters newParams)
      Copy param values from the given script parameters
      Parameters:
      params -
    • setParamValue

      public Object setParamValue(String paramId, Object val)
      Set the value of the specified paramId
      Parameters:
      paramId -
      value -
      Returns:
      old value of the specified paramId
    • getParamValue

      public Object getParamValue(String paramId)
      Get value of given paramId
      Parameters:
      paramId -
      Returns:
      value of paramId
    • getParamIds

      public Set<String> getParamIds()
      Get the set of paramIds
      Returns:
      set of paramIds
    • loadFromMap

      public void loadFromMap(Map<String,Object> paramMap)
    • getHashString

      public String getHashString()
    • toHTMLString

      public String toHTMLString()
    • toHTMLString

      public String toHTMLString(boolean modifiedOnly)
    • toHTMLString

      public String toHTMLString(boolean modifiedOnly, List<String> includes, List<String> excludes)
      Return an HTML formatted version of the script parameters.
      Parameters:
      modifiedOnly -
      includes -
      excludes -
      Returns:
    • accept

      public void accept(Visitor<ScriptParam> visitor)
      Description copied from interface: Visitable
      Accept the given visitor.
      Specified by:
      accept in interface Visitable<ScriptParam>