Class FieldNode

  • All Implemented Interfaces:
    ITslNode

    public class FieldNode
    extends Object
    implements ITslNode
    TSL node representing a field (value) from a TSL expression.
    Since:
    6.4
    Author:
    O. Kerpershoek
    • Constructor Detail

      • FieldNode

        public FieldNode​(MessageReporter reporter,
                         IExpr expression,
                         String format)
        Constructs the node with the required arguments.
        Parameters:
        reporter - Object that can be used to report error or warnings to.
        expression - The expression that should be used to acquire the field value.
        format - the format that should be applied to the field value, may be null.
    • Method Detail

      • getExpression

        public IExpr getExpression()
        This method returns the expression that should be used to acquire the field value.
        Returns:
        the expression that should be used to acquire the field value.
      • expand

        public void expand​(IValueSource source,
                           OutputBuffer output,
                           ILanguage language)
        Description copied from interface: ITslNode
        The expand method should evaluate the node for the given language, and append the result to the output buffer supplied. When the node also contains child elements, this expand method should invoke the child elements too.
        Specified by:
        expand in interface ITslNode
        Parameters:
        source - Object containing the values for the current domain.
        output - The output buffer the result of this node should be appended to.
        language - The language for which the node should be evaluated.
      • getFormat

        public String getFormat()
        This method returns the format that should be applied to the field value.
        Returns:
        the format that should be applied to the field value.
      • visit

        public void visit​(ITslNodeVisitor visitor)
        Description copied from interface: ITslNode
        This method allows visitation of the node. The visit method will not invoke the visitor for any child nodes.
        Specified by:
        visit in interface ITslNode
        Parameters:
        visitor - The visitor that should be invoked for this node.