Class JavaScript

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

public class JavaScript extends Object
Embedded JavaScript code with an optional scope (i.e. an embedded BSON document)
  • Field Details

    • _code

      protected final String _code
      The actual code
    • _scope

      protected final Map<String,Object> _scope
      The scope (may be null)
  • Constructor Details

    • JavaScript

      public JavaScript(String code)
      Constructs a new JavaScript object
      Parameters:
      code - the actual code
    • JavaScript

      public JavaScript(String code, Map<String,Object> scope)
      Constructs a new JavaScript object
      Parameters:
      code - the actual code
      scope - the scope (may be null)
  • Method Details

    • getCode

      public String getCode()
      Returns:
      the actual code
    • getScope

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