MCPcopy Index your code
hub / github.com/killme2008/aviatorscript / get

Method get

src/main/java/com/googlecode/aviator/utils/Env.java:416–431  ·  view source on GitHub ↗

Get value for key. If the key is present in the overrides map, the value from that map is returned; otherwise, the value for the key in the defaults map is returned. @param key @return value ( null if key not present)

(final Object key)

Source from the content-addressed store, hash-verified

414 * @return value (<code>null</code> if key not present)
415 */
416 @Override
417 public Object get(final Object key) {
418 GetValueTask task = INTERNAL_VARIABLES.get(key);
419 if (task != null) {
420 return task.call(this);
421 }
422
423 Map<String, Object> overrides = getmOverrides(true);
424 Object ret = null;
425 if (overrides.containsKey(key)) {
426 ret = overrides.get(key);
427 } else {
428 ret = this.mDefaults.get(key);
429 }
430 return ret;
431 }
432
433 /**
434 * Check if no overrides are defined.

Callers 15

testPatternGroupMethod · 0.95
valuesMethod · 0.95
toStringMethod · 0.95
testSpecialVarsMethod · 0.45
testIssue466Method · 0.45
testEnvProcessorMethod · 0.45
testInternalVarsMethod · 0.45
testInvokeMethodMethod · 0.45
testGetInterface2Method · 0.45
testNewEnvMethod · 0.45
testArithMethod · 0.45

Calls 3

callMethod · 0.95
getmOverridesMethod · 0.95
containsKeyMethod · 0.45

Tested by 15

testPatternGroupMethod · 0.76
testSpecialVarsMethod · 0.36
testIssue466Method · 0.36
testEnvProcessorMethod · 0.36
testInternalVarsMethod · 0.36
testInvokeMethodMethod · 0.36
testGetInterface2Method · 0.36
testNewEnvMethod · 0.36
testArithMethod · 0.36
testObjectMethod · 0.36
testCondMethod · 0.36