Class DeprecatedNode
java.lang.Object
com.aquima.interactions.expressions.parser.ParseNodeBase
com.aquima.interactions.expressions.r7.parser.nodes.DeprecatedNode
- All Implemented Interfaces:
IParseNode
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 Summary
ConstructorsConstructorDescriptionDeprecatedNode
(IParseNode node, ErrorCode warning) Constructs a deprecation warning for a specified node.DeprecatedNode
(IParseNode node, ErrorCode warning, String... parameters) Constructs a deprecation warning for a specified node. -
Method Summary
Modifier and TypeMethodDescriptiongetNode()
This method returns the node for which the deprecation warning applies.String[]
This method returns an array with the parameters that should be used in the warning.This method returns the error code containing the deprecation warning for the wrapped node.void
setPosition
(Position position, Position endPosition) This method sets the position information for the node.Methods inherited from class com.aquima.interactions.expressions.parser.ParseNodeBase
getEndPosition, getPosition
-
Constructor Details
-
DeprecatedNode
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
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
This method returns the node for which the deprecation warning applies.- Returns:
- the node for which the deprecation warning applies.
-
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
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
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 classParseNodeBase
- Parameters:
position
- The start position information for the node.endPosition
- The end position information for the node.
-