本文整理了Java中org.stringtemplate.v4.STGroup.createStringTemplateInternally()
方法的一些代码示例,展示了STGroup.createStringTemplateInternally()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。STGroup.createStringTemplateInternally()
方法的具体详情如下:
包路径:org.stringtemplate.v4.STGroup
类名称:STGroup
方法名:createStringTemplateInternally
[英]Differentiate so we can avoid having creation events for regions, map operations, and other implicit "new ST" events during rendering.
[中]区分,这样我们就可以避免在渲染期间为区域、贴图操作和其他隐式的“新ST”事件创建事件。
代码示例来源:origin: antlr/stringtemplate4
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: org.antlr/ST4
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: org.antlr/stringtemplate
void super_new(ST self, String name, Map<String,Object> attrs) {
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, self, current_ip, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(self, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: apache/servicemix-bundles
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: antlr/antlr3
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: jsevellec/cassandra-unit
void super_new(InstanceScope scope, String name, Map<String,Object> attrs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.createStringTemplateInternally(imported);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, attrs, st);
operands[++sp] = st;
}
代码示例来源:origin: org.antlr/stringtemplate
protected ST getEmbeddedInstanceOf(Interpreter interp,
ST enclosingInstance,
int ip,
String name)
{
if ( verbose ) System.out.println("getEmbeddedInstanceOf("+name+")");
ST st = getInstanceOf(name);
if ( st==null ) {
errMgr.runTimeError(interp, enclosingInstance, ip,
ErrorType.NO_SUCH_TEMPLATE,
name);
return createStringTemplateInternally(new CompiledST());
}
// this is only called internally. wack any debug ST create events
if ( trackCreationEvents ) {
st.debugState.newSTEvent = null; // toss it out
}
return st;
}
代码示例来源:origin: org.antlr/stringtemplate
void super_new(ST self, String name, int nargs) {
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, self, current_ip, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.getEmbeddedInstanceOf(this, self, current_ip, name);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(self, nargs, st);
sp -= nargs;
operands[++sp] = st;
}
代码示例来源:origin: antlr/antlr3
void super_new(InstanceScope scope, String name, int nargs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, nargs, st);
sp -= nargs;
operands[++sp] = st;
}
代码示例来源:origin: antlr/stringtemplate4
void super_new(InstanceScope scope, String name, int nargs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, nargs, st);
sp -= nargs;
operands[++sp] = st;
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
void super_new(InstanceScope scope, String name, int nargs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, nargs, st);
sp -= nargs;
operands[++sp] = st;
}
代码示例来源:origin: apache/servicemix-bundles
void super_new(InstanceScope scope, String name, int nargs) {
final ST self = scope.st;
ST st = null;
CompiledST imported = self.impl.nativeGroup.lookupImportedTemplate(name);
if ( imported==null ) {
errMgr.runTimeError(this, scope, ErrorType.NO_IMPORTED_TEMPLATE,
name);
st = self.groupThatCreatedThisInstance.createStringTemplateInternally(new CompiledST());
}
else {
st = imported.nativeGroup.getEmbeddedInstanceOf(this, scope, name);
st.groupThatCreatedThisInstance = group;
}
// get n args and store into st's attr list
storeArgs(scope, nargs, st);
sp -= nargs;
operands[++sp] = st;
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/** Create singleton template for use with dictionary values. */
public ST createSingleton(Token templateToken) {
String template;
if ( templateToken.getType()==GroupParser.BIGSTRING ) {
template = Misc.strip(templateToken.getText(),2);
}
else {
template = Misc.strip(templateToken.getText(),1);
}
CompiledST impl = compile(getFileName(), null, null, template, templateToken);
ST st = createStringTemplateInternally(impl);
st.groupThatCreatedThisInstance = this;
st.impl.hasFormalArgs = false;
st.impl.name = ST.UNKNOWN_NAME;
st.impl.defineImplicitlyDefinedTemplates(this);
return st;
}
代码示例来源:origin: org.antlr/stringtemplate
/** Create singleton template for use with dictionary values */
public ST createSingleton(Token templateToken) {
String template;
if ( templateToken.getType()==GroupParser.BIGSTRING ) {
template = Misc.strip(templateToken.getText(),2);
}
else {
template = Misc.strip(templateToken.getText(),1);
}
CompiledST impl = compile(getFileName(), null, null, template, templateToken);
ST st = createStringTemplateInternally(impl);
st.groupThatCreatedThisInstance = this;
st.impl.hasFormalArgs = false;
st.impl.name = ST.UNKNOWN_NAME;
st.impl.defineImplicitlyDefinedTemplates(this);
return st;
}
代码示例来源:origin: jsevellec/cassandra-unit
/** Create singleton template for use with dictionary values. */
public ST createSingleton(Token templateToken) {
String template;
if ( templateToken.getType()==GroupParser.BIGSTRING ) {
template = Misc.strip(templateToken.getText(),2);
}
else {
template = Misc.strip(templateToken.getText(),1);
}
CompiledST impl = compile(getFileName(), null, null, template, templateToken);
ST st = createStringTemplateInternally(impl);
st.groupThatCreatedThisInstance = this;
st.impl.hasFormalArgs = false;
st.impl.name = ST.UNKNOWN_NAME;
st.impl.defineImplicitlyDefinedTemplates(this);
return st;
}
代码示例来源:origin: org.antlr/ST4
/** Create singleton template for use with dictionary values. */
public ST createSingleton(Token templateToken) {
String template;
if ( templateToken.getType()==GroupParser.BIGSTRING || templateToken.getType()==GroupParser.BIGSTRING_NO_NL ) {
template = Misc.strip(templateToken.getText(),2);
}
else {
template = Misc.strip(templateToken.getText(),1);
}
CompiledST impl = compile(getFileName(), null, null, template, templateToken);
ST st = createStringTemplateInternally(impl);
st.groupThatCreatedThisInstance = this;
st.impl.hasFormalArgs = false;
st.impl.name = ST.UNKNOWN_NAME;
st.impl.defineImplicitlyDefinedTemplates(this);
return st;
}
代码示例来源:origin: apache/servicemix-bundles
/** Create singleton template for use with dictionary values. */
public ST createSingleton(Token templateToken) {
String template;
if ( templateToken.getType()==GroupParser.BIGSTRING || templateToken.getType()==GroupParser.BIGSTRING_NO_NL ) {
template = Misc.strip(templateToken.getText(),2);
}
else {
template = Misc.strip(templateToken.getText(),1);
}
CompiledST impl = compile(getFileName(), null, null, template, templateToken);
ST st = createStringTemplateInternally(impl);
st.groupThatCreatedThisInstance = this;
st.impl.hasFormalArgs = false;
st.impl.name = ST.UNKNOWN_NAME;
st.impl.defineImplicitlyDefinedTemplates(this);
return st;
}
代码示例来源:origin: antlr/stringtemplate4
/** Create singleton template for use with dictionary values. */
public ST createSingleton(Token templateToken) {
String template;
if ( templateToken.getType()==GroupParser.BIGSTRING || templateToken.getType()==GroupParser.BIGSTRING_NO_NL ) {
template = Misc.strip(templateToken.getText(),2);
}
else {
template = Misc.strip(templateToken.getText(),1);
}
CompiledST impl = compile(getFileName(), null, null, template, templateToken);
ST st = createStringTemplateInternally(impl);
st.groupThatCreatedThisInstance = this;
st.impl.hasFormalArgs = false;
st.impl.name = ST.UNKNOWN_NAME;
st.impl.defineImplicitlyDefinedTemplates(this);
return st;
}
内容来源于网络,如有侵权,请联系作者删除!