|
|||||||||
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.PyFunction
public class PyFunction
A Python function.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary | |
---|---|
PyObject |
__dict__
A function's lazily created __dict__; allows arbitrary attributes to be tacked on. |
PyObject |
__doc__
The writable doc string, also available via func_doc. |
PyObject |
__module__
Writable object describing what module this function belongs to. |
String |
__name__
The writable name, also available via func_name. |
PyObject |
func_closure
A read only closure tuple for nested scopes. |
PyCode |
func_code
The actual funtion's code, writable. |
PyObject[] |
func_defaults
Default argument values for associated kwargs. |
PyObject |
func_globals
The read only namespace; a dict (PyStringMap). |
static PyType |
TYPE
|
Constructor Summary | |
---|---|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code)
|
|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject doc)
|
|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject[] closure_cells)
|
|
PyFunction(PyObject globals,
PyObject[] defaults,
PyCode code,
PyObject doc,
PyObject[] closure_cells)
|
Method Summary | |
---|---|
PyObject |
__call__()
A variant of the __call__ method with no arguments. |
PyObject |
__call__(PyObject arg)
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,
String[] keywords)
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[] args,
String[] keywords)
A variant of the __call__ method with one extra initial argument. |
PyObject |
__call__(PyObject arg1,
PyObject arg2,
PyObject arg3)
A variant of the __call__ method with three arguments. |
PyObject |
__call__(PyObject arg0,
PyObject arg1,
PyObject arg2,
PyObject arg3)
A variant of the __call__ method with four arguments. |
PyObject |
__call__(ThreadState state)
|
PyObject |
__call__(ThreadState state,
PyObject arg0)
|
PyObject |
__call__(ThreadState state,
PyObject[] args)
|
PyObject |
__call__(ThreadState state,
PyObject[] args,
String[] keywords)
|
PyObject |
__call__(ThreadState state,
PyObject arg0,
PyObject arg1)
|
PyObject |
__call__(ThreadState state,
PyObject arg1,
PyObject[] args,
String[] keywords)
|
PyObject |
__call__(ThreadState state,
PyObject arg0,
PyObject arg1,
PyObject arg2)
|
PyObject |
__call__(ThreadState state,
PyObject arg0,
PyObject arg1,
PyObject arg2,
PyObject arg3)
|
PyObject |
__get__(PyObject obj,
PyObject type)
Get descriptor for this PyObject. |
void |
__setattr__(String name,
PyObject value)
A variant of the __setattr__ method which accepts a String as the key. |
Object |
__tojava__(Class<?> c)
Equivalent to the Jython __tojava__ method. |
void |
delDict()
|
void |
delDoc()
|
void |
delFuncDefaults()
|
void |
delFuncDict()
|
void |
delFuncDoc()
|
void |
delModule()
|
PyObject |
fastGetDict()
xxx implements where meaningful |
PyObject |
getDict()
xxx implements where meaningful |
PyObject |
getFuncDefaults()
|
PyObject |
getFuncDict()
|
PyObject |
getFuncDoc()
|
PyString |
getFuncName()
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
boolean |
isMappingType()
|
boolean |
isNumberType()
|
boolean |
isSequenceType()
|
void |
setDict(PyObject value)
|
void |
setFuncClosure(PyObject value)
|
void |
setFuncCode(PyCode code)
|
void |
setFuncDefaults(PyObject func_defaults)
|
void |
setFuncDict(PyObject value)
|
void |
setFuncDoc(PyObject func_doc)
|
void |
setFuncGlobals(PyObject value)
|
void |
setFuncName(PyString func_name)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PyType TYPE
public String __name__
public PyObject __doc__
public PyObject func_globals
public PyObject[] func_defaults
public PyCode func_code
public PyObject __dict__
public PyObject func_closure
public PyObject __module__
Constructor Detail |
---|
public PyFunction(PyObject globals, PyObject[] defaults, PyCode code, PyObject doc, PyObject[] closure_cells)
public PyFunction(PyObject globals, PyObject[] defaults, PyCode code, PyObject doc)
public PyFunction(PyObject globals, PyObject[] defaults, PyCode code)
public PyFunction(PyObject globals, PyObject[] defaults, PyCode code, PyObject[] closure_cells)
Method Detail |
---|
public PyString getFuncName()
public void setFuncName(PyString func_name)
public PyObject getFuncDoc()
public void setFuncDoc(PyObject func_doc)
public void delFuncDoc()
public void delDoc()
public PyObject getFuncDefaults()
public void setFuncDefaults(PyObject func_defaults)
public void delFuncDefaults()
public void setFuncCode(PyCode code)
public void delModule()
public PyObject fastGetDict()
PyObject
fastGetDict
in class PyObject
public PyObject getDict()
PyObject
getDict
in class PyObject
public void setDict(PyObject value)
setDict
in class PyObject
public void delDict()
delDict
in class PyObject
public PyObject getFuncDict()
public void setFuncDict(PyObject value)
public void delFuncDict()
public void setFuncGlobals(PyObject value)
public void setFuncClosure(PyObject value)
public void __setattr__(String name, PyObject value)
PyObject
__setattr__
in class PyObject
name
- the name whose value will be set -
must be an interned string .value
- the value to set this name toPyObject.__setattr__(PyString, PyObject)
public PyObject __get__(PyObject obj, PyObject type)
PyObject
__get__
in class PyObject
obj
- -
the instance accessing this descriptor. Can be null if this is
being accessed by a type.type
- -
the type accessing this descriptor. Will be null if obj exists
as obj is of the type accessing the descriptor.
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__(ThreadState state)
__call__
in class PyObject
public PyObject __call__(PyObject arg)
PyObject
__call__(args, keywords)
with the
appropriate arguments. The only reason to override this function
would be for improved performance.
__call__
in class PyObject
arg
- the single argument to the function.public PyObject __call__(ThreadState state, PyObject arg0)
__call__
in class PyObject
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__(ThreadState state, PyObject arg0, PyObject arg1)
__call__
in class PyObject
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__(ThreadState state, PyObject arg0, PyObject arg1, PyObject arg2)
__call__
in class PyObject
public PyObject __call__(PyObject arg0, 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
arg0
- the first argument to the function.arg1
- the second argument to the function.arg2
- the third argument to the function.arg3
- the fourth argument to the function.public PyObject __call__(ThreadState state, PyObject arg0, PyObject arg1, PyObject arg2, PyObject arg3)
__call__
in class PyObject
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__(ThreadState state, PyObject[] args)
__call__
in class PyObject
public PyObject __call__(PyObject[] args, String[] keywords)
PyObject
__call__
in class PyObject
args
- all arguments to the function (including
keyword arguments).keywords
- the keywords used for all keyword arguments.public PyObject __call__(ThreadState state, PyObject[] args, String[] keywords)
__call__
in class PyObject
public PyObject __call__(PyObject arg1, PyObject[] args, String[] keywords)
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.args
- the last arguments to the function (including
keyword arguments).keywords
- the keywords used for all keyword arguments.public PyObject __call__(ThreadState state, PyObject arg1, PyObject[] args, String[] keywords)
__call__
in class PyObject
public String toString()
toString
in class PyObject
public Object __tojava__(Class<?> c)
PyObject
Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.
__tojava__
in class PyObject
c
- the Class to convert this PyObject
to.public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public boolean isMappingType()
isMappingType
in class PyObject
public boolean isNumberType()
isNumberType
in class PyObject
public boolean isSequenceType()
isSequenceType
in class PyObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |