Class AbstractRewrite
- java.lang.Object
-
- com.singularsys.extensions.rewrite.AbstractRewrite
-
- All Implemented Interfaces:
RewriteRuleI,JepComponent,java.io.Serializable
- Direct Known Subclasses:
CollectPowers,ExpandBrackets,ExpandPower
public abstract class AbstractRewrite extends java.lang.Object implements RewriteRuleI
Basic implementation for a RewriteRule. Subclasses can have access to NodeFactory,OperatorSet,TreeUtilsand XJep objects.- Author:
- Rich Morris Created on 01-Oct-2004
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected DeepCopyVisitordcvprotected NodeFactorynfA NodeFactory used for construction nodes.protected OperatorTableIopSetAn OperatorSet used for finding operators.protected TreeUtilstuTreeUtils for testing types of nodes.protected JepxjA reference to main XJep opbject.
-
Constructor Summary
Constructors Constructor Description AbstractRewrite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JepComponentgetLightWeightInstance()Gets a light-weight instance suitable for using in multiple threads.voidinit(Jep jep)Initialize the component.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.singularsys.extensions.rewrite.RewriteRuleI
apply, test
-
-
-
-
Field Detail
-
nf
protected NodeFactory nf
A NodeFactory used for construction nodes.
-
opSet
protected OperatorTableI opSet
An OperatorSet used for finding operators.
-
tu
protected TreeUtils tu
TreeUtils for testing types of nodes.
-
xj
protected Jep xj
A reference to main XJep opbject.
-
dcv
protected DeepCopyVisitor dcv
-
-
Method Detail
-
init
public void init(Jep jep)
Description copied from interface:JepComponentInitialize the component. This methods is called whenever a component is added to Jep. Hence it allows components to keep track of the other components they may rely on.- Specified by:
initin interfaceJepComponent- Parameters:
jep- the current Jep instance
-
getLightWeightInstance
public JepComponent getLightWeightInstance()
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Returns:
- either an new instance, null or 'this'.
-
-