org.drools.rule
Class ReturnValueRestriction
java.lang.Object
org.drools.rule.ReturnValueRestriction
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Restriction
public class ReturnValueRestriction
- extends java.lang.Object
- implements Restriction
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
clone()
|
ContextEntry |
createContextEntry()
|
boolean |
equals(java.lang.Object object)
|
Evaluator |
getEvaluator()
|
ReturnValueExpression |
getExpression()
|
Declaration[] |
getLocalDeclarations()
|
Declaration[] |
getPreviousDeclarations()
|
Declaration[] |
getRequiredDeclarations()
|
java.lang.String[] |
getRequiredGlobals()
|
int |
hashCode()
|
boolean |
isAllowed(Extractor extractor,
java.lang.Object object,
InternalWorkingMemory workingMemoiry,
ContextEntry context)
|
boolean |
isAllowed(Extractor extractor,
java.lang.Object object,
Tuple tuple,
WorkingMemory workingMemory,
ContextEntry context)
|
boolean |
isAllowedCachedLeft(ContextEntry context,
java.lang.Object object)
|
boolean |
isAllowedCachedRight(ReteTuple tuple,
ContextEntry context)
|
void |
replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
A restriction may be required to replace an old
declaration object by a new updated one |
void |
setReturnValueExpression(ReturnValueExpression expression)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
ReturnValueRestriction
public ReturnValueRestriction(FieldExtractor fieldExtractor,
Declaration[] previousDeclarations,
Declaration[] localDeclarations,
java.lang.String[] requiredGlobals,
Evaluator evaluator)
ReturnValueRestriction
public ReturnValueRestriction(FieldExtractor fieldExtractor,
ReturnValueExpression returnValueExpression,
Declaration[] previousDeclarations,
Declaration[] localDeclarations,
java.lang.String[] requiredGlobals,
Evaluator evaluator)
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
- Specified by:
getRequiredDeclarations
in interface Restriction
getPreviousDeclarations
public Declaration[] getPreviousDeclarations()
getLocalDeclarations
public Declaration[] getLocalDeclarations()
getRequiredGlobals
public java.lang.String[] getRequiredGlobals()
replaceDeclaration
public void replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
- Description copied from interface:
Restriction
- A restriction may be required to replace an old
declaration object by a new updated one
- Specified by:
replaceDeclaration
in interface Restriction
setReturnValueExpression
public void setReturnValueExpression(ReturnValueExpression expression)
getExpression
public ReturnValueExpression getExpression()
getEvaluator
public Evaluator getEvaluator()
isAllowed
public boolean isAllowed(Extractor extractor,
java.lang.Object object,
Tuple tuple,
WorkingMemory workingMemory,
ContextEntry context)
isAllowed
public boolean isAllowed(Extractor extractor,
java.lang.Object object,
InternalWorkingMemory workingMemoiry,
ContextEntry context)
- Specified by:
isAllowed
in interface Restriction
isAllowedCachedLeft
public boolean isAllowedCachedLeft(ContextEntry context,
java.lang.Object object)
- Specified by:
isAllowedCachedLeft
in interface Restriction
isAllowedCachedRight
public boolean isAllowedCachedRight(ReteTuple tuple,
ContextEntry context)
- Specified by:
isAllowedCachedRight
in interface Restriction
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class java.lang.Object
createContextEntry
public ContextEntry createContextEntry()
- Specified by:
createContextEntry
in interface Restriction
clone
public java.lang.Object clone()
- Specified by:
clone
in interface Restriction
- Overrides:
clone
in class java.lang.Object