Rule Execution Server API

ilog.rules.factory
Class IlrRuleWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by ilog.rules.factory.IlrRuleWriter
All Implemented Interfaces:
IlrFactoryExplorer, Closeable, Flushable, Appendable

public class IlrRuleWriter
extends PrintWriter
implements IlrFactoryExplorer

Conversion of a rule factory into a rule definition of the ILOG Rule Language.

This class implements IlrFactoryExplorer to explore the contents of the factory objects in order to reverse their contents to the language. Thus, most of the public methods are simply required by the interface and are not documented.

See Also:
IlrRulesetFactory.toLanguage()

Field Summary
protected  boolean withStatementEol
           
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
IlrRuleWriter(OutputStream stream)
          Constructs a rule writer using an output stream.
IlrRuleWriter(Writer writer)
          Constructs a rule writer using a writer.
 
Method Summary
 Object exploreAssignable(IlrArrayElement assignable)
          Writes an array element as an assignable and returns an object as the result.
 Object exploreAssignable(IlrFieldValue assignable)
          Writes a field value as an assignable and returns an object as the result.
 Object exploreAssignable(IlrStaticFieldValue assignable)
          Writes a static field value as an assignable and returns an object as the result.
 Object exploreAssignable(IlrVariable assignable)
          Writes a variable as an assignable and returns an object as the result.
 Object exploreCondition(IlrCollectCondition cond)
          Writes a collection condition and returns null.
 Object exploreCondition(IlrEvaluateCondition cond)
          Writes an evaluate condition and returns null.
 Object exploreCondition(IlrExistsCondition cond)
          Writes an exists condition and returns null.
 Object exploreCondition(IlrNotCondition cond)
          Writes a not condition and returns null.
 Object exploreCondition(IlrSimpleCondition cond)
          Writes a simple condition and returns null.
 Object exploreCondition(IlrTimeCondition cond)
          Writes a time condition and returns null.
 Object exploreStatement(IlrApplyAction action)
          Deprecated.  
 Object exploreStatement(IlrAssertAction action)
          Writes an assert action and returns an object as the result.
 Object exploreStatement(IlrAssignment assign)
          Writes an assignment statement and returns an object as the result.
 Object exploreStatement(IlrBindStatement action)
          Writes a bind action and returns an object as the result.
 Object exploreStatement(IlrBreakStatement statement)
          Explores a break as a statement.
 Object exploreStatement(IlrContinueStatement statement)
          Explores a continue as a statement.
 Object exploreStatement(IlrExecuteStatement action)
          Deprecated.  
 Object exploreStatement(IlrForeachStatement statement)
          Writes a foreach instruction and returns an object as the result.
 Object exploreStatement(IlrForStatement statement)
          Writes a for instruction and returns an object as the result.
 Object exploreStatement(IlrFunctionInvocation statement)
          Writes a function invocation and returns an object as the result.
 Object exploreStatement(IlrIfStatement action)
          Writes an if statement block and returns null.
 Object exploreStatement(IlrMethodInvocation statement)
          Writes a method invocation statement and returns an object as the result.
 Object exploreStatement(IlrModifyAction action)
          Writes a modify action and returns an object as the result.
 Object exploreStatement(IlrRetractAction action)
          Writes a retract action and returns an object as the result.
 Object exploreStatement(IlrReturnStatement statement)
          Explores a return as a statement.
 Object exploreStatement(IlrStaticMethodInvocation statement)
          Writes a static method invocation and returns an object as the result.
 Object exploreStatement(IlrTaskForkNodeStatement node)
          Writes the fork ruleflow node and returns an object as the result.
 Object exploreStatement(IlrTaskGotoNodeStatement node)
          Writes the goto ruleflow node and returns an object as the result.
 Object exploreStatement(IlrTaskIfNodeStatement node)
          Writes the if ruleflow node and returns an object as the result.
 Object exploreStatement(IlrTaskInstanceStatement node)
          Writes the task invocation node and returns an object as the result.
 Object exploreStatement(IlrTaskSwitchNodeStatement node)
          Writes the switch ruleflow node and returns an object as the result.
 Object exploreStatement(IlrTaskWhileNodeStatement node)
          Writes the while ruleflow node and returns an object as the result.
 Object exploreStatement(IlrThrowStatement statement)
          Explores a throw as a statement.
 Object exploreStatement(IlrTimeOutBlock action)
          Writes a timeout statement block and returns null
 Object exploreStatement(IlrTryCatchFinallyStatement action)
          Writes a try-catch-finally statement block and returns null.
 Object exploreStatement(IlrUnaryValue statement)
          Writes a unary value invocation and returns an object as the result.
 Object exploreStatement(IlrUpdateAction action)
          Writes an update action and returns an object as the result.
 Object exploreStatement(IlrWhileStatement action)
          Writes a while statement block and returns null.
 Object exploreTest(IlrAfterTest test)
          Explores an after test and returns an object as the result.
 Object exploreTest(IlrBeforeTest test)
          Explores a before test and returns an object as the result.
 Object exploreTest(IlrBinaryTest test)
          Writes a binary test involving two values and returns an object as the result.
 Object exploreTest(IlrInstanceOfTest test)
          Writes an instanceOf test.
 Object exploreTest(IlrNaryTest test)
          Writes an N-ary test and returns an object as the result.
 Object exploreTest(IlrNotTest test)
          Writes a NOT test and returns an object as the result.
 Object exploreTest(IlrOccursinTest test)
          Explores an occursin test and returns an object as the result.
 Object exploreTest(IlrUnaryTest test)
          Writes a test and returns an object as the result.
 Object exploreTest(IlrUnknownTest test)
          Writes an unknown test.
 Object exploreValue(IlrArrayElement value)
          Writes an array element and returns an object as the result.
 Object exploreValue(IlrArrayLength value)
          Writes an array length and returns an object as the result.
 Object exploreValue(IlrAsValue value)
          Writes a cast value and returns null.
 Object exploreValue(IlrBinaryValue value)
          Writes a binary value and returns null.
 Object exploreValue(IlrCastValue value)
          Writes a cast value and returns null.
 Object exploreValue(IlrClassTypeValue value)
          Writes a class type value and returns null.
 Object exploreValue(IlrCollectInSourceValue value)
          Writes a collect value invocation and returns null.
 Object exploreValue(IlrConstantValue value)
          Writes a constant value and returns null.
 Object exploreValue(IlrContextValue value)
          Writes a context value and returns null.
 Object exploreValue(IlrEventTimeValue value)
          Writes an event timestamp value and returns null.
 Object exploreValue(IlrFieldValue value)
          Writes a field value and returns an object as the result.
 Object exploreValue(IlrFunctionInvocation value)
          Writes a function invocation as a value and returns an object as the result.
 Object exploreValue(IlrInstanceValue value)
          Writes a rule instance value and returns null.
 Object exploreValue(IlrIntervalValue value)
          Explores a value modeling an interval.
 Object exploreValue(IlrMethodInvocation value)
          Writes a method invocation value and returns an object as the result.
 Object exploreValue(IlrNewArrayInstanceValue value)
          Writes an array creation value and returns an object as the result.
 Object exploreValue(IlrNewInstanceValue value)
          Writes an object creation value and returns an object as the result.
 Object exploreValue(IlrObjectValue value)
          Writes an object value and returns null.
 Object exploreValue(IlrPropertyAccessValue arg)
          Writes a property access value and returns null.
 Object exploreValue(IlrScopeValue value)
          Writes a scope value and returns null.
 Object exploreValue(IlrStaticFieldValue value)
          Writes a static field value and returns an object as the result.
 Object exploreValue(IlrStaticMethodInvocation value)
          Writes a static method invocation as a value and returns an object as the result.
 Object exploreValue(IlrTestValue value)
          Writes a test value and returns an object as the result.
 Object exploreValue(IlrUnaryValue value)
          Writes a unary value and returns null.
 Object exploreValue(IlrVariable value)
          Writes a variable value and returns null.
