Class CodeWithScope

java.lang.Object
org.bson.types.Code
org.bson.types.CodeWithScope
All Implemented Interfaces:
Serializable

@Deprecated(since="2022-10-31") public class CodeWithScope extends Code
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A representation of the JavaScript Code with Scope BSON type.
Since:
3.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Construct an instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated.
     
    Deprecated.
    Gets the scope, which is is a mapping from identifiers to values, representing the scope in which the code should be evaluated.
    int
    Deprecated.
     

    Methods inherited from class org.bson.types.Code

    getCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CodeWithScope

      public CodeWithScope(String code, Document scope)
      Deprecated.
      Construct an instance.
      Parameters:
      code - the code
      scope - the scope
  • Method Details

    • getScope

      public Document getScope()
      Deprecated.
      Gets the scope, which is is a mapping from identifiers to values, representing the scope in which the code should be evaluated.
      Returns:
      the scope
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Code
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Code