// the complete URI up front, we don't need to keep providing it later.
StringBuilder sb = new StringBuilder();
sb.append("public ").append(tagStr).append("Type ").append(tagStr).append("() { ");
sb.append(" return getTypedResource(").append(uriLoc.toString()).append(",#").append(tagStr).append("Type); }");
IConstructor declTree = ctx.getEvaluator().parseCommand(ctx.getEvaluator().getMonitor(), sb.toString(), ctx.getCurrentAST().getLocation().getURI());
Command cmd = new ASTBuilder().buildCommand(declTree);
Environment env = ctx.getCurrentEnvt();
ctx.setCurrentEnvt(env.getRoot());
Result<IValue> fun0 = ctx.getEvaluator().eval(ctx.getEvaluator().getMonitor(), cmd);
ctx.unwind(env);