static void getImportsAndConflictClasses(List classes, List imports, List conflictClasses)
          Given a list of classes classes, fills in the lists imports and conflictClasses with the imported packages and the classes that must be printed in full names.
protected static boolean hasConflict(IlrReflect reflect, List list, String pkg, String basename)
          Given a list of imports list and a class name decomposed to a package name pkg and base name basename, indicates whether the base name could form another class name with any package or not.
 void print(IlrFunctionFactory function)
          Prints a function factory to the writer using the ILOG Rule Language.
 void print(IlrPackageFactory pkg)
          Prints a package factory to the writer using the ILOG Rule Language.
 void print(IlrRuleFactory rule)
          Prints a rule factory to the writer using the ILOG Rule Language.
 void print(IlrTaskFactory task)
          Prints a task factory to the writer using the ILOG Rule Language.
protected  void printCharEscape(char c)
           
 void printGroupOverriding(IlrRulesetFactory ruleset)
          Prints the groups overriding declaration to the writer using the ILOG Rule Language.
 void printHierarchicalPropertyDefinitions(IlrRulesetFactory ruleset)
          Prints the hierarchical properties to the writer using the ILOG Rule Language.
 void printInitialRule(List actions)
          Prints the setup statements corresponding to the list of actions.
 void printPropertyDefinitions(IlrRulesetFactory ruleset)
          Prints the property types declaration to the writer using the ILOG Rule Language.
protected  boolean printType(IlrType type, boolean shortName)
          Prints a type encountered in writing the rules and specifies whether a short name for the type is allowed.
 void printValue(IlrValue value)
          Prints a value.
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.rules.factory.IlrFactoryExplorer
exploreTask, exploreTask, exploreTask
 

Field Detail

withStatementEol

protected boolean withStatementEol
Constructor Detail

IlrRuleWriter

public IlrRuleWriter(Writer writer)
Constructs a rule writer using a writer.

Parameters:
writer - The writer to which the output will be directed.

IlrRuleWriter

public IlrRuleWriter(OutputStream stream)
Constructs a rule writer using an output stream.

Parameters:
stream - The output stream to which the output will be directed.
Method Detail

print

public void print(IlrPackageFactory pkg)
Prints a package factory to the writer using the ILOG Rule Language.

Parameters:
pkg - The package factory to be printed.

print

public void print(IlrRuleFactory rule)
Prints a rule factory to the writer using the ILOG Rule Language.

Parameters:
rule - The rule factory to be printed.

print

public void print(IlrFunctionFactory function)
Prints a function factory to the writer using the ILOG Rule Language.

Parameters:
function - The function factory to be printed.

getImportsAndConflictClasses

public static void getImportsAndConflictClasses(List classes,
                                                List imports,
                                                List conflictClasses)
Given a list of classes classes, fills in the lists imports and conflictClasses with the imported packages and the classes that must be printed in full names. The example is a java.util.Date with a java.sql.Time (the java.sql.Date class is missing).

Parameters:
classes - The list of classes.
imports - The list of imports.
conflictClasses - The classes that must be printed in full names.

hasConflict

protected static boolean hasConflict(IlrReflect reflect,
                                     List list,
                                     String pkg,
                                     String basename)
Given a list of imports list and a class name decomposed to a package name pkg and base name basename, indicates whether the base name could form another class name with any package or not.

Parameters:
reflect - A reflect.
list - The list of imports.
pkg - The class package name.
basename - The class base name.
Returns:
true if the base name could form another class name with any package, or false otherwise.

printInitialRule

public void printInitialRule(List actions)
Prints the setup statements corresponding to the list of actions.

Parameters:
actions - The list of actions to include in the initial setup rule.

printHierarchicalPropertyDefinitions

public void printHierarchicalPropertyDefinitions(IlrRulesetFactory ruleset)
Prints the hierarchical properties to the writer using the ILOG Rule Language.

Parameters:
ruleset - The ruleset whose hierarchical properties are written.

printPropertyDefinitions

public void printPropertyDefinitions(IlrRulesetFactory ruleset)
Prints the property types declaration to the writer using the ILOG Rule Language.

Parameters:
ruleset - The ruleset whose property types declaration is written.

printGroupOverriding

public void printGroupOverriding(IlrRulesetFactory ruleset)
Prints the groups overriding declaration to the writer using the ILOG Rule Language.

Parameters:
ruleset - The ruleset whose groups overriding declaration is written.

printValue

