Package org.drools.core.rule
Class EvalCondition
- java.lang.Object
-
- org.drools.core.rule.ConditionalElement
-
- org.drools.core.rule.EvalCondition
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,RuleConditionElement,RuleComponent,Wireable
public class EvalCondition extends ConditionalElement implements Externalizable, Wireable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.core.spi.Wireable
Wireable.Immutable
-
-
Field Summary
Fields Modifier and Type Field Description protected EvalExpressionexpressionprotected Declaration[]requiredDeclarations
-
Constructor Summary
Constructors Constructor Description EvalCondition()EvalCondition(Declaration[] requiredDeclarations)EvalCondition(EvalExpression eval, Declaration[] requiredDeclarations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvalConditionclone()Returns a clone from itselfObjectcreateContext()booleanequals(Object object)List<EvalCondition>getCloned()EvalExpressiongetEvalExpression()Map<String,Declaration>getInnerDeclarations()Returns a Map of declarations that are visible inside this conditional elementList<? extends RuleConditionElement>getNestedElements()Returs a list of RuleConditionElement's that are nested inside the current elementMap<String,Declaration>getOuterDeclarations()Returns a Map of declarations that are visible outside this conditional element.Declaration[]getRequiredDeclarations()inthashCode()booleanisAllowed(Tuple tuple, ReteEvaluator reteEvaluator, Object context)booleanisPatternScopeDelimiter()Returns true in case this RuleConditionElement delimits a pattern visibility scope.voidreadExternal(ObjectInput in)voidreplaceDeclaration(Declaration declaration, Declaration resolved)DeclarationresolveDeclaration(String identifier)Resolves the given identifier in the current scope and returns the Declaration object for the declaration.voidsetCloned(List<EvalCondition> cloned)voidsetEvalExpression(EvalExpression expression)voidsetOuterDeclarations(Map<String,Declaration> outerDeclarations)StringtoString()voidwire(Object object)voidwriteExternal(ObjectOutput out)
-
-
-
Field Detail
-
expression
protected EvalExpression expression
-
requiredDeclarations
protected Declaration[] requiredDeclarations
-
-
Constructor Detail
-
EvalCondition
public EvalCondition()
-
EvalCondition
public EvalCondition(Declaration[] requiredDeclarations)
-
EvalCondition
public EvalCondition(EvalExpression eval, Declaration[] requiredDeclarations)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getEvalExpression
public EvalExpression getEvalExpression()
-
setEvalExpression
public void setEvalExpression(EvalExpression expression)
-
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
-
createContext
public Object createContext()
-
isAllowed
public boolean isAllowed(Tuple tuple, ReteEvaluator reteEvaluator, Object context)
-
clone
public EvalCondition clone()
Description copied from interface:RuleConditionElementReturns a clone from itself- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classConditionalElement- Returns:
-
getInnerDeclarations
public Map<String,Declaration> getInnerDeclarations()
Description copied from interface:RuleConditionElementReturns a Map of declarations that are visible inside this conditional element- Specified by:
getInnerDeclarationsin interfaceRuleConditionElement- Returns:
-
getOuterDeclarations
public Map<String,Declaration> getOuterDeclarations()
Description copied from interface:RuleConditionElementReturns a Map of declarations that are visible outside this conditional element.- Specified by:
getOuterDeclarationsin interfaceRuleConditionElement- Returns:
-
setOuterDeclarations
public void setOuterDeclarations(Map<String,Declaration> outerDeclarations)
-
getNestedElements
public List<? extends RuleConditionElement> getNestedElements()
Description copied from interface:RuleConditionElementReturs a list of RuleConditionElement's that are nested inside the current element- Specified by:
getNestedElementsin interfaceRuleConditionElement- Returns:
-
isPatternScopeDelimiter
public boolean isPatternScopeDelimiter()
Description copied from interface:RuleConditionElementReturns true in case this RuleConditionElement delimits a pattern visibility scope. For instance, AND CE is not a scope delimiter, while NOT CE is a scope delimiter- Specified by:
isPatternScopeDelimiterin interfaceRuleConditionElement- Returns:
-
resolveDeclaration
public Declaration resolveDeclaration(String identifier)
Description copied from interface:RuleConditionElementResolves the given identifier in the current scope and returns the Declaration object for the declaration. Returns null if identifier can not be resolved.- Specified by:
resolveDeclarationin interfaceRuleConditionElement- Returns:
-
replaceDeclaration
public void replaceDeclaration(Declaration declaration, Declaration resolved)
-
getCloned
public List<EvalCondition> getCloned()
-
setCloned
public void setCloned(List<EvalCondition> cloned)
-
-