Interface RewriteVisitor.ConstantRuleI
- All Superinterfaces:
JepComponent,Serializable
- All Known Implementing Classes:
SmallNumberRule
- Enclosing class:
RewriteVisitor
Define a rule which may modify a constant node.
- Since:
- Jep 4.0
-
Method Summary
Modifier and TypeMethodDescriptionapply(ASTConstant node) Rewrites the node.booleantest(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 Details
-
test
Returns true if node needs to be rewritten, according to this rule.- Throws:
ParseException- if for some reason rewriting cannot be performed.
-
apply
Rewrites the node. Note a new node must be constructed rather than simply changing the value.- Throws:
ParseException
-