Rule Execution Server API

ilog.rules.bom
Interface IlrPackage

All Superinterfaces:
IlrModelElement, IlrNamespace, IlrProperties, IlrTransientProperties, IlrVisitable
All Known Subinterfaces:
IlrMutablePackage
All Known Implementing Classes:
IlrDynamicPackage

public interface IlrPackage
extends IlrNamespace, IlrVisitable

This interface is used to represent class packages in an object model.


Method Summary
 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.
 IlrPackage getEnclosingPackage()
          Returns the package in which this package is contained or null if this package is the default 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.
 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.
 boolean isDefaultPackage()
          Returns true if this package is the default package of an object model
 Iterator types()
          Returns an iterator over all types defined in this package.
 boolean visit(IlrObjectModel.Visitor visitor)
          Deprecated. Use IlrVisitor instead.
 
Methods inherited from interface ilog.rules.bom.IlrNamespace
getGenericClass, getNamespace, modelElementIterator
 
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.util.IlrVisitable
accept
 

Method Detail

isDefaultPackage

boolean isDefaultPackage()
Returns true if this package is the default package of an object model


getEnclosingPackage

IlrPackage getEnclosingPackage()
Returns the package in which this package is contained or null if this package is the default package.


visit

boolean visit(IlrObjectModel.Visitor visitor)
Deprecated. Use IlrVisitor instead.

Calls the appropriate visitor's visitXXX methods for the classes and enumerated types contained in this package and, recursively, in those contained in nested packages. If a call to one of the visitor's visitXXX methods returns false then this method returns immediately the value false. Otherwise true is returned after all elements have been visited.

Parameters:
visitor - A visitor.
Returns:
true if the package was entirely visited.

getNestedPackages

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.


getEnums

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.


getClasses

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

types

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


getNestedPackage

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.


getEnum

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.


getClass

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

allPackages

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


allEnums

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


allClasses

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


Rule Execution Server API

© Copyright IBM Corp. 1987, 2013