public class IlrPackage
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
IlrPackage(ilog.rules.factory.IlrReflectClass contextClass,
IlrRuleset ruleset,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsRule(IlrRule rule)
Tests whether the package contains a rule.
|
IlrFunction[] |
getAllFunctions()
Returns all the functions in the package.
|
IlrRule[] |
getAllRules()
Returns all the rules in the package.
|
IlrTask[] |
getAllTasks()
Returns all the tasks in the package.
|
IlrFunction |
getFunction(java.lang.String name,
java.lang.Class[] argumentTypes)
Returns the function in the ruleset whose name is
name and whose argument types are those passed as
parameters. |
IlrFunction |
getFunction(java.lang.String name,
IlrType[] argumentTypes)
Returns the function in the ruleset whose name is
name and whose argument types are those passed as
parameters. |
java.lang.String |
getName()
Returns the name of the package.
|
IlrRule |
getRule(java.lang.String ruleName)
Returns the rule whose name is given as the parameter.
|
java.util.Iterator |
getRuleIterator()
Returns an iterator on the rules contained in the package.
|
int |
getRuleNumber()
Returns the number of rules in this package.
|
IlrRuleset |
getRuleset()
Returns the ruleset that contains
this package. |
IlrTask |
getTask(java.lang.String name)
Returns the task defined in the package and whose name is the one passed as the parameter.
|
IlrRulesetParameter[] |
getVariables()
Returns the variables defined in this package.
|
boolean |
isDefaultPackage()
Returns a boolean telling whether the package is the default package or not.
|
IlrPackageFactory |
makeFactory()
Builds a factory object to represent this package.
|
IlrPackageFactory |
makeFactory(IlrRulesetFactory rulesetF)
Builds a factory object to represent this package.
|
public IlrPackage(ilog.rules.factory.IlrReflectClass contextClass,
IlrRuleset ruleset,
java.lang.String name)
public boolean isDefaultPackage()
true if the package is the default package, else returns false.public java.lang.String getName()
public IlrRuleset getRuleset()
this package.public final int getRuleNumber()
public final IlrRule getRule(java.lang.String ruleName)
ruleName - The name of the rule.IlrRule whose name is provided as the parameter, if this rule exists. Otherwise,
null is returned.public final java.util.Iterator getRuleIterator()
remove method of this iterator will
throw an UnsupportedOperationException.IlrRule instances.public final boolean containsRule(IlrRule rule)
rule - A rule.true if the package contains the rule. Otherwise, it returns false.public final IlrRule[] getAllRules()
IlrRule. The length of the array can be 0.public final IlrFunction[] getAllFunctions()
IlrFunction[]. The length of the array can be 0.public final IlrFunction getFunction(java.lang.String name, IlrType[] argumentTypes)
name and whose argument types are those passed as
parameters.name - The name of the function.argumentTypes - The array of argument types that correspond to the signature of the function we are looking
for.public final IlrFunction getFunction(java.lang.String name, java.lang.Class[] argumentTypes)
name and whose argument types are those passed as
parameters.name - The name of the function.argumentTypes - The array of argument types, as Class, that correspond to the signature of the
function we are looking for.public IlrTask getTask(java.lang.String name)
null if no such task exists.name - The name of a task to return.name.public final IlrTask[] getAllTasks()
IlrTask[]. The length of the array can be 0.public IlrRulesetParameter[] getVariables()
IlrRulesetParameter, each
of them containing the type as an IlrClass and the name of the variable.IlrRulesetParameterpublic final IlrPackageFactory makeFactory()
public final IlrPackageFactory makeFactory(IlrRulesetFactory rulesetF)
rulesetF - An IlrRulesetFactory.© Copyright IBM Corp. 1987, 2017