public void printValue(IlrValue value)
Prints a value.

Parameters:
value - The value to print.

printType

protected boolean printType(IlrType type,
                            boolean shortName)
Prints a type encountered in writing the rules and specifies whether a short name for the type is allowed. A short name is allowed only when there is no naming conflict. If the return value from the method is false, the rule writer considers that the type is not printed and will thus print it. A return value of true tells the rule writer that the type is printed.

Parameters:
type - The type to print.
shortName - Specifies whether a short name for the type is allowed.
Returns:
A Boolean value telling if the printing has been done.

printCharEscape

protected void printCharEscape(char c)

exploreCondition

public Object exploreCondition(IlrEvaluateCondition cond)
Writes an evaluate condition and returns null.

Specified by:
exploreCondition in interface IlrFactoryExplorer
Parameters:
cond - The condition.
See Also:
IlrEvaluateCondition.exploreCondition(IlrFactoryExplorer)

exploreCondition

public Object exploreCondition(IlrSimpleCondition cond)
Writes a simple condition and returns null.

Specified by:
exploreCondition in interface IlrFactoryExplorer
Parameters:
cond - The condition.
See Also:
IlrSimpleCondition.exploreCondition(IlrFactoryExplorer)

exploreCondition

public Object exploreCondition(IlrNotCondition cond)
Writes a not condition and returns null.

Specified by:
exploreCondition in interface IlrFactoryExplorer
Parameters:
cond - The condition.
See Also:
IlrNotCondition.exploreCondition(IlrFactoryExplorer)

exploreCondition

public Object exploreCondition(IlrExistsCondition cond)
Writes an exists condition and returns null.

Specified by:
exploreCondition in interface IlrFactoryExplorer
Parameters:
cond - The condition.
See Also:
IlrExistsCondition.exploreCondition(IlrFactoryExplorer)

exploreCondition

public Object exploreCondition(IlrCollectCondition cond)
Writes a collection condition and returns null.

Specified by:
exploreCondition in interface IlrFactoryExplorer
Parameters:
cond - The condition.
See Also:
IlrCollectCondition.exploreCondition(IlrFactoryExplorer)

exploreCondition

public Object exploreCondition(IlrTimeCondition cond)
Writes a time condition and returns null.

Specified by:
exploreCondition in interface IlrFactoryExplorer
Parameters:
cond - The condition.
See Also:
IlrTimeCondition.exploreCondition(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrConstantValue value)
Writes a constant value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A constant value.
See Also:
IlrConstantValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrClassTypeValue value)
Writes a class type value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An IlrClassTypeValue value.
See Also:
IlrClassTypeValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrCastValue value)
Writes a cast value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A cast value.
See Also:
IlrCastValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrAsValue value)
Writes a cast value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An as value.
See Also:
IlrCastValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrVariable value)
Writes a variable value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A variable value.
See Also:
IlrVariable.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrContextValue value)
Writes a context value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A context value.
See Also:
IlrContextValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrInstanceValue value)
Writes a rule instance value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A rule instance value.
See Also:
IlrInstanceValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrScopeValue value)
Writes a scope value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A scope value.
See Also:
IlrScopeValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrObjectValue value)
Writes an object value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An object value.
See Also:
IlrObjectValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrEventTimeValue value)
Writes an event timestamp value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An event timestamp value.
See Also:
IlrEventTimeValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrUnaryValue value)
Writes a unary value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A unary expression.
See Also:
IlrUnaryValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrCollectInSourceValue value)
Writes a collect value invocation and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
See Also:
IlrCollectInSourceValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrPropertyAccessValue arg)
Writes a property access value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
See Also:
IlrPropertyAccessValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrBinaryValue value)
Writes a binary value and returns null.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A binary arithmetic expression.
See Also:
IlrBinaryValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrArrayElement value)
Writes an array element and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An array element value.
See Also:
IlrArrayElement.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrArrayLength value)
Writes an array length and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An array length value.
See Also:
IlrArrayLength.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrStaticFieldValue value)
Writes a static field value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A static field value.
See Also:
IlrStaticFieldValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrFieldValue value)
Writes a field value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A field value.
See Also:
IlrFieldValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrTestValue value)
Writes a test value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - The value that encapsulates a test.
See Also:
IlrTestValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrStaticMethodInvocation value)
Writes a static method invocation as a value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A static method invocation value.
See Also:
IlrStaticMethodInvocation.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrFunctionInvocation value)
Writes a function invocation as a value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A function invocation value.
See Also:
IlrFunctionInvocation.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrMethodInvocation value)
Writes a method invocation value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A method invocation value.
See Also:
IlrMethodInvocation.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrNewInstanceValue value)
Writes an object creation value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An object creation value.
See Also:
IlrNewInstanceValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrNewArrayInstanceValue value)
Writes an array creation value and returns an object as the result.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - An array object creation value.
See Also:
IlrNewArrayInstanceValue.exploreValue(IlrFactoryExplorer)

