ilog.rules.bom.mutable

Interface IlrModelFactory

  • All Known Implementing Classes:
    IlrDynamicModelFactory


    public interface IlrModelFactory
    Factory API for building an object model.
    Since:
    JRules 5.0
    • Method Detail

      • getOrCreateModel

        IlrMutableObjectModel getOrCreateModel()
        Returns a mutable object model, and creates one if needed.
        Returns:
        A mutable object model.
      • createPackage

        IlrMutablePackage createPackage(java.lang.String name)
        Creates or retrieves a package using an absolute name.
        Parameters:
        name - An absolute name with '.' separators. All the intermediary packages are created if needed.
        Returns:
        The created or retrieved package.
      • createPackage

        IlrMutablePackage createPackage(IlrMutablePackage parentPackage,
                                      java.lang.String relativeName)
        Creates or retrieves a package using a relative name.
        Parameters:
        parentPackage - The parent package in which the package will be created.
        relativeName - The name of the package to be created. It is relative to the parent package. The name may contain '.' separators. In this case, the intermediary packages are created as needed.
        Returns:
        The created or retrieved package.
      • createEnum

        IlrMutableType createEnum(IlrMutablePackage parentPackage,
                                java.lang.String name)
        Creates an enum.
        Parameters:
        parentPackage - The package that will contain the new enum.
        name - The enum name. It cannot contain '.' separators.
        Returns:
        A newly created enum.
      • createClass

        IlrMutableClass createClass(IlrMutablePackage parentPackage,
                                  java.lang.String className)
        Creates a class in a package.
        Parameters:
        parentPackage - The package that will contain the new class.
        className - The class name. It cannot contain '.' separators.
        Returns:
        The newly created class.
      • createClass

        IlrMutableClass createClass(java.lang.String className)
        Creates a class using an absolute name
        Parameters:
        className - The class name. It may contain '.' separators.
        Returns:
        The created class.
      • createNestedClass

        IlrMutableClass createNestedClass(IlrMutableClass parentClass,
                                        java.lang.String className)
        Creates a nested class, that is a class in a class.
        Parameters:
        parentClass - The class that will contain a new class.
        className - The class name. It cannot contain '.' separators.
        Returns:
        The newly created class.
      • createConstructor

        IlrMutableConstructor createConstructor(IlrMutableClass aClass)
        Creates a constructor.
        Parameters:
        aClass - The declaring class of the constructor.
        Returns:
        The newly created constructor.
      • createMethod

        IlrMutableMethod createMethod(IlrMutableClass aClass,
                                    java.lang.String methodName)
        Creates a method.
        Parameters:
        aClass - The declaring class of the method.
        Returns:
        The newly created method.
      • createAttribute

        IlrMutableAttribute createAttribute(IlrMutableClass aClass,
                                          java.lang.String name)
        Creates an attribute.
        Parameters:
        aClass - The declaring class of the attribute.
        name - The name of the attribute.
        Returns:
        The newly created attribute.
      • createRestrictedAttribute

        IlrMutableAttribute createRestrictedAttribute(IlrMutableClass aClass,
                                                    IlrAttribute originAttribute)
        Creates a restricted attribute.
        Parameters:
        aClass - The declaring class of the attribute.
        originAttribute - The origin attribute.
        Returns:
        The newly created restricted attribute.
        See Also:
        ilog.rules.bom.IlrAttribute.isRestriction()
      • createComponentProperty

        IlrMutableComponentProperty createComponentProperty(IlrMutableClass aClass,
                                                          java.lang.String name)
        Creates a component property.
        Parameters:
        aClass - The declaring class of the component property.
        name - The name of the component property.
        Returns:
        The newly created component property.
      • createIndexedComponentProperty

        IlrMutableIndexedComponentProperty createIndexedComponentProperty(IlrMutableClass aClass,
                                                                        java.lang.String name)
        Creates an indexed component property.
        Parameters:
        aClass - The declaring class of the indexed component property.
        name - The name of the indexed component property.
        Returns:
        The newly created indexed component property.
      • createCollectionDomain

        IlrMutableCollectionDomain createCollectionDomain(int min,
                                                        int max)
        Creates a collection domain.
        Since:
        JRules 6.5
        Parameters:
        min - The minimal number of elements in the collection.
        max - The maximum number of elements in the collection.
        Returns:
        The newly created collection domain.
      • createEnumeratedDomain

        IlrDomain createEnumeratedDomain(java.util.List values)
        Creates an enumerated domain.
        Parameters:
        values - The values of the enumeration.
        Returns:
        The newly created enumerated domain.
      • createStaticReference

        IlrMutableStaticReference createStaticReference(java.lang.String name)
        Creates a static reference.
        Parameters:
        name - The name of the static reference.
        Returns:
        A newly created static reference.
      • createActualValue

        IlrMutableActualValue createActualValue()
        Creates an actual value.
        Returns:
        A newly created actual value.
      • createProperties

        IlrProperties createProperties()
        Creates properties to be used as nested properties.
        Returns:
        Newly created properties.
      • createTypeVariable

        IlrMutableTypeVariable createTypeVariable(java.lang.String name)
        Creates a type variable.
        Since:
        JRules 6.0
        Parameters:
        name - A String that represents the name of the variable.
      • createWildcardType

        IlrWildcardType createWildcardType()
        Creates a wild card type.
        Since:
        JRules 6.0
      • createClass

        IlrMutableClass createClass(java.lang.Class aClass)
        Creates a class from a native class.
        Parameters:
        aClass - The native class.
        Returns:
        A newly created class referencing a native class.
      • createConstructor

        IlrMutableConstructor createConstructor(IlrMutableClass aClass,
                                              java.lang.reflect.Constructor constructor)
        Creates a constructor from a native constructor.
        Parameters:
        aClass - The declaring class. It has to be the class referencing the native class, declaring the native constructor.
        constructor - The native constructor.
        Returns:
        A newly created constructor referencing a native constructor.
      • createMethod

        IlrMutableMethod createMethod(IlrMutableClass aClass,
                                    java.lang.reflect.Method method)
        Creates a method from a native method.
        Parameters:
        aClass - The declaring class. It has to be the class referencing the native class, declaring the native method.
        method - The native method.
        Returns:
        A newly created method referencing a native method.
      • createAttribute

        IlrMutableAttribute createAttribute(IlrMutableClass aClass,
                                          java.lang.reflect.Field field)
        Creates an attribute from a native field.
        Parameters:
        aClass - The declaring class. It has to be the class referencing the native class, declaring the native field.
        field - The native field.
        Returns:
        A newly created attribute referencing a native field.
      • createComponentProperty

        IlrMutableComponentProperty createComponentProperty(IlrMutableClass aClass,
                                                          java.beans.PropertyDescriptor descriptor)
        Creates a component property from a native property.
        Parameters:
        aClass - The declaring class. It has to be the class referencing the native class, declaring the native property.
        descriptor - The native property descriptor.
        Returns:
        A newly created component property referencing a native property.
      • createIndexedComponentProperty

        IlrMutableIndexedComponentProperty createIndexedComponentProperty(IlrMutableClass aClass,
                                                                        java.beans.IndexedPropertyDescriptor descriptor)
        Creates an indexed component property from a native indexed property.
        Parameters:
        aClass - The declaring class. It has to be the class referencing the native class, declaring the native indexed property.
        descriptor - The native indexed property descriptor.
        Returns:
        A newly created indexed component property referencing a native indexed property.

© Copyright IBM Corp. 1987, 2017