Package jadex.rules.eca
Class MethodCondition
- java.lang.Object
- 
- jadex.rules.eca.MethodCondition
 
- 
- All Implemented Interfaces:
- ICondition
 
 public class MethodCondition extends java.lang.Object implements ICondition Condition implementation that invokes a predefined method.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IMethodParameterGuesserguesserThe parameter guesser.protected booleaninvertThe invert flag.protected java.lang.reflect.MethodmethodThe method.protected java.lang.ObjectobjectThe object.- 
Fields inherited from interface jadex.rules.eca.IConditionFALSE, TRUE, TRUE_CONDITION
 
- 
 - 
Constructor SummaryConstructors Constructor Description MethodCondition(java.lang.Object object, java.lang.reflect.Method method)Create a new method condition.MethodCondition(java.lang.Object object, java.lang.reflect.Method method, boolean invert)Create a new method condition.MethodCondition(java.lang.Object object, java.lang.reflect.Method method, boolean invert, IMethodParameterGuesser guesser)Create a new method condition.MethodCondition(java.lang.Object object, java.lang.reflect.Method method, IMethodParameterGuesser guesser)Create a new method condition.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<Tuple2<java.lang.Boolean,java.lang.Object>>evaluate(IEvent event)Evaluate the condition.protected java.lang.ObjectinvokeMethod(IEvent event)Do the method invocation.
 
- 
- 
- 
Field Detail- 
objectprotected java.lang.Object object The object.
 - 
methodprotected java.lang.reflect.Method method The method.
 - 
invertprotected boolean invert The invert flag. Inverts method result.
 - 
guesserprotected IMethodParameterGuesser guesser The parameter guesser.
 
- 
 - 
Constructor Detail- 
MethodConditionpublic MethodCondition(java.lang.Object object, java.lang.reflect.Method method)Create a new method condition.
 - 
MethodConditionpublic MethodCondition(java.lang.Object object, java.lang.reflect.Method method, IMethodParameterGuesser guesser)Create a new method condition.
 - 
MethodConditionpublic MethodCondition(java.lang.Object object, java.lang.reflect.Method method, boolean invert)Create a new method condition.
 - 
MethodConditionpublic MethodCondition(java.lang.Object object, java.lang.reflect.Method method, boolean invert, IMethodParameterGuesser guesser)Create a new method condition.
 
- 
 - 
Method Detail- 
evaluatepublic IFuture<Tuple2<java.lang.Boolean,java.lang.Object>> evaluate(IEvent event) Evaluate the condition.- Specified by:
- evaluatein interface- ICondition
- Parameters:
- event- The event.
- Returns:
- True, if condition is met (plus additional user data).
 
 - 
invokeMethodprotected java.lang.Object invokeMethod(IEvent event) throws java.lang.Exception Do the method invocation.- Throws:
- java.lang.Exception
 
 
- 
 
-