Top Description Inners Fields Constructors Methods
org.python.core

public Class exceptions

extends PyObject
implements ClassDictInit
Class Inheritance
All Implemented Interfaces
org.python.core.ClassDictInit
Annotations
@Untraversable
Imports
java.io.File, java.lang.reflect.Method, org.python.modules._locale._locale, org.python.modules.zipimport.zipimport

The builtin exceptions module. The entire module should be imported from python. None of the methods defined here should be called from java.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
public static String
Inherited from org.python.core.PyObject:
attributesgcMonitorGlobalobjtypeTYPE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static String

Returns:

the basename'd result String
basename
(String
a path String
name
)

Return the basename of a path string.

public static PyObject
public static PyObject
bindStaticJavaMethod(String name, Class<?> cls, String methodName)

private static PyObject
buildClass(PyObject dict, String classname, String superclass, String doc)

private static PyObject
buildClass(PyObject dict, String classname, String superclass, PyObject classDict, String doc)

private static void
public static void
classDictInit(PyObject dict)

Internal use only.

private static void
defineSlots(PyObject
a PyObject dict
dict
,
String...
slot String names
slotNames
)

Define __slots__ in dict with the specified slot names

public static PyObject
public static void
public static PyObject
public static PyObject
public static int

Returns:

an the end position
getEnd
(PyObject
a UnicodeError value
self
,
boolean
whether the UnicodeError object should be unicode
unicode
)

Determine the end position for UnicodeErrors.

public static int

Returns:

an the start position
getStart
(PyObject
a UnicodeError value
self
,
boolean
whether the UnicodeError object should be unicode
unicode
)

Determine the start position for UnicodeErrors.

public static PyString

Returns:

an PyString
getString
(PyObject
a PyObject
attr
,
String
of the attribute
name
)

Ensure a PyString value for UnicodeErrors

public static PyUnicode

Returns:

an PyUnicode
getUnicode
(PyObject
a PyObject
attr
,
String
of the attribute
name
)

Ensure a PyUnicode value for UnicodeErrors

private static void
initSlots(PyObject
a PyObject dict
self
)

Initialize all __slots__ arguments in the specified dict to None.

public static PyObject
public static PyObject
KeyError__str__(PyObject self, PyObject[] args, String[] kwargs)

public static PyObject
public static void
SyntaxError__init__(PyObject self, PyObject[] args, String[] kwargs)

public static PyString
SyntaxError__str__(PyObject self, PyObject[] arg, String[] kwargs)

public static PyObject
public static void
SystemExit__init__(PyObject self, PyObject[] args, String[] kwargs)

public static PyObject
public static void
public static PyString
public static PyObject
public static void
public static PyString
public static PyObject
public static void
UnicodeError__init__(PyObject self, PyObject[] args, String[] kwargs, PyType objectType)

public static PyObject
public static void
public static PyString
Inherited from org.python.core.PyObject:
__abs____add____and____call____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_basic_add_basic_and_basic_div_basic_divmod_basic_floordiv_basic_iadd_basic_iand_basic_idiv_basic_idivmod_basic_ifloordiv_basic_ilshift_basic_imod_basic_imul_basic_ior_basic_ipow_basic_irshift_basic_isub_basic_itruediv_basic_ixor_basic_lshift_basic_mod_basic_mul_basic_or_basic_pow_basic_rshift_basic_sub_basic_truediv_basic_xor_callextra_cmp_coerce_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__equalsfastGetClassfastGetDictfinalizegetDictgetJavaProxygetTypehashCodeimpAttrimplementsDescrDeleteimplementsDescrGetimplementsDescrSetinvokeinvokeinvokeinvokeinvokeinvokeisCallableisDataDescrisIndexisIntegerisMappingTypeisNumberTypeisSequenceTypejdontdelmergeClassDictmergeDictAttrmergeListAttrnoAttributeErrorobject___contains__object___delattr__object___delattr__object___findattr__object___format__object___getattribute__object___hash__object___init__object___new__object___reduce__object___reduce_ex__object___setattr__object___setattr__object___subclasshook__object_toStringproxyInitreadonlyAttributeErrorrunsupportedopMessagesetDictsetTypetoStringunsupportedopMessage

