Regarding problem #1, take a look at java.lang.reflect.Proxy or the cglib library. They let you dynamically implement interfaces or create subclasses from existing classes.
Author: Oliver Busse
http://about.me/oliverbusse
This software is licensed under the Apache License 2.0
Code snippets or any other console output - if not otherwise proclaimed - licensed under WTFPL – Do What the Fuck You Want to Public License
Made with love and IBM XPages, using Twitter Bootstrap 3
This website uses the XPages Extension Library, Bootstrap4XPages Plugin and the OpenNTF Domino API