Package javax.script

Examples of javax.script.Bindings.keySet()


    static void postEval(ScriptingContainer container, ScriptContext context) {
        if (context == null) return;
        Object receiver = Utils.getReceiverObject(context);

        Bindings engineMap = context.getBindings(ScriptContext.ENGINE_SCOPE);
        int size = engineMap.keySet().size();
        String[] names = engineMap.keySet().toArray(new String[size]);
        Iterator<Map.Entry<String, Object>> iter = engineMap.entrySet().iterator();
        for (;iter.hasNext();) {
            Map.Entry<String, Object> entry = iter.next();
            if (Utils.shouldLVarBeDeleted(container, entry.getKey())) {
View Full Code Here


        if (context == null) return;
        Object receiver = Utils.getReceiverObject(context);

        Bindings engineMap = context.getBindings(ScriptContext.ENGINE_SCOPE);
        int size = engineMap.keySet().size();
        String[] names = engineMap.keySet().toArray(new String[size]);
        Iterator<Map.Entry<String, Object>> iter = engineMap.entrySet().iterator();
        for (;iter.hasNext();) {
            Map.Entry<String, Object> entry = iter.next();
            if (Utils.shouldLVarBeDeleted(container, entry.getKey())) {
                iter.remove();
View Full Code Here

            }
        }

        Bindings globalMap = context.getBindings(ScriptContext.GLOBAL_SCOPE);
        if (globalMap == null) return;
        keys = globalMap.keySet();
        if (keys != null && keys.size() > 0) {
            for (String key : keys) {
                if (engineMap.containsKey(key)) continue;
                Object value = container.getVarMap().get(receiver, key);
                globalMap.put(key, value);
View Full Code Here

    static void postEval(ScriptingContainer container, ScriptContext context) {
        if (context == null) return;
        Object receiver = Utils.getReceiverObject(context);

        Bindings engineMap = context.getBindings(ScriptContext.ENGINE_SCOPE);
        int size = engineMap.keySet().size();
        String[] names = engineMap.keySet().toArray(new String[size]);
        Iterator<Map.Entry<String, Object>> iter = engineMap.entrySet().iterator();
        for (;iter.hasNext();) {
            Map.Entry<String, Object> entry = iter.next();
            if (Utils.shouldLVarBeDeleted(container, entry.getKey())) {
View Full Code Here

        if (context == null) return;
        Object receiver = Utils.getReceiverObject(context);

        Bindings engineMap = context.getBindings(ScriptContext.ENGINE_SCOPE);
        int size = engineMap.keySet().size();
        String[] names = engineMap.keySet().toArray(new String[size]);
        Iterator<Map.Entry<String, Object>> iter = engineMap.entrySet().iterator();
        for (;iter.hasNext();) {
            Map.Entry<String, Object> entry = iter.next();
            if (Utils.shouldLVarBeDeleted(container, entry.getKey())) {
                iter.remove();
View Full Code Here

            }
        }

        Bindings globalMap = context.getBindings(ScriptContext.GLOBAL_SCOPE);
        if (globalMap == null) return;
        keys = globalMap.keySet();
        if (keys != null && keys.size() > 0) {
            for (String key : keys) {
                if (engineMap.containsKey(key)) continue;
                Object value = container.getVarMap().get(receiver, key);
                globalMap.put(key, value);
View Full Code Here

        List<Integer> scopes = context.getScopes();
        for (int scope : scopes) {
            Bindings bindings = context.getBindings(scope);
            if (bindings == null)
                continue;
            for (String key : bindings.keySet())
                members.append(new PyString(key));
        }
        members.sort();
        return members;
    }
View Full Code Here

        synchronized (context) {
            for (int scope : context.getScopes()) {
                Bindings bindings = context.getBindings(scope);
                if (bindings != null) {
                    list.ensureCapacity(bindings.size());
                    for (String key : bindings.keySet()) {
                        list.add(key);
                    }
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.