Rule Execution Server API

ilog.rules.factory
Class IlrStaticMethodInvocation

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

public class IlrStaticMethodInvocation
extends IlrNaryValue
implements IlrStatement

This class represents a static 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
IlrStaticMethodInvocation(IlrClass clazz, String methodName, IlrValue[] arguments)
          Constructs a static method invocation using a class, a method name, and an argument list.
IlrStaticMethodInvocation(IlrClass clazz, String methodName, IlrValue[] arguments, ilog.rules.factory.IlrReflectClass[] genericArgs)
          Constructs a generic static method invocation using a class, a method, name, an argument list, and a generic argument list.
IlrStaticMethodInvocation(IlrMethod method, IlrValue[] arguments)
          Constructs a static method invocation using an introspected method and an argument list.
IlrStaticMethodInvocation(IlrReflect reflect)
          Constructs an uninitialized static method invocation.
IlrStaticMethodInvocation(IlrReflect reflect, Class clazz, String methodName, IlrValue[] arguments)
          Constructs a static method invocation using a class, a method name, and an argument list.
IlrStaticMethodInvocation(IlrReflect reflect, Method method, IlrValue[] arguments)
          Constructs a static method invocation using an introspected method and an argument list.
IlrStaticMethodInvocation(IlrReflect reflect, String className, String methodName, IlrValue[] arguments)
          Constructs a static method invocation using a class name, a method name, and an argument list.
 
Method Summary
 Object exploreStatement(IlrFactoryExplorer explorer)
          Explores this method as a statement using a factory explorer and returns an object as a result.
 Object exploreValue(IlrFactoryExplorer explorer)
          Explores this value using a factory explorer and returns an object as a result.
 String getClassName()
          Gets the fully qualified name of the class that declares the method.
 ilog.rules.factory.IlrReflectClass[] getGenericArguments()
          Gets the type arguments for a generic method call.
 String getName()
          Gets the name of the IlrStaticMethodInvocation method.
 IlrValue getObject()
           Gets the object invoked by this method call.
 String getShortClassName()
          Gets the short name of the class that declares the method.
 IlrMethod getXOMMethod()
          Gets the method of the IlrStaticMethodInvocation.
 void setMethod(IlrClass clazz, String methodName)
          Sets the method by selecting it in a class.
 void setObject(IlrValue object)
           Sets the object invoked by 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

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrReflect reflect)
Constructs an uninitialized static method invocation.

Parameters:
reflect - A reflect.

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrReflect reflect,
                                 Class clazz,
                                 String methodName,
                                 IlrValue[] arguments)
Constructs a static method invocation using a class, a method name, and an argument list.

Parameters:
reflect - A reflect.
clazz - The class which defines the method.
methodName - The name of the method.
arguments - The arguments.

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrClass clazz,
                                 String methodName,
                                 IlrValue[] arguments)
Constructs a static method invocation using a class, a method name, and an argument list.

Parameters:
clazz - The class which defines the method.
methodName - The name of the method.
arguments - The arguments.

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrClass clazz,
                                 String methodName,
                                 IlrValue[] arguments,
                                 ilog.rules.factory.IlrReflectClass[] genericArgs)
Constructs a generic static method invocation using a class, a method, name, an argument list, and a generic argument list.

Parameters:
clazz - The class which defines the method.
methodName - The name of the method.
arguments - The arguments.
genericArgs - The generic argument types.

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrReflect reflect,
                                 String className,
                                 String methodName,
                                 IlrValue[] arguments)
Constructs a static method invocation using a class name, a method name, and an argument list.

Parameters:
reflect - A reflect.
className - The name of the class which defines the method.
methodName - The name of the method.
arguments - The arguments.

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrReflect reflect,
                                 Method method,
                                 IlrValue[] arguments)
Constructs a static method invocation using an introspected method and an argument list.

Parameters:
reflect - A reflect.
method - A method.
arguments - The arguments.

IlrStaticMethodInvocation

public IlrStaticMethodInvocation(IlrMethod method,
                                 IlrValue[] arguments)
Constructs a static method invocation using an introspected method and an argument list.

Parameters:
method - A method.
arguments - The arguments.
Method Detail

setMethod

public void setMethod(IlrClass clazz,
                      String methodName)
Sets the method by selecting it in a class. The selection uses the name of the method and the arguments that have been added to it previously.

Parameters:
clazz - The class from which the searching starts.
methodName - The method name.

getXOMMethod

public IlrMethod getXOMMethod()
Gets the method of the IlrStaticMethodInvocation.

Returns:
The method of this method invocation.

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 name of the IlrStaticMethodInvocation method.

Returns:
The name of the method of this method invocation.

getClassName

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

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

getShortClassName

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

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

exploreValue

public Object exploreValue(IlrFactoryExplorer explorer)
Explores this value using a factory explorer and returns an object as a result.

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

exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
Explores this method as a statement using a factory explorer and returns an object as a result.

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.

getObject

public IlrValue getObject()

Gets the object invoked by this method call.

Returns:
The invoked object of this method call.

setObject

public void setObject(IlrValue object)

Sets the object invoked by this method call.

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

toString

public String toString()
Overrides:
toString in class Object

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013