|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.PyObject
org.python.core.PyBuiltinFunction
org.python.core.PyBuiltinFunctionSet
A helper class for faster implementations of commonly called methods.
Subclasses of PyBuiltinFunctionSet will implement some or all of the __call__ method with a switch on the index number.
Nested Class Summary |
Nested classes inherited from class org.python.core.PyBuiltinFunction |
PyBuiltinFunction.DefaultInfo, PyBuiltinFunction.Info |
Nested classes inherited from class org.python.core.PyObject |
PyObject.ConversionException |
Field Summary | |
static java.lang.Class |
exposed_as
|
Fields inherited from class org.python.core.PyBuiltinFunction |
exposed_name |
Constructor Summary | |
PyBuiltinFunctionSet(java.lang.String name,
int index)
Creates a PyBuiltinFunctionSet that expects 1 argument. |
|
PyBuiltinFunctionSet(java.lang.String name,
int index,
int numargs)
|
|
PyBuiltinFunctionSet(java.lang.String name,
int index,
int minargs,
int maxargs)
|
|
PyBuiltinFunctionSet(java.lang.String name,
int index,
int minargs,
int maxargs,
java.lang.String doc)
|
Method Summary | |
PyObject |
__call__()
A variant of the __call__ method with no arguments. |
PyObject |
__call__(PyObject arg1)
A variant of the __call__ method with one argument. |
PyObject |
__call__(PyObject[] args)
A variant of the __call__ method when no keywords are passed. |
PyObject |
__call__(PyObject[] args,
java.lang.String[] kws)
The basic method to override when implementing a callable object. |
PyObject |
__call__(PyObject arg1,
PyObject arg2)
A variant of the __call__ method with two arguments. |
PyObject |
__call__(PyObject arg1,
PyObject arg2,
PyObject arg3)
A variant of the __call__ method with three arguments. |
PyObject |
__call__(PyObject arg1,
PyObject arg2,
PyObject arg3,
PyObject arg4)
A variant of the __call__ method with four arguments. |
PyObject |
fancyCall(PyObject[] args)
|
PyObject |
fastGetDoc()
|
boolean |
isMappingType()
|
boolean |
isNumberType()
|
boolean |
isSequenceType()
|
java.lang.String |
toString()
|
Methods inherited from class org.python.core.PyBuiltinFunction |
fastGetName, getSelf, makeCall, setInfo, typeSetup |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.Class exposed_as
Constructor Detail |
public PyBuiltinFunctionSet(java.lang.String name, int index)
public PyBuiltinFunctionSet(java.lang.String name, int index, int numargs)
public PyBuiltinFunctionSet(java.lang.String name, int index, int minargs, int maxargs)
public PyBuiltinFunctionSet(java.lang.String name, int index, int minargs, int maxargs, java.lang.String doc)
Method Detail |
public PyObject fastGetDoc()
fastGetDoc
in class PyBuiltinFunction
public boolean isMappingType()
isMappingType
in class PyObject
public boolean isNumberType()
isNumberType
in class PyObject
public boolean isSequenceType()
isSequenceType
in class PyObject
public PyObject fancyCall(PyObject[] args)
public PyObject __call__(PyObject[] args)
PyObject
__call__(args, keywords)
with the appropriate arguments. The only reason to override this
function would be for improved performance.
__call__
in class PyObject
args
- all arguments to the function.public PyObject __call__(PyObject[] args, java.lang.String[] kws)
PyObject
__call__
in class PyObject
args
- all arguments to the function (including
keyword arguments).kws
- the keywords used for all keyword arguments.public PyObject __call__()
PyObject
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
in class PyObject
public PyObject __call__(PyObject arg1)
PyObject
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
in class PyObject
arg1
- the single argument to the function.public PyObject __call__(PyObject arg1, PyObject arg2)
PyObject
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
in class PyObject
arg1
- the first argument to the function.arg2
- the second argument to the function.public PyObject __call__(PyObject arg1, PyObject arg2, PyObject arg3)
PyObject
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
in class PyObject
arg1
- the first argument to the function.arg2
- the second argument to the function.arg3
- the third argument to the function.public PyObject __call__(PyObject arg1, PyObject arg2, PyObject arg3, PyObject arg4)
PyObject
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
in class PyObject
arg1
- the first argument to the function.arg2
- the second argument to the function.arg3
- the third argument to the function.arg4
- the fourth argument to the function.public java.lang.String toString()
toString
in class PyBuiltinFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |