Package webit.script.global

Examples of webit.script.global.GlobalManager


    }

    private void executeInitTemplates() throws ResourceNotFoundException {
        if (this.inits != null) {
            final Out out = new DiscardOut();
            final GlobalManager myGlobalManager = this.globalManager;
            final Bag globalBag = myGlobalManager.getGlobalBag();
            final Bag constBag = myGlobalManager.getGlobalBag();
            final KeyValues params = KeyValuesUtil.wrap(
                    new String[]{"GLOBAL", "CONST"},
                    new Object[]{globalBag, constBag}
            );
            for (String templateName : StringUtil.toArray(this.inits)) {
                if (this.logger.isInfoEnabled()) {
                    this.logger.info("Merge init template: {}", templateName);
                }
                this.getTemplate(templateName)
                        .merge(params, out);
                //Commit Global
                myGlobalManager.commit();
            }
        }
    }
View Full Code Here


                return address;
            }
        }

        //global var/const
        final GlobalManager globalMgr = this.globalManager;
        final int index = globalMgr.getGlobalIndex(name);
        if (index >= 0) {
            return global(index);
        }
        if (globalMgr.hasConst(name)) {
            return constValue(globalMgr.getConst(name));
        }

        //failed
        if (force) {
            throw new ParseException("Can't locate vars: ".concat(name), line, column);
View Full Code Here

TOP

Related Classes of webit.script.global.GlobalManager

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.