|
|||||||||
| 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.PyClass
public class PyClass
A python class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.python.core.PyObject |
|---|
PyObject.ConversionException |
| Field Summary | |
|---|---|
PyTuple |
__bases__
The base classes of this 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 |
|---|
TYPE |
| Constructor Summary | |
|---|---|
PyClass(java.lang.String name,
PyTuple bases,
PyObject dict)
Create a python class. |
|
| 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_ex__(java.lang.String name)
Attribute lookup hook. |
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. |
PyObject |
fastGetDict()
xxx implements where meaningful |
boolean |
isSubClass(PyClass superclass)
|
void |
noAttributeError(java.lang.String name)
Customized AttributeError for class objects. |
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__
| 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)| Method Detail |
|---|
public PyObject fastGetDict()
PyObject
fastGetDict in class PyObjectpublic PyObject __findattr_ex__(java.lang.String name)
PyObjectPyObject.__getattr__(String) or
PyObject.__findattr__(String). Both methods have a clear policy for
failed lookups.
__findattr_ex__ in class PyObject
public void __setattr__(java.lang.String name,
PyObject value)
PyObject
__setattr__ in class PyObjectname - 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 PyObjectname - the name which will be removed -
must be an interned string .PyObject.__delattr__(PyString)public void __rawdir__(PyDictionary accum)
public void noAttributeError(java.lang.String name)
noAttributeError in class PyObject
public PyObject __call__(PyObject[] args,
java.lang.String[] keywords)
PyObject
__call__ in class PyObjectargs - 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 PyObjectother - the object to compare this with.
public PyString __str__()
PyObjectPyObject is to
override the standard Java toString method.
__str__ in class PyObjectpublic java.lang.String toString()
toString in class PyObjectpublic boolean isSubClass(PyClass superclass)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||