Package 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogicTransformer.NotOrTransformation
(Not (OR (A B) )
-
Constructor Summary
Constructors Modifier Constructor Description protected
LogicTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fixClonedDeclarations(GroupElement and, Map<String,Class<?>> globals)
During the logic transformation, we eventually clone CEs, specially patterns and corresponding declarations.static LogicTransformer
getInstance()
protected boolean
processTree(GroupElement ce)
protected GroupElement[]
splitOr(GroupElement cloned)
static int[]
toIntArray(List<Integer> list)
GroupElement[]
transform(GroupElement cloned, Map<String,Class<?>> globals)
-
-
-
Method Detail
-
getInstance
public static LogicTransformer getInstance()
-
transform
public GroupElement[] transform(GroupElement cloned, Map<String,Class<?>> globals) throws InvalidPatternException
- Throws:
InvalidPatternException
-
splitOr
protected GroupElement[] splitOr(GroupElement cloned)
-
fixClonedDeclarations
protected void fixClonedDeclarations(GroupElement and, Map<String,Class<?>> globals)
During the logic transformation, we eventually clone CEs, specially patterns and corresponding declarations. So now we need to fix any references to cloned declarations.
-
processTree
protected boolean processTree(GroupElement ce) throws InvalidPatternException
- Throws:
InvalidPatternException
-
-