cz.cuni.pogamut.introspection.python
Class PythonEngineScriptProxy
java.lang.Object
cz.cuni.pogamut.introspection.DefaultIntrospectableProxy<javax.script.ScriptEngine>
cz.cuni.pogamut.introspection.ScriptProxy
cz.cuni.pogamut.introspection.python.PythonEngineScriptProxy
- All Implemented Interfaces:
- IntrospectableProxy
public class PythonEngineScriptProxy
- extends ScriptProxy
Field Summary |
private javax.script.ScriptEngine |
engine
|
Method Summary |
void |
closeIntrospection()
This should clean up any bindings the IntrospectableProxy might have
with the object it introspects to allow GC collect the object. |
protected IntrospectableProxy[] |
computeChildren(javax.script.ScriptEngine object)
Computes list of introspectable children of object to be introspected. |
protected Property[] |
computeProperties(javax.script.ScriptEngine object)
Computes list of properties of object to be introspected. |
private java.util.ArrayList<PyObjectAdapter> |
filterEngineVariables(javax.script.ScriptEngine engine,
boolean hasChildren)
Returns adapter for variables which have or haven't children (based on parameter hasChildren) |
java.lang.String |
getName()
Returns getProxiedObject().toString(); It is strongly recomended to override this method. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
engine
private javax.script.ScriptEngine engine
PythonEngineScriptProxy
public PythonEngineScriptProxy(javax.script.ScriptEngine engine)
getName
public java.lang.String getName()
- Description copied from class:
DefaultIntrospectableProxy
- Returns getProxiedObject().toString(); It is strongly recomended to override this method.
- Specified by:
getName
in interface IntrospectableProxy
- Overrides:
getName
in class DefaultIntrospectableProxy<javax.script.ScriptEngine>
- Returns:
- getProxiedObject().toString();
filterEngineVariables
private java.util.ArrayList<PyObjectAdapter> filterEngineVariables(javax.script.ScriptEngine engine,
boolean hasChildren)
- Returns adapter for variables which have or haven't children (based on parameter hasChildren)
- Parameters:
properties
- whether we want properties = basic types (false) or complex types = list, dicts, classes (true)
- Returns:
- list of adapters
computeChildren
protected IntrospectableProxy[] computeChildren(javax.script.ScriptEngine object)
- Description copied from class:
DefaultIntrospectableProxy
- Computes list of introspectable children of object to be introspected.
- Specified by:
computeChildren
in class DefaultIntrospectableProxy<javax.script.ScriptEngine>
- Parameters:
object
- Object to be introspected.
- Returns:
- Array of introspectable children.
computeProperties
protected Property[] computeProperties(javax.script.ScriptEngine object)
- Description copied from class:
DefaultIntrospectableProxy
- Computes list of properties of object to be introspected.
- Specified by:
computeProperties
in class DefaultIntrospectableProxy<javax.script.ScriptEngine>
- Parameters:
object
- Object to be introspected.
- Returns:
- Array of properties.
main
public static void main(java.lang.String[] args)
closeIntrospection
public void closeIntrospection()
- Description copied from interface:
IntrospectableProxy
- This should clean up any bindings the IntrospectableProxy might have
with the object it introspects to allow GC collect the object.