本文整理了Java中org.stringtemplate.v4.STGroup.createStringTemplate()
方法的一些代码示例,展示了STGroup.createStringTemplate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。STGroup.createStringTemplate()
方法的具体详情如下:
包路径:org.stringtemplate.v4.STGroup
类名称:STGroup
方法名:createStringTemplate
[英]Differentiate so we can avoid having creation events for regions, map operations, and other implicit "new ST" events during rendering.
[中]区分,这样我们就可以避免在渲染期间为区域、贴图操作和其他隐式的“新ST”事件创建事件。
代码示例来源:origin: org.antlr/ST4
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: antlr/stringtemplate4
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: org.antlr/stringtemplate
/** differentiate so we can avoid having creation events for regions,
* map operations, and other "new ST" events used during interp.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: antlr/antlr3
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: jsevellec/cassandra-unit
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: apache/servicemix-bundles
/** Differentiate so we can avoid having creation events for regions,
* map operations, and other implicit "new ST" events during rendering.
*/
public ST createStringTemplateInternally(CompiledST impl) {
ST st = createStringTemplate(impl);
if ( trackCreationEvents && st.debugState!=null ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: org.antlr/ST4
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: antlr/stringtemplate4
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: jsevellec/cassandra-unit
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: antlr/antlr3
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: org.antlr/stringtemplate
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like a/b
*/
public ST getInstanceOf(String name) {
if ( verbose ) System.out.println("getInstanceOf("+name+") in group "+getName());
if ( name==null ) return null;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: apache/servicemix-bundles
/** The primary means of getting an instance of a template from this
* group. Names must be absolute, fully-qualified names like {@code /a/b}.
*/
public ST getInstanceOf(String name) {
if ( name==null ) return null;
if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
if ( name.charAt(0)!='/' ) name = "/"+name;
CompiledST c = lookupTemplate(name);
if ( c!=null ) {
return createStringTemplate(c);
}
return null;
}
代码示例来源:origin: com.almis.awe/awe-model
@Override
@JsonIgnore
public ST generateTemplate(STGroup group) {
ST template = group.createStringTemplate(group.rawGetTemplate(AweConstants.TEMPLATE_INFO));
ST children = super.generateTemplate(group);
// Generate template
template.add("e", this).add("children", children);
// Retrieve code
return template;
}
}
代码示例来源:origin: com.almis.awe/awe-model
/**
* Generates the output HTML of the element
*
* @param group String Template Group
* @return Code
*/
public ST generateTemplate(STGroup group) {
ST template = group.createStringTemplate(group.rawGetTemplate(getTemplate()));
List<ST> children = new ArrayList<>();
// Call generate method on all children
if (this.getElementList() != null) {
for (Element element : (List<Element>) this.getElementList()) {
// Generate the children
children.add(element.generateTemplate(group));
}
}
// Generate template
template.add("e", this).add("children", children);
// Retrieve code
return template;
}
代码示例来源:origin: com.almis.awe/awe-model
/**
* Generates the output HTML of the element
*
* @param group String Template Group
* @return Code
*/
@Override
public ST generateTemplate(STGroup group) {
ST template = group.createStringTemplate(group.rawGetTemplate(getTemplate()));
List<ST> children = new ArrayList<>();
// Call generate method on all children
if (this.getElementList() != null) {
for (Element element : this.getElementList()) {
// Generate the children
children.add(element.generateTemplate(group));
}
}
// Generate template
template.add("e", this).add("component", getComponentTag()).add("children", children);
// Retrieve code
return template;
}
代码示例来源:origin: com.almis.awe/awe-model
@Override
public ST generateHelpTemplate(STGroup group, String label, boolean developers) {
ST template = group.createStringTemplate(group.rawGetTemplate(getHelpTemplate()));
List<ST> columns = new ArrayList<>();
List<ST> buttons = new ArrayList<>();
String currentLabel = getLabel() == null ? label : getLabel();
// Get grid columns
List<Column> gridColumns = getElementsByType(Column.class);
for (Column column : gridColumns) {
// Generate the children
if (!column.isHidden() && column.getLabel() != null) {
columns.add(column.generateHelpTemplate(group, null, developers));
}
}
// Get grid buttons
List<Button> buttonList = getElementsByType(Button.class);
for (Button button : buttonList) {
// Generate the children
buttons.add(button.generateHelpTemplate(group, null, AweConstants.TEMPLATE_HELP_BUTTON_GRID, developers));
}
// Generate template
template.add("e", this).add("label", currentLabel).add("developers", developers).add("columns", columns).add("buttons", buttons);
// Retrieve code
return template;
}
内容来源于网络,如有侵权,请联系作者删除!