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 DeepCopyVisitor
dcv
protected NodeFactory
nf
A NodeFactory used for construction nodes.protected OperatorTableI
opSet
An OperatorSet used for finding operators.protected TreeUtils
tu
TreeUtils for testing types of nodes.protected Jep
xj
A reference to main XJep opbject.
-
Constructor Summary
Constructors Constructor Description AbstractRewrite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JepComponent
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.void
init(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:JepComponent
Initialize 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:
init
in interfaceJepComponent
- Parameters:
jep
- the current Jep instance
-
getLightWeightInstance
public JepComponent getLightWeightInstance()
Description copied from interface:JepComponent
Gets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstance
in interfaceJepComponent
- Returns:
- either an new instance, null or 'this'.
-
-