Interface RewriteVisitor.ConstantRuleI
-
- All Superinterfaces:
JepComponent
,java.io.Serializable
- All Known Implementing Classes:
SmallNumberRule
- Enclosing class:
- RewriteVisitor
public static interface RewriteVisitor.ConstantRuleI extends JepComponent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Node
apply(ASTConstant node)
Rewrites the node.boolean
test(ASTConstant node)
Returns true if node needs to be rewritten, according to this rule.-
Methods inherited from interface com.singularsys.jep.JepComponent
getLightWeightInstance, init
-
-
-
-
Method Detail
-
test
boolean test(ASTConstant node) throws ParseException
Returns true if node needs to be rewritten, according to this rule.- Throws:
ParseException
- if for some reason rewriting cannot be performed.
-
apply
Node apply(ASTConstant node) throws ParseException
Rewrites the node. Note a new node must be constructed rather than simply changing the value.- Throws:
ParseException
-
-