Field Detail

__doc__back to summary
public static String __doc__

Constructor Detail

exceptionsback to summary
public exceptions()

Method Detail

basenameback to summary
private static String basename(String name)

Return the basename of a path string.

Parameters
name:String

a path String

Returns:String

the basename'd result String

bindStaticJavaMethodback to summary
public static PyObject bindStaticJavaMethod(String name, String methodName)
bindStaticJavaMethodback to summary
public static PyObject bindStaticJavaMethod(String name, Class<?> cls, String methodName)
buildClassback to summary
private static PyObject buildClass(PyObject dict, String classname, String superclass, String doc)
buildClassback to summary
private static PyObject buildClass(PyObject dict, String classname, String superclass, PyObject classDict, String doc)
buildModuleExceptionsback to summary
private static void buildModuleExceptions(PyObject dict)
classDictInitback to summary
public static void classDictInit(PyObject dict)

Internal use only. Do not call this method explicit.

defineSlotsback to summary
private static void defineSlots(PyObject dict, String... slotNames)

Define __slots__ in dict with the specified slot names

Parameters
dict:PyObject

a PyObject dict

slotNames:String[]

slot String names

EnvironmentErrorback to summary
public static PyObject EnvironmentError()
EnvironmentError__init__back to summary
public static void EnvironmentError__init__(PyObject self, PyObject[] args, String[] kwargs)
EnvironmentError__reduce__back to summary
public static PyObject EnvironmentError__reduce__(PyObject self, PyObject[] args, String[] kwargs)
EnvironmentError__str__back to summary
public static PyObject EnvironmentError__str__(PyObject self, PyObject[] args, String[] kwargs)
getEndback to summary
public static int getEnd(PyObject self, boolean unicode)

Determine the end position for UnicodeErrors.

Parameters
self:PyObject

a UnicodeError value

unicode:boolean

whether the UnicodeError object should be unicode

Returns:int

an the end position

getStartback to summary
public static int getStart(PyObject self, boolean unicode)

Determine the start position for UnicodeErrors.

Parameters
self:PyObject

a UnicodeError value

unicode:boolean

whether the UnicodeError object should be unicode

Returns:int

an the start position

getStringback to summary
public static PyString getString(PyObject attr, String name)

Ensure a PyString value for UnicodeErrors

Parameters
attr:PyObject

a PyObject

name:String

of the attribute

Returns:PyString

an PyString

getUnicodeback to summary
public static PyUnicode getUnicode(PyObject attr, String name)

Ensure a PyUnicode value for UnicodeErrors

Parameters
attr:PyObject

a PyObject

name:String

of the attribute

Returns:PyUnicode

an PyUnicode

initSlotsback to summary
private static void initSlots(PyObject self)

Initialize all __slots__ arguments in the specified dict to None.

Parameters
self:PyObject

a PyObject dict