exploreValue

public Object exploreValue(IlrIntervalValue value)
Description copied from interface: IlrFactoryExplorer
Explores a value modeling an interval.

Specified by:
exploreValue in interface IlrFactoryExplorer
Parameters:
value - A value modeling an interval.
See Also:
IlrIntervalValue.exploreValue(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrUnaryTest test)
Writes a test and returns an object as the result. The passed value is checked to see if it has the Boolean value true.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - A unary test.
See Also:
IlrUnaryTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrBinaryTest test)
Writes a binary test involving two values and returns an object as the result.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - A binary test.
See Also:
IlrBinaryTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrOccursinTest test)
Explores an occursin test and returns an object as the result.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - An occursin test.
See Also:
IlrOccursinTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrBeforeTest test)
Explores a before test and returns an object as the result.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - A before test.
See Also:
IlrBeforeTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrAfterTest test)
Explores an after test and returns an object as the result.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - An after test.
See Also:
IlrAfterTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrInstanceOfTest test)
Writes an instanceOf test. The first argument is checked to see if it is an instance of the second argument.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - An instanceOf test.
See Also:
IlrInstanceOfTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrUnknownTest test)
Writes an unknown test. The first argument is checked to see if it has a value or not.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - An unknown test.
See Also:
IlrUnknownTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrNotTest test)
Writes a NOT test and returns an object as the result.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - A NOT test.
See Also:
IlrNotTest.exploreTest(IlrFactoryExplorer)

exploreTest

public Object exploreTest(IlrNaryTest test)
Writes an N-ary test and returns an object as the result.

Specified by:
exploreTest in interface IlrFactoryExplorer
Parameters:
test - An N-ary test.
See Also:
IlrNaryTest.exploreTest(IlrFactoryExplorer)

exploreAssignable

public Object exploreAssignable(IlrVariable assignable)
Writes a variable as an assignable and returns an object as the result.

Specified by:
exploreAssignable in interface IlrFactoryExplorer
Parameters:
assignable - A variable as an assignable.
See Also:
IlrVariable.exploreAssignable(IlrFactoryExplorer)

exploreAssignable

public Object exploreAssignable(IlrArrayElement assignable)
Writes an array element as an assignable and returns an object as the result.

Specified by:
exploreAssignable in interface IlrFactoryExplorer
Parameters:
assignable - An array element as an assignable.
See Also:
IlrArrayElement.exploreAssignable(IlrFactoryExplorer)

exploreAssignable

public Object exploreAssignable(IlrStaticFieldValue assignable)
Writes a static field value as an assignable and returns an object as the result.

Specified by:
exploreAssignable in interface IlrFactoryExplorer
Parameters:
assignable - A static field value as an assignable.
See Also:
IlrStaticFieldValue.exploreAssignable(IlrFactoryExplorer)

exploreAssignable

public Object exploreAssignable(IlrFieldValue assignable)
Writes a field value as an assignable and returns an object as the result.

