java.lang.Object
com.aquima.interactions.expressions.parser.ParseNodeBase
com.aquima.interactions.expressions.r7.parser.nodes.DeprecatedNode
All Implemented Interfaces:
IParseNode

public class DeprecatedNode extends ParseNodeBase
This node may be used to specify a deprecation warning for a node. The node for which the warning applies is wrapped, as the node may only be deprecated under certain circumstances, and adding the warning to the base class causes unneeded overhead, as most nodes won't be deprecated.
Since:
6.4
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

    • DeprecatedNode

      public DeprecatedNode(IParseNode node, ErrorCode warning)
      Constructs a deprecation warning for a specified node.
      Parameters:
      node - The node for which the deprecation warning is specified.
      warning - The deprecation warning for the node.
    • DeprecatedNode

      public DeprecatedNode(IParseNode node, ErrorCode warning, String... parameters)
      Constructs a deprecation warning for a specified node.
      Parameters:
      node - The node for which the deprecation warning is specified.
      warning - The deprecation warning for the node.
      parameters - an array with the parameters that should be used in the warning.
  • Method Details

    • getNode

      public IParseNode getNode()
      This method returns the node for which the deprecation warning applies.
      Returns:
      the node for which the deprecation warning applies.
    • getWarning

      public ErrorCode getWarning()
      This method returns the error code containing the deprecation warning for the wrapped node.
      Returns:
      the error code containing the deprecation warning for the wrapped node.
    • getParameters

      public String[] getParameters()
      This method returns an array with the parameters that should be used in the warning.
      Returns:
      an array with the parameters that should be used in the warning.
    • setPosition

      public void setPosition(Position position, Position endPosition)
      Description copied from class: ParseNodeBase
      This method sets the position information for the node. The position information is injected by the parser.
      Overrides:
      setPosition in class ParseNodeBase
      Parameters:
      position - The start position information for the node.
      endPosition - The end position information for the node.