Top Fields Constructors Methods
org.python.modules._json

public Class Scanner

extends PyObject
implements Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc
Known Direct Subclasses
org.python.modules._json.ScannerDerived
Annotations
@ExposedType
name:_json.scanner
base:PyObject
Imports
org.python.core.ArgParser, .Py, .PyDictionary, .PyList, .PyNewWrapper, .PyObject, .PyString, .PyTuple, .PyType, .codecs, .Traverseproc, .Visitproc, org.python.expose.ExposedGet, .ExposedNew, .ExposedType, org.python.modules._io.OpenMode, .PyFileIO, .PyFileIODerived

Field Summary

Modifier and TypeField and Description
public final String
pack-priv final String
private static final String[]
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final boolean
public static final PyType
Inherited from org.python.core.PyObject:
attributesgcMonitorGlobalobjtype

Constructor Summary

AccessConstructor and Description
public
Scanner(PyObject context)

public
Scanner(PyType subtype, PyObject context)

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject
the first argument to the function.
string
,
PyObject
the second argument to the function.
idx
)

Overrides org.python.core.PyObject.__call__.

A variant of the __call__ method with two arguments.

private static String
_castString(PyObject pystr, String defaultValue)

public PyTuple
_match_number(PyString pystr, int start)

public PyTuple
_parse_array(PyString pystr, int idx)

public PyTuple
_parse_constant(String constant, int idx)

public PyTuple
_parse_object(PyString pystr, int idx)

public PyTuple
_scan_once(PyString pystr, int idx)

private static boolean
public boolean
pack-priv static PyObject
Scanner___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

public int
traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

pack-priv static PyTuple
valIndex(PyObject obj, int i)

Inherited from org.python.core.PyObject:
__abs____add____and____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____cmp____coerce____coerce_ex____complex____contains____delattr____delattr____delete____delitem____delitem____delslice____delslice____dir____div____divmod____ensure_finalizer____eq____findattr____findattr____findattr_ex____finditem____finditem____finditem____float____floordiv____format____ge____get____getattr____getattr____getitem____getitem____getnewargs____getslice____getslice____gt____hash____hex____iadd____iand____idiv____idivmod____ifloordiv____ilshift____imod____imul____index____int____invert____ior____ipow____irshift____isub____iter____iternext____itruediv____ixor____le____len____long____lshift____lt____mod____mul____ne____neg____nonzero____not____oct____or____pos____pow____pow____radd____rand____rawdir____rdiv____rdivmod____reduce____reduce_ex____reduce_ex____repr____rfloordiv____rlshift____rmod____rmul____ror____rpow____rrshift____rshift____rsub____rtruediv____rxor____set____setattr____setattr____setitem____setitem____setitem____setslice____setslice____str____sub____tojava____truediv____trunc____unicode____xor___add_and_callextra_cmp_div_divmod_doget_doget_doset_eq_floordiv_ge_gt_iadd_iand_idiv_idivmod_ifloordiv_ilshift_imod_imul_in_ior_ipow_irshift_is_isnot_isub_itruediv_ixor_jcall_jcallexc_jthrow_le_lshift_lt_mod_mul_ne_notin_or_pow_rshift_sub_truediv_unsupportedop_xoradaptToCoerceTupleasDoubleasIndexasIndexasIntasIntasIterableasLongasLongasNameasNameasStringasStringasStringOrNullasStringOrNullbit_lengthconjugatedelDictdelTypedispatch__init__equalsfastGetClassfastGetDictfinalizegetDictgetJavaProxygetTypehashCodeimpAttrimplementsDescrDeleteimplementsDescrGetimplementsDescrSetinvokeinvokeinvokeinvokeinvokeinvokeisCallableisDataDescrisIndexisIntegerisMappingTypeisNumberTypeisSequenceTypemergeClassDictmergeDictAttrmergeListAttrnoAttributeErrorobject___subclasshook__readonlyAttributeErrorrunsupportedopMessagesetDictsetTypetoStringunsupportedopMessage

Field Detail

__module__back to summary
public final String __module__
Annotations
@ExposedGet
encodingback to summary
pack-priv final String encoding
newArgsback to summary
private static final String[] newArgs
object_hookback to summary
pack-priv final PyObject object_hook
pairs_hookback to summary
pack-priv final PyObject pairs_hook
parse_constantback to summary
pack-priv final PyObject parse_constant
parse_floatback to summary
pack-priv final PyObject parse_float
parse_intback to summary
pack-priv final PyObject parse_int
strictback to summary
pack-priv final boolean strict
TYPEback to summary
public static final PyType TYPE

Hides org.python.core.PyObject.TYPE.

Constructor Detail

Scannerback to summary
public Scanner(PyObject context)
Scannerback to summary
public Scanner(PyType subtype, PyObject context)

Method Detail

__call__back to summary
public PyObject __call__(PyObject string, PyObject idx)

Overrides org.python.core.PyObject.__call__.

Doc from org.python.core.PyObject.__call__.

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.

Parameters
string:PyObject

the first argument to the function.

idx:PyObject

the second argument to the function.

_castStringback to summary
private static String _castString(PyObject pystr, String defaultValue)
_match_numberback to summary
public PyTuple _match_number(PyString pystr, int start)
_parse_arrayback to summary
public PyTuple _parse_array(PyString pystr, int idx)
_parse_constantback to summary
public PyTuple _parse_constant(String constant, int idx)
_parse_objectback to summary
public PyTuple _parse_object(PyString pystr, int idx)
_scan_onceback to summary
public PyTuple _scan_once(PyString pystr, int idx)
IS_WHITESPACEback to summary
private static boolean IS_WHITESPACE(int c)
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
Scanner___new__back to summary
pack-priv static PyObject Scanner___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
Annotations
@ExposedNew
traverseback to summary
public int traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

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.

Annotations
@Override
valIndexback to summary
pack-priv static PyTuple valIndex(PyObject obj, int i)