KeyErrorback to summary
public static PyObject KeyError()
KeyError__str__back to summary
public static PyObject KeyError__str__(PyObject self, PyObject[] args, String[] kwargs)
SyntaxErrorback to summary
public static PyObject SyntaxError()
SyntaxError__init__back to summary
public static void SyntaxError__init__(PyObject self, PyObject[] args, String[] kwargs)
SyntaxError__str__back to summary
public static PyString SyntaxError__str__(PyObject self, PyObject[] arg, String[] kwargs)
SystemExitback to summary
public static PyObject SystemExit()
SystemExit__init__back to summary
public static void SystemExit__init__(PyObject self, PyObject[] args, String[] kwargs)
UnicodeDecodeErrorback to summary
public static PyObject UnicodeDecodeError()
UnicodeDecodeError__init__back to summary
public static void UnicodeDecodeError__init__(PyObject self, PyObject[] args, String[] kwargs)
UnicodeDecodeError__str__back to summary
public static PyString UnicodeDecodeError__str__(PyObject self, PyObject[] args, String[] kwargs)
UnicodeEncodeErrorback to summary
public static PyObject UnicodeEncodeError()
UnicodeEncodeError__init__back to summary
public static void UnicodeEncodeError__init__(PyObject self, PyObject[] args, String[] kwargs)
UnicodeEncodeError__str__back to summary
public static PyString UnicodeEncodeError__str__(PyObject self, PyObject[] args, String[] kwargs)
UnicodeErrorback to summary
public static PyObject UnicodeError()
UnicodeError__init__back to summary
public static void UnicodeError__init__(PyObject self, PyObject[] args, String[] kwargs, PyType objectType)
UnicodeTranslateErrorback to summary
public static PyObject UnicodeTranslateError()
UnicodeTranslateError__init__back to summary
public static void UnicodeTranslateError__init__(PyObject self, PyObject[] args, String[] kwargs)
UnicodeTranslateError__str__back to summary
public static PyString UnicodeTranslateError__str__(PyObject self, PyObject[] args, String[] kwargs)
org.python.core back to summary

pack-priv Class exceptions.BoundStaticJavaMethod

extends PyBuiltinMethod
Class Inheritance
Annotations
@Untraversable

Field Summary

Modifier and TypeField and Description
private Method
javaMethod

The Java Method to be bound.

Inherited from org.python.core.PyBuiltinMethod:
self

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject[]
all arguments to the function (including keyword arguments).
args
,
String[]
the keywords used for all keyword arguments.
kwargs
)

Overrides org.python.core.PyObject.__call__.

The basic method to override when implementing a callable object.

public PyObject
__get__(PyObject
- the instance accessing this descriptor. Can be null if this is being accessed by a type.
obj
,
PyObject
- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.
type
)

Overrides org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

public PyBuiltinCallable
bind(PyObject self)

Overrides org.python.core.PyBuiltinMethod.bind.

Returns a new instance of this type of PyBuiltinFunction bound to self

Inherited from org.python.core.PyBuiltinMethod:
__cmp__getSelfhashCodemakeDescriptorrefersDirectlyTotraverse

Field Detail

javaMethodback to summary
private Method javaMethod

The Java Method to be bound. Its signature must be: (PyObject, PyObject[], String[])PyObject.

Constructor Detail

BoundStaticJavaMethodback to summary
public BoundStaticJavaMethod(String name, Method javaMethod)
BoundStaticJavaMethodback to summary
protected BoundStaticJavaMethod(PyType type, PyObject self, PyBuiltinCallable.Info info, Method javaMethod)

Method Detail

__call__back to summary
public PyObject __call__(PyObject[] args, String[] kwargs)

Overrides org.python.core.PyObject.__call__.

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

The basic method to override when implementing a callable object. The first len(args)-len(keywords) members of args[] are plain arguments. The last len(keywords) arguments are the values of the keyword arguments.

Parameters
args:PyObject[]

all arguments to the function (including keyword arguments).

kwargs:String[]

the keywords used for all keyword arguments.

Annotations
@Override
__get__back to summary
public PyObject __get__(PyObject obj, PyObject type)

Overrides org.python.core.PyObject.__get__.

Doc from org.python.core.PyObject.__get__.

Get descriptor for this PyObject.

Parameters
obj:PyObject

- the instance accessing this descriptor. Can be null if this is being accessed by a type.

type:PyObject

- the type accessing this descriptor. Will be null if obj exists as obj is of the type accessing the descriptor.

Returns:PyObject

- the object defined for this descriptor for the given obj and type.

Annotations
@Override

bindback to summary
public PyBuiltinCallable bind(PyObject self)

Overrides org.python.core.PyBuiltinMethod.bind.

Doc from org.python.core.PyBuiltinCallable.bind.

Returns a new instance of this type of PyBuiltinFunction bound to self

Annotations
@Override