Package webit.script.loaders

Examples of webit.script.loaders.Loader


     * @return boolean
     * @since 1.4.1
     */
    public boolean exists(final String resourceName) {
        final String normalizedName;
        final Loader loader;
        if ((normalizedName = (loader = this.resourceLoader).normalize(resourceName)) != null) {
            return loader.get(normalizedName).exists();
        }
        return false;
    }
View Full Code Here


        return false;
    }

    private Template createTemplateIfAbsent(final String name) throws ResourceNotFoundException {
        Template template;
        final Loader loader = this.resourceLoader;
        final String normalizedName = loader.normalize(name);
        if (normalizedName == null) {
            //if normalized-name is null means not found resource.
            throw new ResourceNotFoundException("Illegal template path: ".concat(name));
        }
        template = this.templateCache.get(normalizedName);
        if (template == null) {
            //then create Template
            template = new Template(this, normalizedName,
                    loader.get(normalizedName));
            if (loader.isEnableCache(normalizedName)) {
                Template oldTemplate;
                oldTemplate = this.templateCache.putIfAbsent(normalizedName, template);
                //if old Template exist, use the old one
                if (oldTemplate != null) {
                    template = oldTemplate;
View Full Code Here

TOP

Related Classes of webit.script.loaders.Loader

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.