Package org.drools.core.rule
Class NamedConsequence
- java.lang.Object
-
- org.drools.core.rule.ConditionalElement
-
- org.drools.core.rule.NamedConsequence
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,NamedConsequenceInvoker
,RuleConditionElement
,RuleComponent
public class NamedConsequence extends ConditionalElement implements NamedConsequenceInvoker, Externalizable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NamedConsequence()
NamedConsequence(String name, boolean breaking)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamedConsequence
clone()
There is not reason to clone this object since it is stateless.boolean
equals(Object obj)
String
getConsequenceName()
Map<String,Declaration>
getInnerDeclarations()
It is not possible to declare any new variables, so always return an Empty MapList<RuleConditionElement>
getNestedElements()
It is not possible to nest elements inside an entry point, so always return an empty list.Map<String,Declaration>
getOuterDeclarations()
It is not possible to declare and export any variables, so always return an empty mapint
hashCode()
boolean
invokesConsequence(String consequenceName)
boolean
isBreaking()
boolean
isPatternScopeDelimiter()
Returns true in case this RuleConditionElement delimits a pattern visibility scope.boolean
isTerminal()
void
readExternal(ObjectInput in)
Declaration
resolveDeclaration(String identifier)
Not possible to resolve any declaration, so always return null.void
setTerminal(boolean terminal)
String
toString()
void
writeExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
NamedConsequence
public NamedConsequence()
-
NamedConsequence
public NamedConsequence(String name, boolean breaking)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
clone
public NamedConsequence clone()
There is not reason to clone this object since it is stateless. So a clone() call will return the instance itself.- Specified by:
clone
in interfaceRuleConditionElement
- Specified by:
clone
in classConditionalElement
- Returns:
- See Also:
ConditionalElement.clone()
-
getInnerDeclarations
public Map<String,Declaration> getInnerDeclarations()
It is not possible to declare any new variables, so always return an Empty Map- Specified by:
getInnerDeclarations
in interfaceRuleConditionElement
- Returns:
- See Also:
RuleConditionElement.getInnerDeclarations()
-
getNestedElements
public List<RuleConditionElement> getNestedElements()
It is not possible to nest elements inside an entry point, so always return an empty list.- Specified by:
getNestedElements
in interfaceRuleConditionElement
- Returns:
- See Also:
RuleConditionElement.getNestedElements()
-
getOuterDeclarations
public Map<String,Declaration> getOuterDeclarations()
It is not possible to declare and export any variables, so always return an empty map- Specified by:
getOuterDeclarations
in interfaceRuleConditionElement
- Returns:
- See Also:
RuleConditionElement.getOuterDeclarations()
-
resolveDeclaration
public Declaration resolveDeclaration(String identifier)
Not possible to resolve any declaration, so always return null.- Specified by:
resolveDeclaration
in interfaceRuleConditionElement
- Returns:
- See Also:
RuleConditionElement.resolveDeclaration(java.lang.String)
-
getConsequenceName
public String getConsequenceName()
-
invokesConsequence
public boolean invokesConsequence(String consequenceName)
- Specified by:
invokesConsequence
in interfaceNamedConsequenceInvoker
-
isBreaking
public boolean isBreaking()
-
isTerminal
public boolean isTerminal()
-
setTerminal
public void setTerminal(boolean terminal)
-
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 interfaceRuleConditionElement
- Returns:
-
-