MCPcopy Create free account
hub / github.com/antlr/codebuff / getInstanceOf

Method getInstanceOf

output/java/1.4.17/STGroup.java:187–196  ·  view source on GitHub ↗

The primary means of getting an instance of a template from this group. Names must be absolute, fully-qualified names like /a/b.

(String name)

Source from the content-addressed store, hash-verified

185 */
186
187 public ST getInstanceOf(String name) {
188 if ( name==null ) return null;
189 if ( verbose ) System.out.println(getName()+".getInstanceOf("+name+")");
190 if ( name.charAt(0)!='/' ) name = "/"+name;
191 CompiledST c = lookupTemplate(name);
192 if ( c!=null ) {
193 return createStringTemplate(c);
194 }
195 return null;
196 }
197
198 protected ST getEmbeddedInstanceOf(Interpreter interp, InstanceScope scope, String name) {
199 String fullyQualifiedName = name;

Callers 5

getEmbeddedInstanceOfMethod · 0.95
test1Method · 0.45
test2Method · 0.45
test3Method · 0.45
test4Method · 0.45

Calls 3

getNameMethod · 0.95
lookupTemplateMethod · 0.95
createStringTemplateMethod · 0.95

Tested by

no test coverage detected