Is there a way to import inner classes? I am using the import
from org.orekit.propagation.events.handlers import RecordAndContinue
and I would also like to use
from org.orekit.propagation.events.handlers import RecordAndContinue$Event
but this is not valid python because of the dollar sign. The reason I need the inner class is because of Java generics and type erasure. RecordAndContinue
and RecordAndContinue.Event
are generified by the EventDetector
type. If eventHandler
is the instance of RecordAndContinue
, when I do
events = eventHandler.getEvents()
event = events.get(0)
the first is a java.util.List
and the second is a java.lang.Object
. The second should be castable to a RecordAndContinue$Event
using the .cast_
method. But I can’t figure out how to import that class, and without that import I have no way of accessing the event data.