Rule Execution Server API

ilog.rules.bom.dynamic
Class IlrDynamicPackage

java.lang.Object
  extended by ilog.rules.bom.dynamic.IlrDynamicModelElement
      extended by ilog.rules.bom.dynamic.IlrDynamicPackage
All Implemented Interfaces:
IlrModelElement, IlrNamespace, IlrPackage, IlrProperties, IlrTransientProperties, IlrMutableModelElement, IlrMutablePackage, IlrVisitable, Serializable

public class IlrDynamicPackage
extends IlrDynamicModelElement
implements Serializable, IlrMutablePackage, IlrVisitable

An implementation of the ilog.rules.bom.IlrPackage interface.

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

Method Summary
 void accept(IlrVisitor visitor)
          Defines a default visit path: here visit the enums, the classes and the nested packages.
 IlrDynamicClass addClass(String name)
          Deprecated. Use IlrModelFactory.createClass(ilog.rules.bom.mutable.IlrMutablePackage, java.lang.String) instead.
 IlrDynamicPackage addPackage(String name)
          Adds a IlrDynamicPackage in this package.
 Iterator allClasses()
          Returns an iterator over all classes contained in this package including, recursively, the classes contained in nested packages.
 Iterator allEnums()
          Returns an iterator over all enumerated types contained in this package including, recursively, the enumerated types contained in nested packages.
 Iterator allPackages()
          Returns an iterator over all packages contained in this package including, recursively, the packages they contain etc.
 IlrClass getClass(String name)
          Searches the package for a class having the given name.
 List getClasses()
          Returns the list of the classes contained in this package.
 IlrEnum getEnum(String name)
          Searches the package for an enumerated type having the given name.
 List getEnums()
          Returns the list of the enumerated types contained in this package.
 IlrClass getGenericClass(String rawClassName, int numberOfTypeParameters)
           
 IlrNamespace getNamespace(String name)
          Returns the contained name space having the given name.
 IlrPackage getNestedPackage(String name)
          Searches for a nested package having the given name.
 List getNestedPackages()
          Returns the list of the packages nested in this package.
 Iterator modelElementIterator()
          Returns an iterator over the model elements contained in the namespace.
 Iterator types()
          Returns an iterator over all types defined in this package.
 
Methods inherited from class ilog.rules.bom.dynamic.IlrDynamicModelElement
fireUpdate, fireUpdate, fixType, getFullyQualifiedName, getMutableObjectModel, getName, getObjectModel, getPropertyValue, getPropertyValue, hasListeners, isPropertyPersistent, propertyNames, removeProperty, setPersistentProperty, setPersistentProperty, setPropertyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.rules.bom.IlrPackage
getEnclosingPackage, isDefaultPackage, visit
 
Methods inherited from interface ilog.rules.bom.IlrModelElement
getEnclosingNamespace, getFullyQualifiedName, getName, getObjectModel
 
Methods inherited from interface ilog.rules.bom.IlrProperties
isPropertyPersistent, setPersistentProperty, setPersistentProperty
 
Methods inherited from interface ilog.rules.bom.IlrTransientProperties
getPropertyValue, getPropertyValue, propertyNames, removeProperty, setPropertyValue
 
Methods inherited from interface ilog.rules.bom.mutable.IlrMutableModelElement
getMutableObjectModel
 

Method Detail

addPackage

public IlrDynamicPackage addPackage(String name)
Adds a IlrDynamicPackage in this package. Note that no check is made that the given name is not already used in this package.

Parameters:
name - the name of the package.
Returns:
the added package.

addClass

public IlrDynamicClass addClass(String name)
Deprecated. Use IlrModelFactory.createClass(ilog.rules.bom.mutable.IlrMutablePackage, java.lang.String) instead.

Adds a IlrDynamicClass in this package. Note that this method does not check that the given name is not already used in the package.

Parameters:
name - the name of the class.
Returns:
the class.

accept

public void accept(IlrVisitor visitor)
Defines a default visit path: here visit the enums, the classes and the nested packages.

Specified by:
accept in interface IlrVisitable
Parameters:
visitor - The visitor.

getNestedPackages

public List getNestedPackages()
Returns the list of the packages nested in this package. Note that if there are no nested packages, this method may either return null or an empty list.

Specified by:
getNestedPackages in interface IlrPackage

getEnums

public List getEnums()
Returns the list of the enumerated types contained in this package. Note that if there are no enumerated types, this method may either return null or an empty list.

Specified by:
getEnums in interface IlrPackage

getClasses

public List getClasses()
Returns the list of the classes contained in this package. Note that if there are no classes, this method may either return null or an empty list.

Specified by:
getClasses in interface IlrNamespace
Specified by:
getClasses in interface IlrPackage

modelElementIterator

public Iterator modelElementIterator()
Returns an iterator over the model elements contained in the namespace.

Specified by:
modelElementIterator in interface IlrNamespace

getNamespace

public IlrNamespace getNamespace(String name)
Returns the contained name space having the given name. If such a namespace exists, it is returned, otherwise null is returned.

Specified by:
getNamespace in interface IlrNamespace
Since:
JRules 7.0

types

public Iterator types()
Returns an iterator over all types defined in this package. These types are the classes and enumerated types contained in the package.

Specified by:
types in interface IlrPackage

getNestedPackage

public IlrPackage getNestedPackage(String name)
Searches for a nested package having the given name. If such a package exists it is returned, otherwise null is returned.

Specified by:
getNestedPackage in interface IlrPackage

getEnum

public IlrEnum getEnum(String name)
Searches the package for an enumerated type having the given name. If such an enumerated type exists it is returned, otherwise null is returned.

Specified by:
getEnum in interface IlrPackage

getClass

public IlrClass getClass(String name)
Searches the package for a class having the given name. If such a class exists it is returned, otherwise null is returned.

Specified by:
getClass in interface IlrNamespace
Specified by:
getClass in interface IlrPackage

getGenericClass

public IlrClass getGenericClass(String rawClassName,
                                int numberOfTypeParameters)
Specified by:
getGenericClass in interface IlrNamespace

allPackages

public Iterator allPackages()
Returns an iterator over all packages contained in this package including, recursively, the packages they contain etc.

Specified by:
allPackages in interface IlrPackage

allEnums

public Iterator allEnums()
Returns an iterator over all enumerated types contained in this package including, recursively, the enumerated types contained in nested packages.

Specified by:
allEnums in interface IlrPackage

allClasses

public Iterator allClasses()
Returns an iterator over all classes contained in this package including, recursively, the classes contained in nested packages.

Specified by:
allClasses in interface IlrPackage

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013