Rule Execution Server API

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 Summary
 IlrMutableActualValue createActualValue()
          Creates an actual value.
 IlrMutableClass createArrayClass(IlrType componentType)
           
 IlrMutableAttribute createAttribute(IlrMutableClass aClass, Field field)
          Creates an attribute from a native field.
 IlrMutableAttribute createAttribute(IlrMutableClass aClass, String name)
          Creates an attribute.
 IlrMutableClass createBoundClass(IlrClass genericType, IlrType[] typeParameters)
           
 IlrMutableBoundedDomain createBoundedDomain()
          Creates a bounded domain.
 IlrMutableMethod createBoundMethod(IlrMethod genericMethod, IlrType[] typeParameters)
           
 IlrMutableClass createClass(Class aClass)
          Creates a class from a native class.
 IlrMutableClass createClass(IlrMutablePackage parentPackage, String className)
          Creates a class in a package.
 IlrMutableClass createClass(String className)
          Creates a class using an absolute name
 IlrMutableCollectionDomain createCollectionDomain(int min, int max)
          Creates a collection domain.
 IlrMutableComponentProperty createComponentProperty(IlrMutableClass aClass, PropertyDescriptor descriptor)
          Creates a component property from a native property.
 IlrMutableComponentProperty createComponentProperty(IlrMutableClass aClass, String name)
          Creates a component property.
 IlrMutableConstructor createConstructor(IlrMutableClass aClass)
          Creates a constructor.
 IlrMutableConstructor createConstructor(IlrMutableClass aClass, Constructor constructor)
          Creates a constructor from a native constructor.
 IlrMutableDomainIntersection createDomainIntersection()
          Creates a domain intersection.
 IlrMutableType createEnum(IlrMutablePackage parentPackage, String name)
          Creates an enum.
 IlrDomain createEnumeratedDomain(List values)
          Creates an enumerated domain.
 IlrMutableClass createGenericDefinition(Class clazz, IlrMutableTypeVariable[] typeParameters)
           
 IlrMutableClass createGenericDefinition(IlrMutablePackage pkg, String className, IlrMutableTypeVariable[] typeParameters)
           
 IlrMutableClass createGenericDefinition(String className, IlrMutableTypeVariable[] typeParameters)
           
 IlrMutableIndexedComponentProperty createIndexedComponentProperty(IlrMutableClass aClass, IndexedPropertyDescriptor descriptor)
          Creates an indexed component property from a native indexed property.
 IlrMutableIndexedComponentProperty createIndexedComponentProperty(IlrMutableClass aClass, String name)
          Creates an indexed component property.
 IlrMutableMethod createMethod(IlrMutableClass aClass, Method method)
          Creates a method from a native method.
 IlrMutableMethod createMethod(IlrMutableClass aClass, String methodName)
          Creates a method.
 IlrMutableClass createNestedClass(IlrMutableClass parentClass, String className)
          Creates a nested class, that is a class in a class.
 IlrMutableClass createNestedGenericDefinition(IlrMutableClass parentClass, String className, IlrMutableTypeVariable[] typeParameters)
           
 IlrMutablePackage createPackage(IlrMutablePackage parentPackage, String relativeName)
          Creates or retrieves a package using a relative name.
 IlrMutablePackage createPackage(String name)
          Creates or retrieves a package using an absolute name.
 IlrMutableParameter createParameter(IlrMutableMemberWithParameter member, String parameterName, IlrType type)
          Creates a parameter.
 IlrMutableParameter createParameter(String parameterName, IlrType type)
          Creates a parameter.
 IlrMutablePatternDomain createPatternDomain()
          Creates a pattern domain.
 IlrProperties createProperties()
          Creates properties to be used as nested properties.
 IlrMutableClass createRawClass(Class clazz)
           
 IlrMutableMethod createRawMethod(IlrMethod genericMethod)
           
 IlrMutableAttribute createRestrictedAttribute(IlrMutableClass aClass, IlrAttribute originAttribute)
          Creates a restricted attribute.
 IlrMutableStaticReference createStaticReference(String name)
          Creates a static reference.
 IlrMutableTypeVariable createTypeVariable(String name)
          Creates a type variable.
 IlrWildcardType createWildcardType()
          Creates a wild card type.
 IlrMutableObjectModel getOrCreateModel()
          Returns a mutable object model, and creates one if needed.
 

Method Detail

getOrCreateModel

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

Returns:
A mutable object model.

createPackage

IlrMutablePackage createPackage(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,
                                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,
                          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,
                            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(String className)
Creates a class using an absolute name

Parameters:
className - The class name. It may contain '.' separators.
Returns:
The created class.

createArrayClass

IlrMutableClass createArrayClass(IlrType componentType)

createGenericDefinition

IlrMutableClass createGenericDefinition(String className,
                                        IlrMutableTypeVariable[] typeParameters)

createGenericDefinition

IlrMutableClass createGenericDefinition(IlrMutablePackage pkg,
                                        String className,
                                        IlrMutableTypeVariable[] typeParameters)

createNestedGenericDefinition

IlrMutableClass createNestedGenericDefinition(IlrMutableClass parentClass,
                                              String className,
                                              IlrMutableTypeVariable[] typeParameters)

createGenericDefinition

IlrMutableClass createGenericDefinition(Class clazz,
                                        IlrMutableTypeVariable[] typeParameters)

createBoundClass

IlrMutableClass createBoundClass(IlrClass genericType,
                                 IlrType[] typeParameters)

createRawClass

IlrMutableClass createRawClass(Class clazz)

createNestedClass

IlrMutableClass createNestedClass(IlrMutableClass parentClass,
                                  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,
                              String methodName)
Creates a method.

Parameters:
aClass - The declaring class of the method.
Returns:
The newly created method.

createBoundMethod

IlrMutableMethod createBoundMethod(IlrMethod genericMethod,
                                   IlrType[] typeParameters)

createRawMethod

IlrMutableMethod createRawMethod(IlrMethod genericMethod)

createParameter

IlrMutableParameter createParameter(IlrMutableMemberWithParameter member,
                                    String parameterName,
                                    IlrType type)
Creates a parameter.

Parameters:
member - The member parameterized by the new parameter.
parameterName - The name of the parameter.
type - The type of the parameter.
Returns:
The newly created parameter.
See Also:
IlrMethod, IlrIndexedComponentProperty

createParameter

IlrMutableParameter createParameter(String parameterName,
                                    IlrType type)
Creates a parameter. The created parameter is not related to a member. To register it in a member, you have to call both IlrMutableParameter.setDeclaringMember(ilog.rules.bom.IlrMemberWithParameter) and IlrMutableMemberWithParameter.addParameter(ilog.rules.bom.IlrParameter) or IlrMutableMemberWithParameter.setParameters(java.util.List).

Parameters:
parameterName - The name of the parameter.
type - The type of the parameter.
Returns:
The newly created parameter.
See Also:
IlrMutableMemberWithParameter

createAttribute

IlrMutableAttribute createAttribute(IlrMutableClass aClass,
                                    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,
                                                    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,
                                                                  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(List values)
Creates an enumerated domain.

Parameters:
values - The values of the enumeration.
Returns:
The newly created enumerated domain.

createBoundedDomain

IlrMutableBoundedDomain createBoundedDomain()
Creates a bounded domain. To be completed by calling IlrMutableBoundedDomain methods.

Returns:
The newly created bounded domain.

createPatternDomain

IlrMutablePatternDomain createPatternDomain()
Creates a pattern domain. To be completed by calling IlrMutablePatternDomain methods.

Returns:
The newly created pattern domain.

createDomainIntersection

IlrMutableDomainIntersection createDomainIntersection()
Creates a domain intersection. To be completed by calling IlrMutableDomainIntersection methods.

Returns:
The newly created domain intersection.

createStaticReference

IlrMutableStaticReference createStaticReference(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(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(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,
                                        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,
                              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,
                                    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,
                                                    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,
                                                                  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.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013