|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.tools.IlrBaseTool ilog.rules.tools.IlrFactoryGenerator
public class IlrFactoryGenerator
This class is provided as a tool to convert rules stored in files into
factory objects saved in a binary file. The generated binary file
can be in the same directory of a class file to serve as a resource
for that class. Using the methods of IlrUtil
,
the contents of the file can be converted into factory objects again.
The syntax of the command is as follows:
java ilog.rules.tools.IlrFactoryGenerator \ [-context contextClass] \ [-d directory] \ [-output filename] \ file1 file2 ...
The options are:
-context
is used to supply a specific derived
context class name. contextClass
is a fully-qualified
class name. By default, the class IlrContext
is used.-d
gives the destination directory of the generated
file. By default, this is the current directory.-output
gives the name of the generated file. The file
is to be created in the destination directory.fileX
are the rule files to be parsed into a single
ruleset and translated into factory objects.Here is an example of use:
java ilog.rules.tools.IlrFactoryGenerator \ -context connect4.model.Connect4Agent \ -d classes/connect4/model \ -output connect4.ser \ data/connect4.ilr
Here, the rule file data/connect4.ilr
will be translated
into the binary file classes/connect4/model/connect4.ser
.
This file will be accessed as a resource of the class
connect4.model.Connect4Agent
.
IlrRuleset
,
IlrUtil
Field Summary |
---|
Fields inherited from class ilog.rules.tools.IlrBaseTool |
---|
arguments, contextClass, items, reflect, ruleset, writer |
Method Summary |
---|
Methods inherited from class ilog.rules.tools.IlrBaseTool |
---|
createFile, createRuleset, decodeArguments, decodeLastArguments, displayUsage, init, initContextClass, invoke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |