站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

SnippetBuilder (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.decisiontable.model
Class SnippetBuilder

java.lang.Object
  extended by org.drools.decisiontable.model.SnippetBuilder

public class SnippetBuilder
extends Object

Author:
Michael Neale This utility class exists to convert rule script snippets to actual code. The snippets contain place holders for values to be substituted into. See the test case for how it really works ! Snippet template example: "something.getBlah($param)" $param is the "place holder". This will get replaced with the "cellValue" that is passed in. 12-Oct-2005 change: moved from regex to using simple character based interpolation. Regex was overkill and couldn't not quite get it right.

Constructor Summary
SnippetBuilder(String snippetTemplate)
           
 
Method Summary
 String build(String cellValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnippetBuilder

public SnippetBuilder(String snippetTemplate)
Parameters:
snippetTemplate - The snippet including the "place holder" for a parameter. If no "place holder" is present,
Method Detail

build

public String build(String cellValue)
Parameters:
cellValue - The value from the cell to populate the snippet with. If no place holder exists, will just return the snippet.
Returns:
The final snippet.


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.