org.drools.core.rule
Class LogicTransformer
java.lang.Object
org.drools.core.rule.LogicTransformer
public class LogicTransformer
- extends Object
LogicTransformation is reponsible for removing redundant nodes and move Or
nodes upwards.
This class does not turn Exists into two Nots at this stage, that role is
delegated to the Builder.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogicTransformer
protected LogicTransformer()
getInstance
public static LogicTransformer getInstance()
transform
public GroupElement[] transform(GroupElement cloned)
throws InvalidPatternException
- Throws:
InvalidPatternException
splitOr
protected GroupElement[] splitOr(GroupElement cloned)
fixClonedDeclarations
protected void fixClonedDeclarations(GroupElement and)
- During the logic transformation, we eventually clone CEs,
specially patterns and corresponding declarations. So now
we need to fix any references to cloned declarations.
- Parameters:
and -
processTree
protected void processTree(GroupElement ce)
throws InvalidPatternException
- Traverses a Tree, during the process it transforms Or nodes moving the
upwards and it removes duplicate logic statement, this does not include
Not nodes.
Traversal involves three levels the graph for each iteration. The first
level is the current node, this node will not be transformed, instead
what we are interested in are the children of the current node (called
the parent nodes) and the children of those parents (call the child
nodes).
- Parameters:
ce -
- Throws:
InvalidPatternException
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.