Package org.drools.base.rule
Class EvalCondition
- java.lang.Object
-
- org.drools.base.rule.ConditionalElement
-
- org.drools.base.rule.EvalCondition
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.lang.Cloneable,Wireable,RuleComponent,RuleConditionElement
public class EvalCondition extends ConditionalElement implements java.io.Externalizable, Wireable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.base.rule.accessor.Wireable
Wireable.Immutable
-
-
Field Summary
Fields Modifier and Type Field Description protected EvalExpressionexpressionprotected Declaration[]requiredDeclarations
-
Constructor Summary
Constructors Constructor Description EvalCondition()EvalCondition(EvalExpression eval, Declaration[] requiredDeclarations)EvalCondition(Declaration[] requiredDeclarations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvalConditionclone()Returns a clone from itselfjava.lang.ObjectcreateContext()booleanequals(java.lang.Object object)java.util.List<EvalCondition>getCloned()EvalExpressiongetEvalExpression()java.util.Map<java.lang.String,Declaration>getInnerDeclarations()Returns a Map of declarations that are visible inside this conditional elementjava.util.List<? extends RuleConditionElement>getNestedElements()Returs a list of RuleConditionElement's that are nested inside the current elementjava.util.Map<java.lang.String,Declaration>getOuterDeclarations()Returns a Map of declarations that are visible outside this conditional element.Declaration[]getRequiredDeclarations()inthashCode()booleanisAllowed(BaseTuple tuple, ValueResolver valueResolver, java.lang.Object context)booleanisPatternScopeDelimiter()Returns true in case this RuleConditionElement delimits a pattern visibility scope.voidreadExternal(java.io.ObjectInput in)voidreplaceDeclaration(Declaration declaration, Declaration resolved)DeclarationresolveDeclaration(java.lang.String identifier)Resolves the given identifier in the current scope and returns the Declaration object for the declaration.voidsetCloned(java.util.List<EvalCondition> cloned)voidsetEvalExpression(EvalExpression expression)voidsetOuterDeclarations(java.util.Map<java.lang.String,Declaration> outerDeclarations)java.lang.StringtoString()voidwire(java.lang.Object object)voidwriteExternal(java.io.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(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
getEvalExpression
public EvalExpression getEvalExpression()
-
setEvalExpression
public void setEvalExpression(EvalExpression expression)
-
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
-
createContext
public java.lang.Object createContext()
-
isAllowed
public boolean isAllowed(BaseTuple tuple, ValueResolver valueResolver, java.lang.Object context)
-
clone
public EvalCondition clone()
Description copied from interface:RuleConditionElementReturns a clone from itself- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classConditionalElement- Returns:
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
getInnerDeclarations
public java.util.Map<java.lang.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 java.util.Map<java.lang.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(java.util.Map<java.lang.String,Declaration> outerDeclarations)
-
getNestedElements
public java.util.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(java.lang.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 java.util.List<EvalCondition> getCloned()
-
setCloned
public void setCloned(java.util.List<EvalCondition> cloned)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-