/** * Returns the value in simple Java object to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param key is the key whose associated value is to be returned * @return the value in simple Java object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ @Override public Object get(Object key) { return get(null, key); }
/** * Returns the value in simple Java object to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param key is the key whose associated value is to be returned * @return the value in simple Java object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ @Override public Object get(Object key) { return get(null, key); }
/** * Returns the value in simple Java object to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param key is the key whose associated value is to be returned * @return the value in simple Java object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ public V get(Object key) { return get(null, key); }
/** * Returns the value in simple Java object to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param key is the key whose associated value is to be returned * @return the value in simple Java object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ public V get(Object key) { return get(null, key); }
/** * Returns a value of the specified key in a top level of runtime or null * if this map doesn't have a mapping for the key. The key * must be a valid Ruby variable or constant name. * * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(String key) { return provider.getVarMap().get(key); }
/** * Returns a value of the specified key in a top level of runtime or null * if this map doesn't have a mapping for the key. The key * must be a valid Ruby variable or constant name. * * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(String key) { return provider.getVarMap().get(key); }
/** * Returns a value of the specified key in a top level of runtime or null * if this map doesn't have a mapping for the key. The key * must be a valid Ruby variable or constant name. * * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(String key) { return provider.getVarMap().get(key); }
/** * Returns a value of the specified key in a top level of runtime or null * if this map doesn't have a mapping for the key. The key * must be a valid Ruby variable or constant name. * * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(String key) { return provider.getVarMap().get(key); }
/** * Returns a value of a specified key in a specified receiver or null if * a variable map doesn't have a mapping for the key in a given * receiver. The key must be a valid Ruby variable or constant name. A global * variable doesn't depend on the receiver. * * @param receiver a receiver to get the value from * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(Object receiver, String key) { return provider.getVarMap().get(receiver, key); }
/** * Returns a value of a specified key in a specified receiver or null if * a variable map doesn't have a mapping for the key in a given * receiver. The key must be a valid Ruby variable or constant name. A global * variable doesn't depend on the receiver. * * @param receiver a receiver to get the value from * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(Object receiver, String key) { return provider.getVarMap().get(receiver, key); }
/** * Returns a value of a specified key in a specified receiver or null if * a variable map doesn't have a mapping for the key in a given * receiver. The key must be a valid Ruby variable or constant name. A global * variable doesn't depend on the receiver. * * @param receiver a receiver to get the value from * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(Object receiver, String key) { return provider.getVarMap().get(receiver, key); }
/** * Returns a value of a specified key in a specified receiver or null if * a variable map doesn't have a mapping for the key in a given * receiver. The key must be a valid Ruby variable or constant name. A global * variable doesn't depend on the receiver. * * @param receiver a receiver to get the value from * @param key is a key whose associated value is to be returned * @return a value to which the specified key is mapped, or null if this * map contains no mapping for the key */ public Object get(Object receiver, String key) { return provider.getVarMap().get(receiver, key); }
static void postEval(ScriptingContainer container, ScriptContext context) { if (context == null) return; Object receiver = Utils.getReceiverObject(context); Bindings engineMap = context.getBindings(ScriptContext.ENGINE_SCOPE); 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(); } } Set<String> keys = container.getVarMap().keySet(); if (keys != null && keys.size() > 0) { for (String key : keys) { Object value = container.getVarMap().get(key); engineMap.put(Utils.adjustKey(key), value); } } 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); } } }
static void postEval(ScriptingContainer container, ScriptContext context) { if (context == null) return; Object receiver = Utils.getReceiverObject(context); Bindings engineMap = context.getBindings(ScriptContext.ENGINE_SCOPE); 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(); } } Set<String> keys = container.getVarMap().keySet(); if (keys != null && keys.size() > 0) { for (String key : keys) { Object value = container.getVarMap().get(key); engineMap.put(Utils.adjustKey(key), value); } } 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); } } }
if (keys != null && keys.size() > 0) { for (String key : keys) { Object value = container.getVarMap().get(key); engineMap.put(Utils.adjustKey(key), value); for (String key : keys) { if (engineMap.containsKey(key)) continue; Object value = container.getVarMap().get(receiver, key); globalMap.put(key, value);
if (keys != null && keys.size() > 0) { for (String key : keys) { Object value = container.getVarMap().get(key); engineMap.put(Utils.adjustKey(key), value); for (String key : keys) { if (engineMap.containsKey(key)) continue; Object value = container.getVarMap().get(receiver, key); globalMap.put(key, value);