|
|||||||||
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
The classic 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 |
String |
__name__
The name of this class |
static PyType |
TYPE
|
Method Summary | |
---|---|
PyObject |
__call__(PyObject[] args,
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__(String name)
A variant of the __delattr__ method which accepts a String as the key. |
PyObject |
__findattr_ex__(String name)
Attribute lookup hook. |
void |
__rawdir__(PyDictionary accum)
|
void |
__setattr__(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. |
static PyObject |
classobj___new__(PyNewWrapper new_,
boolean init,
PyType subtype,
PyObject[] args,
String[] keywords)
|
static PyObject |
classobj___new__(PyObject name,
PyObject bases,
PyObject dict)
|
PyObject |
fastGetDict()
xxx implements where meaningful |
boolean |
isCallable()
|
boolean |
isSubClass(PyClass superclass)
|
void |
noAttributeError(String name)
Customized AttributeError for class objects. |
void |
setBases(PyObject value)
|
void |
setDict(PyObject value)
|
void |
setName(PyObject value)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PyType TYPE
public PyObject __dict__
public PyTuple __bases__
public String __name__
Method Detail |
---|
public static PyObject classobj___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
public static PyObject classobj___new__(PyObject name, PyObject bases, PyObject dict)
public PyObject fastGetDict()
PyObject
fastGetDict
in class PyObject
public PyObject __findattr_ex__(String name)
PyObject
PyObject.__getattr__(String)
or
PyObject.__findattr__(String)
. Both methods have a clear policy for
failed lookups.
__findattr_ex__
in class PyObject
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 void __delattr__(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 void noAttributeError(String name)
noAttributeError
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 boolean isCallable()
isCallable
in class PyObject
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 String toString()
toString
in class PyObject
public boolean isSubClass(PyClass superclass)
public void setDict(PyObject value)
setDict
in class PyObject
public void setBases(PyObject value)
public void setName(PyObject value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |