de.undercouch.bson4jackson.types
Class JavaScript

java.lang.Object
  extended by de.undercouch.bson4jackson.types.JavaScript

public class JavaScript
extends java.lang.Object

Embedded JavaScript code with an optional scope (i.e. an embedded BSON document)


Constructor Summary
JavaScript(java.lang.String code)
          Constructs a new JavaScript object
JavaScript(java.lang.String code, java.util.Map<java.lang.String,java.lang.Object> scope)
          Constructs a new JavaScript object
 
Method Summary
 java.lang.String getCode()
           
 java.util.Map<java.lang.String,java.lang.Object> getScope()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaScript

public JavaScript(java.lang.String code)
Constructs a new JavaScript object

Parameters:
code - the actual code

JavaScript

public JavaScript(java.lang.String code,
                  java.util.Map<java.lang.String,java.lang.Object> scope)
Constructs a new JavaScript object

Parameters:
code - the actual code
scope - the scope (may be null)
Method Detail

getCode

public java.lang.String getCode()
Returns:
the actual code

getScope

public java.util.Map<java.lang.String,java.lang.Object> getScope()
Returns:
the scope (may be null)