org.drools.semantics.java
Class JavaBlockConsequence
java.lang.Object
org.drools.semantics.java.JavaBlockConsequence
- All Implemented Interfaces:
- java.io.Serializable, SemanticComponent, SemanticConsequence, SemanticInvokeable, SemanticRule, Consequence, RuleComponent
- Direct Known Subclasses:
- GroovyBlockConsequence
public class JavaBlockConsequence
- extends java.lang.Object
- implements java.io.Serializable, Consequence, SemanticConsequence
Java block semantics Consequence.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
thrownException
protected final java.lang.String thrownException
- See Also:
- Constant Field Values
JavaBlockConsequence
public JavaBlockConsequence(java.lang.String name,
java.lang.String block,
Rule rule)
throws java.lang.Exception
- Construct.
- Parameters:
block - The statement block.rule - The rule.
- Throws:
java.lang.Exception
getSemanticType
public java.lang.String getSemanticType()
- Specified by:
getSemanticType in interface SemanticComponent
isExceptionThrown
public boolean isExceptionThrown()
- Specified by:
isExceptionThrown in interface SemanticInvokeable
getThrownException
public java.lang.String getThrownException()
- Specified by:
getThrownException in interface SemanticInvokeable
getName
public java.lang.String getName()
- Description copied from interface:
SemanticComponent
- Returns the name of the component
- Specified by:
getName in interface SemanticComponent
getText
public java.lang.String getText()
- Specified by:
getText in interface SemanticConsequence
getSemanticRuleCompiler
public SemanticRuleCompiler getSemanticRuleCompiler()
- Specified by:
getSemanticRuleCompiler in interface SemanticRule
getTupleMembers
public Declaration[] getTupleMembers()
setInvoker
public void setInvoker(Invoker invoker)
- Specified by:
setInvoker in interface SemanticInvokeable
invoke
public void invoke(Tuple tuple)
throws ConsequenceException
- Execute the consequence for the supplied matching
Tuple.
- Specified by:
invoke in interface Consequence
- Parameters:
tuple - The matching tuple.workingMemory - The working memory session.
- Throws:
ConsequenceException - If an error occurs while attempting to invoke the consequence.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object