Specified by:
exploreAssignable in interface IlrFactoryExplorer
Parameters:
assignable - A field value as an assignable.
See Also:
IlrFieldValue.exploreAssignable(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrBindStatement action)
Writes a bind action and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - A bind action
See Also:
IlrBindStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrAssignment assign)
Writes an assignment statement and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
assign - An assignment statement.
See Also:
IlrAssignment.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrStaticMethodInvocation statement)
Writes a static method invocation and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A static method invocation.
See Also:
IlrStaticMethodInvocation.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrFunctionInvocation statement)
Writes a function invocation and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A function invocation.
See Also:
IlrFunctionInvocation.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrReturnStatement statement)
Explores a return as a statement.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A return statement
See Also:
IlrReturnStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrThrowStatement statement)
Explores a throw as a statement.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A throw statement.
See Also:
IlrThrowStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrBreakStatement statement)
Explores a break as a statement.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A break statement.
See Also:
IlrBreakStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrContinueStatement statement)
Explores a continue as a statement.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A continue statement.
See Also:
IlrContinueStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrUnaryValue statement)
Writes a unary value invocation and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A unary value invocation.
See Also:
IlrUnaryValue.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrForeachStatement statement)
Writes a foreach instruction and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A foreach instruction.
See Also:
IlrForeachStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrForStatement statement)
Writes a for instruction and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A for instruction.
See Also:
IlrForStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrMethodInvocation statement)
Writes a method invocation statement and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
statement - A method invocation statement.
See Also:
IlrMethodInvocation.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrExecuteStatement action)
Deprecated. 

Writes an execute statement block and returns null

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - The statement.
See Also:
IlrExecuteStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrIfStatement action)
Writes an if statement block and returns null.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - An if action.
See Also:
IlrIfStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTryCatchFinallyStatement action)
Writes a try-catch-finally statement block and returns null.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - A try-catch-finally action.
See Also:
IlrTryCatchFinallyStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrWhileStatement action)
Writes a while statement block and returns null.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - A while action.
See Also:
IlrWhileStatement.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTimeOutBlock action)
Writes a timeout statement block and returns null

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - A timeout action.
See Also:
IlrTimeOutBlock.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrAssertAction action)
Writes an assert action and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - An assert action.
See Also:
IlrAssertAction.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrRetractAction action)
Writes a retract action and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - A retract action.
See Also:
IlrRetractAction.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrApplyAction action)
Deprecated. 

Writes an apply action and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - The action.
See Also:
IlrApplyAction.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrModifyAction action)
Writes a modify action and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - A modify action.
See Also:
IlrModifyAction.exploreStatement(IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrUpdateAction action)
Writes an update action and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
action - An update action.
See Also:
IlrUpdateAction.exploreStatement(IlrFactoryExplorer)

print

public void print(IlrTaskFactory task)
Prints a task factory to the writer using the ILOG Rule Language.

Parameters:
task - The task to print.

exploreStatement

public Object exploreStatement(IlrTaskInstanceStatement node)
Writes the task invocation node and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
node - The task invocation node to print.
See Also:
ilog.rules.factory.IlrTaskInstanceStatement.exploreStatement(ilog.rules.factory.IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTaskIfNodeStatement node)
Writes the if ruleflow node and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
node - The if ruleflow node to print.
See Also:
ilog.rules.factory.IlrTaskIfNodeStatement.exploreStatement(ilog.rules.factory.IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTaskSwitchNodeStatement node)
Writes the switch ruleflow node and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
node - The switch ruleflow node to print.
See Also:
ilog.rules.factory.IlrTaskSwitchNodeStatement.exploreStatement(ilog.rules.factory.IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTaskForkNodeStatement node)
Writes the fork ruleflow node and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
node - The fork ruleflow node to print.
See Also:
ilog.rules.factory.IlrTaskForkNodeStatement.exploreStatement(ilog.rules.factory.IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTaskGotoNodeStatement node)
Writes the goto ruleflow node and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
node - The goto ruleflow node to print.
See Also:
ilog.rules.factory.IlrTaskGotoNodeStatement.exploreStatement(ilog.rules.factory.IlrFactoryExplorer)

exploreStatement

public Object exploreStatement(IlrTaskWhileNodeStatement node)
Writes the while ruleflow node and returns an object as the result.

Specified by:
exploreStatement in interface IlrFactoryExplorer
Parameters:
node - The while ruleflow node to print.
See Also:
ilog.rules.factory.IlrTaskWhileNodeStatement.exploreStatement(ilog.rules.factory.IlrFactoryExplorer)

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013