cz.cuni.pogamut.introspection.python
Class PyUnsupportedWrapper
java.lang.Object
cz.cuni.pogamut.introspection.python.PyObjectWrapper
cz.cuni.pogamut.introspection.python.PyUnsupportedWrapper
public class PyUnsupportedWrapper
- extends PyObjectWrapper
Method Summary |
java.lang.String |
getDescription(PyObject unsupportedObject)
|
java.util.ArrayList<PyObjectAdapter> |
getChildren(java.lang.Object object)
If the PyObject contains children (e.g. |
java.lang.Object |
getJavaObject(java.lang.Object pyObject)
Returns java representation of the object. |
PyObject |
getNewValue(java.lang.Object newValue)
Creates instance of correct descendant of the PyObject according
to the type of wrapper from newValue. |
boolean |
hasChildren(java.lang.Object pyObject)
Whether the wrapper may have children (e.g. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PyUnsupportedWrapper
public PyUnsupportedWrapper()
getDescription
public java.lang.String getDescription(PyObject unsupportedObject)
getChildren
public java.util.ArrayList<PyObjectAdapter> getChildren(java.lang.Object object)
- Description copied from class:
PyObjectWrapper
- If the PyObject contains children (e.g. List, Instance, Dictionary),
they are returned as list of PyObjectAdapter.
- Specified by:
getChildren
in class PyObjectWrapper
- Returns:
- list of PyObjectAdapter if the pyObject contains children (List, Instance, etc.)
hasChildren
public boolean hasChildren(java.lang.Object pyObject)
- Description copied from class:
PyObjectWrapper
- Whether the wrapper may have children (e.g. List, Instance, Dictionary).
Warning - it does not tells anything about the number of children.
For instance - if it's list which doesn't have any items, it will
still return true.
- Specified by:
hasChildren
in class PyObjectWrapper
- Returns:
- true if wrapper can have a child (or more children)
getJavaObject
public java.lang.Object getJavaObject(java.lang.Object pyObject)
- Description copied from class:
PyObjectWrapper
- Returns java representation of the object.
This works well for BASIC_TYPEs, others
are returned as String representations.
Note that basic type wrappers (PyInteger, PyLong, PyFloat, PyString)
handles also the java type of objects because the ScriptEngine
sometimes return those types in their java representations.
- Specified by:
getJavaObject
in class PyObjectWrapper
- Returns:
- Object Java representation of the object
getNewValue
public PyObject getNewValue(java.lang.Object newValue)
- Description copied from class:
PyObjectWrapper
- Creates instance of correct descendant of the PyObject according
to the type of wrapper from newValue. New value must be instance
of the class which returns getJavaClass().
- Specified by:
getNewValue
in class PyObjectWrapper