Package hapax

Examples of hapax.Template


            final String templateFile, final JavaType templateType,
            final String moduleName) {
        try {
            final TemplateLoader templateLoader = TemplateResourceLoader
                    .create();
            final Template template = templateLoader.getTemplate(templateFile);
            Validate.notNull(template, "Template required for '%s'",
                    templateFile);
            final String templateContents = template
                    .renderToString(dataDictionary);
            final String templateId = PhysicalTypeIdentifier.createIdentifier(
                    templateType,
                    LogicalPath.getInstance(Path.SRC_MAIN_JAVA, moduleName));
            return typeParsingService.getTypeFromString(templateContents,
View Full Code Here


    private String getTemplateContents(final String templateName,
            final TemplateDataDictionary dataDictionary) {
        try {
            final TemplateLoader templateLoader = TemplateResourceLoader
                    .create();
            final Template template = templateLoader.getTemplate(templateName);
            return template.renderToString(dataDictionary);
        }
        catch (final TemplateException e) {
            throw new IllegalStateException(e);
        }
    }
View Full Code Here

        }
        finally {
            IOUtils.closeQuietly(inputStream);
        }

        final Template template = parser == null ? new Template(contents,
                context) : new Template(parser, contents, context);

        synchronized (cache) {
            cache.put(templatePath, template);
        }
View Full Code Here

TOP

Related Classes of hapax.Template

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.