Class SimpleVar

java.lang.Object
org.apache.juneau.svl.Var
org.apache.juneau.svl.SimpleVar
Direct Known Subclasses:
DefaultingVar, HtmlWidgetVar, LowerCaseVar, MultipartResolvingVar, MultipartVar, NotEmptyVar, UpperCaseVar, UrlEncodeVar, UrlVar

public abstract class SimpleVar extends Var
Abstract superclass of all Simple Var Language variables that resolve to simple returned string values.

Note the difference between this class and StreamedVar that streams values to writers.
Unlike the StreamedVar class, the returned value from this class can contain nested variables that will be recursively resolved by VarResolver.

Subclasses must implement the following method:

See Also:
09
  • Constructor Details

    • SimpleVar

      protected SimpleVar(String name)
      Constructor.
      Parameters:
      name - The variable name (e.g. "C" for variables of the form "$C{...}")
  • Method Details

    • resolveTo

      public void resolveTo(VarResolverSession session, Writer w, String arg) throws Exception
      Description copied from class: Var
      The interface that needs to be implemented for subclasses of StreamedVar.
      Specified by:
      resolveTo in class Var
      Parameters:
      session - The session object used for a single instance of a var resolution.
      w - The writer to send the resolved value to.
      arg - The inside argument of the variable.
      Throws:
      Exception - Any exception can be thrown.