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 classLogicTransformer.NotOrTransformation(Not (OR (A B) )
-
Constructor Summary
Constructors Modifier Constructor Description protectedLogicTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyOrTransformation(GroupElement parent)protected voidfixClonedDeclarations(GroupElement and, Map<String,Type> globals)During the logic transformation, we eventually clone CEs, specially patterns and corresponding declarations.static LogicTransformergetInstance()protected booleanprocessTree(GroupElement ce)protected GroupElement[]splitOr(GroupElement cloned)static int[]toIntArray(List<Integer> list)GroupElement[]transform(GroupElement cloned, Map<String,Type> globals)
-
-
-
Method Detail
-
getInstance
public static LogicTransformer getInstance()
-
transform
public GroupElement[] transform(GroupElement cloned, Map<String,Type> globals) throws InvalidPatternException
- Throws:
InvalidPatternException
-
splitOr
protected GroupElement[] splitOr(GroupElement cloned)
-
fixClonedDeclarations
protected void fixClonedDeclarations(GroupElement and, Map<String,Type> 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
-
applyOrTransformation
public void applyOrTransformation(GroupElement parent) throws InvalidPatternException
- Throws:
InvalidPatternException
-
-