Class Scanner

java.lang.Object
org.python.core.PyObject
org.python.modules._json.Scanner
All Implemented Interfaces:
Serializable, Traverseproc
Direct Known Subclasses:
ScannerDerived

public class Scanner extends PyObject implements Traverseproc
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • __call__

      public PyObject __call__(PyObject string, PyObject idx)
      Description copied from class: PyObject
      A variant of the __call__ method with two arguments. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.
      Overrides:
      __call__ in class PyObject
      Parameters:
      string - the first argument to the function.
      idx - the second argument to the function.
    • _parse_object

      public PyTuple _parse_object(PyString pystr, int idx)
    • _parse_array

      public PyTuple _parse_array(PyString pystr, int idx)
    • _scan_once

      public PyTuple _scan_once(PyString pystr, int idx)
    • _parse_constant

      public PyTuple _parse_constant(String constant, int idx)
    • _match_number

      public PyTuple _match_number(PyString pystr, int start)
    • traverse

      public int traverse(Visitproc visit, Object arg)
      Description copied from interface: Traverseproc
      Traverses all directly contained PyObjects. Like in CPython, arg must be passed unmodified to visit as its second parameter. If Visitproc.visit(PyObject, Object) returns nonzero, this return value must be returned immediately by traverse. Visitproc.visit(PyObject, Object) must not be called with a null PyObject-argument.
      Specified by:
      traverse in interface Traverseproc
    • refersDirectlyTo

      public boolean refersDirectlyTo(PyObject ob)
      Description copied from interface: Traverseproc
      Optional operation. Should only be implemented if it is more efficient than calling Traverseproc.traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.
      Specified by:
      refersDirectlyTo in interface Traverseproc