ilog.rules.factory

Class IlrNewInstanceValue

  • All Implemented Interfaces:
    java.io.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 Detail

      • IlrNewInstanceValue

        public IlrNewInstanceValue(IlrReflect reflect)
        Constructs an object allocation expression.
        Parameters:
        reflect - A reflect.
      • IlrNewInstanceValue

        public IlrNewInstanceValue(IlrReflect reflect,
                           java.lang.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,
                           java.lang.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,
                           java.lang.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(java.lang.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(java.lang.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 java.lang.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 java.lang.String getShortClassName()
        Gets the short name of the allocated object's class.
        Returns:
        The short name of the allocated object's class.
      • exploreValue

        public java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

© Copyright IBM Corp. 1987, 2017