One pattern of ensuring that a Jython base class implemented in Java can call an `@ExposedMethod` that has potentially been overridden in Python is to have a pair of methods on the base class: * a `public` method named for the method to be overridden by the derived class. * an `@ExposedMethod` declared as `final` that is available in python. Then the derived class overrides the super class method in the [[GeneratedDerivedClasses#Background|standard fashion]], i.e. "it will check for the existence of a (Python) method redefining (the exposed name of) that method. If it fails to find one, it calls the version in the principal class (using the `super` keyword in Java). If it finds a Python re-definition, it invokes that using `PyObject.__call__()`" This is done the use of the `rest` directive in the derived template - e.g. a typical implementation is: {{{#!highlight python base_class: PyDefaultDict want_dict: true ctr: incl: dict rest: public PyObject __missing__(PyObject key) { PyType self_type=getType(); PyObject impl=self_type.lookup("__missing__"); if (impl!=null) { return impl.__get__(this,self_type).__call__(key); } return super.__missing__(key); } }}} So the base class now defines an '''@ExposedMethod''': {{{#!highlight java @ExposedMethod final PyObject defaultdict___missing__(PyObject key) { if (defaultFactory == Py.None) { throw Py.KeyError(key); } return defaultFactory.__call__(); } }}} and the public method calls the `@ExposedMethod` directly like: {{{#!highlight java public PyObject __missing__(PyObject key) { return defaultdict___missing__(key); } }}} So if any method in the base class calls the `public` method it will result in standard Java dynamic method dispatch to a `Py*Derived` class if the instance in question has derived from the base class and that will call the overridden python method if it exists or default back to the base classes implementation via `super`.