org.stringtemplate.v4.STGroup.lookupImportedTemplate()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(12.4k)|赞(0)|评价(0)|浏览(64)

本文整理了Java中org.stringtemplate.v4.STGroup.lookupImportedTemplate()方法的一些代码示例,展示了STGroup.lookupImportedTemplate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。STGroup.lookupImportedTemplate()方法的具体详情如下:
包路径:org.stringtemplate.v4.STGroup
类名称:STGroup
方法名:lookupImportedTemplate

STGroup.lookupImportedTemplate介绍

暂无

代码示例

代码示例来源:origin: org.antlr/stringtemplate

/** Look up a fully-qualified name */
public CompiledST lookupTemplate(String name) {
  CompiledST code = rawGetTemplate(name);
  if ( code==NOT_FOUND_ST ) {
    if ( verbose ) System.out.println(name+" not found");
    return null;
  }
  // try to load from disk and look up again
  if ( code==null ) code = load(name);
  if ( code==null ) code = lookupImportedTemplate(name);
  if ( code==null ) {
    if ( verbose ) System.out.println(name+" not found");
    templates.put(name, NOT_FOUND_ST);
  }
  if ( verbose ) if ( code!=null ) System.out.println("found "+name+" in "+getName());
  return code;
}

代码示例来源:origin: org.antlr/ST4

/** Look up a fully-qualified name. */
public CompiledST lookupTemplate(String name) {
  if ( name.charAt(0)!='/' ) name = "/"+name;
  if ( verbose ) System.out.println(getName()+".lookupTemplate("+name+")");
  CompiledST code = rawGetTemplate(name);
  if ( code==NOT_FOUND_ST ) {
    if ( verbose ) System.out.println(name+" previously seen as not found");
    return null;
  }
  // try to load from disk and look up again
  if ( code==null ) code = load(name);
  if ( code==null ) code = lookupImportedTemplate(name);
  if ( code==null ) {
    if ( verbose ) System.out.println(name+" recorded not found");
    templates.put(name, NOT_FOUND_ST);
  }
  if ( verbose ) if ( code!=null ) System.out.println(getName()+".lookupTemplate("+name+") found");
  return code;
}

代码示例来源:origin: antlr/stringtemplate4

/** Look up a fully-qualified name. */
public CompiledST lookupTemplate(String name) {
  if ( name.charAt(0)!='/' ) name = "/"+name;
  if ( verbose ) System.out.println(getName()+".lookupTemplate("+name+")");
  CompiledST code = rawGetTemplate(name);
  if ( code==NOT_FOUND_ST ) {
    if ( verbose ) System.out.println(name+" previously seen as not found");
    return null;
  }
  // try to load from disk and look up again
  if ( code==null ) code = load(name);
  if ( code==null ) code = lookupImportedTemplate(name);
  if ( code==null ) {
    if ( verbose ) System.out.println(name+" recorded not found");
    templates.put(name, NOT_FOUND_ST);
  }
  if ( verbose ) if ( code!=null ) System.out.println(getName()+".lookupTemplate("+name+") found");
  return code;
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/** Look up a fully-qualified name. */
public CompiledST lookupTemplate(String name) {
  if ( name.charAt(0)!='/' ) name = "/"+name;
  if ( verbose ) System.out.println(getName()+".lookupTemplate("+name+")");
  CompiledST code = rawGetTemplate(name);
  if ( code==NOT_FOUND_ST ) {
    if ( verbose ) System.out.println(name+" previously seen as not found");
    return null;
  }
  // try to load from disk and look up again
  if ( code==null ) code = load(name);
  if ( code==null ) code = lookupImportedTemplate(name);
  if ( code==null ) {
    if ( verbose ) System.out.println(name+" recorded not found");
    templates.put(name, NOT_FOUND_ST);
  }
  if ( verbose ) if ( code!=null ) System.out.println(getName()+".lookupTemplate("+name+") found");
  return code;
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/** Look up a fully-qualified name. */
public CompiledST lookupTemplate(String name) {
  if ( name.charAt(0)!='/' ) name = "/"+name;
  if ( verbose ) System.out.println(getName()+".lookupTemplate("+name+")");
  CompiledST code = rawGetTemplate(name);
  if ( code==NOT_FOUND_ST ) {
    if ( verbose ) System.out.println(name+" previously seen as not found");
    return null;
  }
  // try to load from disk and look up again
  if ( code==null ) code = load(name);
  if ( code==null ) code = lookupImportedTemplate(name);
  if ( code==null ) {
    if ( verbose ) System.out.println(name+" recorded not found");
    templates.put(name, NOT_FOUND_ST);
  }
  if ( verbose ) if ( code!=null ) System.out.println(getName()+".lookupTemplate("+name+") found");
  return code;
}

代码示例来源: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: 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: 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: 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: 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: 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: 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: 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, 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: org.antlr/ST4

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;
}

相关文章

微信公众号

最新文章

更多