Rule Execution Server API

ilog.rules.factory
Class IlrNewInstanceValue

java.lang.Object
  extended by ilog.rules.factory.IlrValue
      extended by ilog.rules.factory.IlrNaryValue
          extended by ilog.rules.factory.IlrNewInstanceValue
All Implemented Interfaces:
Serializable

public class IlrNewInstanceValue
extends IlrNaryValue

This class represents an invocation of a constructor in the rule language, that is, an object allocation.

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
IlrNewInstanceValue(IlrConstructor constructor, IlrValue[] arguments)
          Constructs an object allocation expression using a constructor and an argument list.
IlrNewInstanceValue(IlrReflect reflect)
          Constructs an object allocation expression.
IlrNewInstanceValue(IlrReflect reflect, Class clazz, IlrValue[] arguments)
          Constructs an object allocation expression on a class and using an argument list.
IlrNewInstanceValue(IlrReflect reflect, Constructor constructor, IlrValue[] arguments)
          Constructs an object allocation expression using a constructor and an argument list.
IlrNewInstanceValue(IlrReflect reflect, String className, IlrValue[] arguments)
          Constructs an object allocation expression using a class name and an argument list.
 
Method Summary
 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 allocated object's class.
 String getShortClassName()
          Gets the short name of the allocated object's class.
 IlrConstructor getXOMConstructor()
          Gets the constructor of this allocation expression.
 void setConstructor(Class clazz)
          Sets a constructor for this expression.
 void setConstructor(String className)
          Sets a constructor for this expression.
 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

IlrNewInstanceValue

public IlrNewInstanceValue(IlrReflect reflect)
Constructs an object allocation expression.

Parameters:
reflect - A reflect.

IlrNewInstanceValue

public IlrNewInstanceValue(IlrReflect reflect,
                           Class clazz,
                           IlrValue[] arguments)
Constructs an object allocation expression on a class and using an argument list.

Parameters:
reflect - A reflect.
clazz - The class to be instantiated.
arguments - The argument list of the constructor.

IlrNewInstanceValue

public IlrNewInstanceValue(IlrReflect reflect,
                           String className,
                           IlrValue[] arguments)
Constructs an object allocation expression using a class name and an argument list.

Parameters:
reflect - A reflect.
className - The name of the class to be instantiated.
arguments - The argument list of the constructor.

IlrNewInstanceValue

public IlrNewInstanceValue(IlrReflect reflect,
                           Constructor constructor,
                           IlrValue[] arguments)
Constructs an object allocation expression using a constructor and an argument list.

Parameters:
reflect - A reflect.
constructor - The constructor used to instantiate an object.
arguments - The argument list of the constructor.

IlrNewInstanceValue

public IlrNewInstanceValue(IlrConstructor constructor,
                           IlrValue[] arguments)
Constructs an object allocation expression using a constructor and an argument list.

Parameters:
constructor - The constructor used to instantiate an object.
arguments - The argument list of the constructor.
Method Detail

setConstructor

public void setConstructor(Class clazz)
Sets a constructor for this expression. The constructor is introspected using the passed class and the arguments previously added.

Parameters:
clazz - The class to be instantiated.

setConstructor

public void setConstructor(String className)
Sets a constructor for this expression. The constructor is introspected in the class whose name is passed as an argument and the arguments previously added.

Parameters:
className - The name of the class to be instantiated.

getXOMConstructor

public IlrConstructor getXOMConstructor()
Gets the constructor of this allocation expression.

Returns:
The constructor of this allocation expression.

getClassName

public String getClassName()
Gets the fully qualified name of the allocated object's class.

Returns:
The fully qualified name of the allocated object's class.

getShortClassName

public String getShortClassName()
Gets the short name of the allocated object's class.

Returns:
The short name of the allocated object's class.

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.

toString

public String toString()
Overrides:
toString in class Object

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013