Rule Execution Server API

ilog.rules.factory
Class IlrMethodInvocation

java.lang.Object
  extended by ilog.rules.factory.IlrValue
      extended by ilog.rules.factory.IlrNaryValue
          extended by ilog.rules.factory.IlrMethodInvocation
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrStatement, Serializable

public final class IlrMethodInvocation
extends IlrNaryValue
implements IlrStatement

This class represents a method invocation of the rule language.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
Serialized Form

Constructor Summary
IlrMethodInvocation(IlrValue object)
          Constructs an invocation of a method on an object.
IlrMethodInvocation(IlrValue object, Method method, IlrValue[] arguments)
          Constructs an invocation of a method belonging to the object passed as the argument.
IlrMethodInvocation(IlrValue object, String methodName, IlrValue[] arguments)
          Constructs an invocation of a method belonging to the object passed as the argument.
IlrMethodInvocation(IlrValue object, String methodName, IlrValue[] arguments, ilog.rules.factory.IlrReflectClass[] genericArgs)
          Constructs an invocation of a generic method belonging to the object passed as the argument.
 
Method Summary
 Object exploreStatement(IlrFactoryExplorer explorer)
          Explores this method call as a statement using a factory explorer.
 Object exploreValue(IlrFactoryExplorer explorer)
          Explores this method call as a value using a factory explorer.
 String getClassName()
          Gets the fully-qualified name of the class which declares the method.
 ilog.rules.factory.IlrReflectClass[] getGenericArguments()
          Gets the type arguments for a generic method call.
 String getName()
          Gets the method name of this method call.
 IlrValue getObject()
          Gets the object invoked by this method call.
 String getShortClassName()
          Gets the short name of the class which declares the method.
 IlrMethod getXOMMethod()
          Gets the method of this method call.
 void setMethod(String methodName)
          Sets a method for this method call.
 String toString()
           
 
Methods inherited from class ilog.rules.factory.IlrNaryValue
addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, addArgument, enumerateArguments, getArgumentCount, getArguments, getXOMArgumentTypes
 
Methods inherited from class ilog.rules.factory.IlrValue
add, divide, getField, getReflect, getType, getXOMType, invokeEquals, isConstant, isEvent, isEventCondition, isNull, multiply, remainder, subtract, testAfter, testAfter, testBefore, testBefore, testEqual, testFalse, testGreaterOrEqual, testGreaterThan, testIn, testInstanceOf, testLessOrEqual, testLessThan, testNotEqual, testNotIn, testOccursin, testTrue, timeof, toNegative, toPositive, toPostfixDecr, toPostfixIncr, toPrefixDecr, toPrefixIncr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlrMethodInvocation

public IlrMethodInvocation(IlrValue object)
Constructs an invocation of a method on an object.

Parameters:
object - The invoked object of this method invocation.

IlrMethodInvocation

public IlrMethodInvocation(IlrValue object,
                           String methodName,
                           IlrValue[] arguments)
Constructs an invocation of a method belonging to the object passed as the argument.

Parameters:
object - The invoked object of this method invocation.
methodName - The name of the method.
arguments - The arguments of the invocation.

IlrMethodInvocation

public IlrMethodInvocation(IlrValue object,
                           String methodName,
                           IlrValue[] arguments,
                           ilog.rules.factory.IlrReflectClass[] genericArgs)
Constructs an invocation of a generic method belonging to the object passed as the argument.

Parameters:
object - The invoked object of this method invocation.
methodName - The name of the method.
arguments - The arguments of the invocation.
genericArgs - The type arguments to use to instantiate the generic method.

IlrMethodInvocation

public IlrMethodInvocation(IlrValue object,
                           Method method,
                           IlrValue[] arguments)
Constructs an invocation of a method belonging to the object passed as the argument.

Parameters:
object - The invoked object of this method invocation.
method - A method.
arguments - The arguments of this method.
Method Detail

setMethod

public void setMethod(String methodName)
Sets a method for this method call. The method is introspected using the arguments that have been added previously.

Parameters:
methodName - The name of the method.

getObject

public IlrValue getObject()
Gets the object invoked by this method call.

Returns:
The invoked object of this method call.

getXOMMethod

public IlrMethod getXOMMethod()
Gets the method of this method call.

Returns:
The method of this method call.

getGenericArguments

public ilog.rules.factory.IlrReflectClass[] getGenericArguments()
Gets the type arguments for a generic method call.

Returns:
The type arguments.

getName

public String getName()
Gets the method name of this method call.

Returns:
The method name of this method call.

getClassName

public String getClassName()
Gets the fully-qualified name of the class which declares the method.

Returns:
The fully-qualified name of the class which declares the method.

getShortClassName

public String getShortClassName()
Gets the short name of the class which declares the method.

Returns:
The short name of the class which declares the method.

exploreValue

public Object exploreValue(IlrFactoryExplorer explorer)
Explores this method call as a value using a factory explorer.

Specified by:
exploreValue in class IlrValue
Parameters:
explorer - The factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
Explores this method call as a statement using a factory explorer.

Specified by:
exploreStatement in interface IlrStatement
Parameters:
explorer - The factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

toString

public String toString()
Overrides:
toString in class Object

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013