CharStream templateStream)
{
String template = templateStream.substring(0, templateStream.size() - 1);
String templateName = Misc.getFileNameNoSuffix(unqualifiedFileName);
String fullyQualifiedTemplateName = prefix + templateName;
CompiledST impl = new Compiler(this).compile(fullyQualifiedTemplateName, template);
CommonToken nameT = new CommonToken(STLexer.SEMI); // Seems like a hack, best I could come up with.
nameT.setInputStream(templateStream);
rawDefineTemplate(fullyQualifiedTemplateName, impl, nameT);
impl.defineImplicitlyDefinedTemplates(this);
return impl;