MCPcopy Create free account
hub / github.com/beanshell/beanshell / putExternalMap

Method putExternalMap

src/bsh/ExternalNameSpace.java:271–287  ·  view source on GitHub ↗

Place an unwrapped value in the external map. BeanShell primitive types are represented by their object wrappers, so it is not possible to differentiate between wrapper types and primitive types via the external Map.

( String name, Object value )

Source from the content-addressed store, hash-verified

269 types via the external Map.
270 */
271 protected void putExternalMap( String name, Object value )
272 {
273 if ( value instanceof Variable )
274 try {
275 value = unwrapVariable( (Variable)value );
276 } catch ( UtilEvalError ute ) {
277 // There should be no case for this. unwrapVariable throws
278 // UtilEvalError in some cases where it holds an LHS or array
279 // index.
280 throw new InterpreterError("unexpected UtilEvalError");
281 }
282
283 if ( value instanceof Primitive )
284 value = Primitive.unwrap( (Primitive)value );
285
286 externalMap.put( name, value );
287 }
288}
289

Callers 2

setVariableMethod · 0.95
setTypedVariableMethod · 0.95

Calls 3

unwrapMethod · 0.95
unwrapVariableMethod · 0.80
putMethod · 0.65

Tested by

no test coverage detected