// set up access to this actor
// first create an attribute "actor" on the object
// the PyObject class does not allow adding a new attribute to the
// object
object.__setattr__("actor", new PyJavaInstance(this));
// give the object access to attributes and ports of this actor
Iterator attributes = attributeList().iterator();
while (attributes.hasNext()) {
Attribute attribute = (Attribute) attributes.next();
String mangledName = _mangleName(attribute.getName());
if (_debugging) {
_debug("set up reference to attribute \"" + attribute.getName()
+ "\" as \"" + mangledName + "\"");
}
object.__setattr__(new PyString(mangledName), new PyJavaInstance(
attribute));
}
Iterator ports = portList().iterator();
while (ports.hasNext()) {
Port port = (Port) ports.next();
String mangledName = _mangleName(port.getName());
if (_debugging) {
_debug("set up reference to port \"" + port.getName()
+ "\" as \"" + mangledName + "\"");
}
object.__setattr__(new PyString(mangledName), new PyJavaInstance(
port));
}
// populate the method map
for (int i = 0; i < _METHOD_NAMES.length; ++i) {