In terms of what we "write into" the bytecode we should consider:
- defining more granular interfaces representing the specific types of enhancement done (laziness, bi-directionality, dirty-tracking, etc).
- we could implement a lot of functionality simply as default impls of these methods on the interfaces. This is a Java 8 feature we can use, so we should. It makes manually writing specific bytecode into the classes unnecessary in most (all?) cases. Easier to read, spot bugs, etc -> easier maintenance!
Luis Barreiro had some good ideas (including the ones above) on the subject. Luis Barreiro, anything else you'd add? |