org.drools.rule
Class EvalCondition

java.lang.Object
  extended by org.drools.rule.ConditionalElement
      extended by org.drools.rule.EvalCondition
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, RuleConditionElement, RuleComponent, Wireable

public class EvalCondition
extends ConditionalElement
implements Externalizable, Wireable

See Also:
Serialized Form

Constructor Summary
EvalCondition()
           
EvalCondition(Declaration[] requiredDeclarations)
           
EvalCondition(EvalExpression eval, Declaration[] requiredDeclarations)
           
 
Method Summary
 Object clone()
          Returns a clone from itself
 Object createContext()
           
 boolean equals(Object object)
           
 EvalExpression getEvalExpression()
           
 Map getInnerDeclarations()
          Returns a Map of declarations that are visible inside this conditional element
 List getNestedElements()
          Returs a list of RuleConditionElement's that are nested inside the current element
 Map getOuterDeclarations()
          Returns a Map of declarations that are visible outside this conditional element.
 Declaration[] getRequiredDeclarations()
           
 int hashCode()
           
 boolean isAllowed(Tuple tuple, WorkingMemory workingMemory, Object context)
           
 boolean isPatternScopeDelimiter()
          Returns true in case this RuleConditionElement delimits a pattern visibility scope.
 void readExternal(ObjectInput in)
           
 void replaceDeclaration(Declaration declaration, Declaration resolved)
           
 Declaration resolveDeclaration(String identifier)
          Resolves the given identifier in the current scope and returns the Declaration object for the declaration.
 void setEvalExpression(EvalExpression expression)
           
 String toString()
           
 void wire(Object object)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getEvalExpression

public EvalExpression getEvalExpression()

wire

public void wire(Object object)
Specified by:
wire in interface Wireable

setEvalExpression

public void setEvalExpression(EvalExpression expression)

getRequiredDeclarations

public Declaration[] getRequiredDeclarations()

createContext

public Object createContext()

isAllowed

public boolean isAllowed(Tuple tuple,
                         WorkingMemory workingMemory,
                         Object context)

clone

public Object clone()
Description copied from interface: RuleConditionElement
Returns a clone from itself

Specified by:
clone in interface RuleConditionElement
Specified by:
clone in class ConditionalElement
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

getInnerDeclarations

public Map getInnerDeclarations()
Description copied from interface: RuleConditionElement
Returns a Map of declarations that are visible inside this conditional element

Specified by:
getInnerDeclarations in interface RuleConditionElement
Returns:

getOuterDeclarations

public Map getOuterDeclarations()
Description copied from interface: RuleConditionElement
Returns a Map of declarations that are visible outside this conditional element.

Specified by:
getOuterDeclarations in interface RuleConditionElement
Returns:

getNestedElements

public List getNestedElements()
Description copied from interface: RuleConditionElement
Returs a list of RuleConditionElement's that are nested inside the current element

Specified by:
getNestedElements in interface RuleConditionElement
Returns:

isPatternScopeDelimiter

public boolean isPatternScopeDelimiter()
Description copied from interface: RuleConditionElement
Returns 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:
isPatternScopeDelimiter in interface RuleConditionElement
Returns:

resolveDeclaration

public Declaration resolveDeclaration(String identifier)
Description copied from interface: RuleConditionElement
Resolves 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:
resolveDeclaration in interface RuleConditionElement
Returns:

replaceDeclaration

public void replaceDeclaration(Declaration declaration,
                               Declaration resolved)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.