retedumper.java
来自「drools 一个开放源码的规则引擎」· Java 代码 · 共 49 行
JAVA
49 行
package org.drools.io;
import java.io.PrintStream;
import org.drools.RuleBase;
import org.drools.reteoo.Dumper;
/**
* A Rete network dumper.
* This is a proxy for the Dumper implemented in the core module.
* Users should not need to refer to reteoo classes.
*
* @author <a href="mailto:michael.neale@gmail.com"> Michael Neale</a>
*
*/
public class ReteDumper {
private Dumper dumper;
public ReteDumper(RuleBase ruleBase) {
if (ruleBase instanceof SerializableRuleBaseProxy) {
SerializableRuleBaseProxy proxy = (SerializableRuleBaseProxy) ruleBase;
dumper = new Dumper(proxy.getWrappedRuleBase());
} else {
dumper = new Dumper(ruleBase);
}
}
public void dumpRete(PrintStream out)
{
dumper.dumpRete( out );
}
public void dumpRete(PrintStream out,
String indent)
{
dumper.dumpRete(out, indent);
}
/**
* Compatible with the GraphViz DOT format.
*/
public void dumpReteToDot(PrintStream out)
{
dumper.dumpReteToDot(out);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?