@monkeypatch_method_if_not_set(netref_list) def __tojava__(self, java_type): print '__tojava__ on', type(self) # from PySequence.java in Jython's source code if java_type.isArray(): component = java_type.getComponentType() print '... got component as', type(component), repr(component) from org.python.core import PyArray from java.lang import Integer array = PyArray(component, Integer(len(self)));