|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.python.core.PyObject org.python.core.PyClass
A python class.
Nested Class Summary |
Nested classes inherited from class org.python.core.PyObject |
PyObject.ConversionException |
Field Summary | |
PyTuple |
__bases__
The base classes of this class |
static PyClass |
__class__
|
PyObject |
__dict__
Holds the namespace for this class |
java.lang.String |
__name__
The name of this class |
Fields inherited from class org.python.core.PyObject |
exposed_name |
Constructor Summary | |
PyClass(java.lang.String name,
PyTuple bases,
PyObject dict)
Create a python class. |
|
PyClass(java.lang.String name,
PyTuple bases,
PyObject dict,
java.lang.Class proxyClass)
Create a python class which inherit from a java class and where we already have generated a proxyclass. |
Method Summary | |
PyObject |
__call__(PyObject[] args,
java.lang.String[] keywords)
The basic method to override when implementing a callable object. |
int |
__cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method. |
void |
__delattr__(java.lang.String name)
A variant of the __delattr__ method which accepts a String as the key. |
PyObject |
__findattr__(java.lang.String name)
A variant of the __findattr__ method which accepts a Java String as the name.
|
void |
__rawdir__(PyDictionary accum)
|
void |
__setattr__(java.lang.String name,
PyObject value)
A variant of the __setattr__ method which accepts a String as the key. |
PyString |
__str__()
Equivalent to the standard Python __str__ method. |
java.lang.Object |
__tojava__(java.lang.Class c)
Equivalent to the Jython __tojava__ method. |
boolean |
isSubClass(PyClass superclass)
|
java.lang.String |
safeRepr()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public PyObject __dict__
public PyTuple __bases__
public java.lang.String __name__
public static PyClass __class__
Constructor Detail |
public PyClass(java.lang.String name, PyTuple bases, PyObject dict)
name
- name of the class.bases
- A list of base classes.dict
- The class dict. Normally this dict is returned by
the class code object.Py.makeClass(String, PyObject[], PyCode, PyObject)
public PyClass(java.lang.String name, PyTuple bases, PyObject dict, java.lang.Class proxyClass)
name
- name of the class.bases
- A list of base classes.dict
- The class dict. Normally this dict is returned by
the class code object.Py.makeClass(String, PyObject[], PyCode,
PyObject, Class)
Method Detail |
public java.lang.Object __tojava__(java.lang.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 PyObject __findattr__(java.lang.String name)
PyObject
String
as the name.
By default, this method will call __findattr__(PyString
name)
with the appropriate args. The only reason to override
this method is for performance.
Warning: name must be an interned string!!!!!!!!
__findattr__
in class PyObject
name
- the name to lookup in this namespace
must be an interned string .
PyObject.__findattr__(PyString)
public void __setattr__(java.lang.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 void __delattr__(java.lang.String name)
PyObject
__delattr__(PyString name)
with the appropriate args.
The only reason to override this method is for performance.
__delattr__
in class PyObject
name
- the name which will be removed -
must be an interned string .PyObject.__delattr__(PyString)
public void __rawdir__(PyDictionary accum)
public PyObject __call__(PyObject[] args, java.lang.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 int __cmp__(PyObject other)
PyObject
__cmp__
in class PyObject
other
- the object to compare this with.
public PyString __str__()
PyObject
PyObject
is to
override the standard Java toString
method.
__str__
in class PyObject
public java.lang.String toString()
toString
in class PyObject
public boolean isSubClass(PyClass superclass)
public java.lang.String safeRepr() throws PyIgnoreMethodTag
safeRepr
in class PyObject
PyIgnoreMethodTag
PyObject.safeRepr()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |