Package io.apigee.trireme.core

Examples of io.apigee.trireme.core.NodeModule


    }

    private void loadModuleByClass(Class<? extends NodeModule> klass)
    {
        try {
            NodeModule mod = klass.newInstance();
            addNativeModule(mod);
        } catch (InstantiationException e) {
            throw new AssertionError(e);
        } catch (IllegalAccessException e) {
            throw new AssertionError(e);
View Full Code Here


     */
    public Object initializeModule(String modName, ModuleRegistry.ModuleType type,
                                   Context cx, Scriptable scope)
        throws InvocationTargetException, InstantiationException, IllegalAccessException
    {
        NodeModule mod;
        switch (type) {
        case PUBLIC:
            mod = registry.get(modName);
            break;
        case INTERNAL:
            mod = registry.getInternal(modName);
            break;
        case NATIVE:
            mod = registry.getNative(modName);
            break;
        default:
            throw new AssertionError();
        }
        if (mod == null) {
            return null;
        }
        Object exp = mod.registerExports(cx, scope, this);
        if (exp == null) {
            throw new AssertionError("Module " + modName + " returned a null export");
        }
        return exp;
    }
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.NodeModule

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.