Package org.drools.core.rule
Class ReturnValueRestriction
- java.lang.Object
-
- org.drools.core.rule.ReturnValueRestriction
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Acceptor,AcceptsReadAccessor,Restriction,Wireable
public class ReturnValueRestriction extends Object implements Restriction, AcceptsReadAccessor, Wireable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReturnValueRestriction.ReturnValueContextEntry-
Nested classes/interfaces inherited from interface org.drools.core.spi.Wireable
Wireable.Immutable
-
-
Constructor Summary
Constructors Constructor Description ReturnValueRestriction()ReturnValueRestriction(InternalReadAccessor fieldExtractor, Declaration[] previousDeclarations, Declaration[] localDeclarations, String[] requiredGlobals, Evaluator evaluator)ReturnValueRestriction(InternalReadAccessor fieldExtractor, ReturnValueExpression returnValueExpression, Declaration[] previousDeclarations, Declaration[] localDeclarations, String[] requiredGlobals, Evaluator evaluator)
-
Method Summary
-
-
-
Constructor Detail
-
ReturnValueRestriction
public ReturnValueRestriction()
-
ReturnValueRestriction
public ReturnValueRestriction(InternalReadAccessor fieldExtractor, Declaration[] previousDeclarations, Declaration[] localDeclarations, String[] requiredGlobals, Evaluator evaluator)
-
ReturnValueRestriction
public ReturnValueRestriction(InternalReadAccessor fieldExtractor, ReturnValueExpression returnValueExpression, Declaration[] previousDeclarations, Declaration[] localDeclarations, String[] requiredGlobals, Evaluator evaluator)
-
-
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
-
setReadAccessor
public void setReadAccessor(InternalReadAccessor readAccessor)
- Specified by:
setReadAccessorin interfaceAcceptsReadAccessor
-
getRequiredDeclarations
public Declaration[] getRequiredDeclarations()
- Specified by:
getRequiredDeclarationsin interfaceRestriction
-
getPreviousDeclarations
public Declaration[] getPreviousDeclarations()
-
getLocalDeclarations
public Declaration[] getLocalDeclarations()
-
getRequiredGlobals
public String[] getRequiredGlobals()
-
replaceDeclaration
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Description copied from interface:RestrictionA restriction may be required to replace an old declaration object by a new updated one- Specified by:
replaceDeclarationin interfaceRestriction
-
setReturnValueExpression
public void setReturnValueExpression(ReturnValueExpression expression)
-
getExpression
public ReturnValueExpression getExpression()
-
getEvaluator
public Evaluator getEvaluator()
- Specified by:
getEvaluatorin interfaceRestriction
-
isTemporal
public boolean isTemporal()
Description copied from interface:RestrictionReturns true if this is a temporal restriction- Specified by:
isTemporalin interfaceRestriction- Returns:
-
isAllowed
public boolean isAllowed(InternalReadAccessor readAccessor, InternalFactHandle handle, Tuple tuple, ReteEvaluator reteEvaluator, ContextEntry context)
-
isAllowed
public boolean isAllowed(InternalReadAccessor extractor, InternalFactHandle handle, ReteEvaluator reteEvaluator, ContextEntry context)
- Specified by:
isAllowedin interfaceRestriction
-
isAllowedCachedLeft
public boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
- Specified by:
isAllowedCachedLeftin interfaceRestriction
-
isAllowedCachedRight
public boolean isAllowedCachedRight(Tuple tuple, ContextEntry context)
- Specified by:
isAllowedCachedRightin interfaceRestriction
-
createContextEntry
public ContextEntry createContextEntry()
- Specified by:
createContextEntryin interfaceRestriction
-
clone
public ReturnValueRestriction clone()
- Specified by:
clonein interfaceRestriction- Overrides:
clonein classObject
-
-