This would potentially allow us to provide a "datanucleus-enhancement" mini-jar providing just the necessary classes in the enhancement contract. Would need to cast the dnGetExecutionContext result to the right class where required.
Some refactorings needed to isolate the enhancement contract into its own package (so potentially separable in the future) :-
org.datanucleus.enhancer.Persistable -> org.datanucleus.enhancement.Persistable
org.datanucleus.state.StateManager -> org.datanucleus.enhancement.StateManager
This will impact on api.jdo, api.jpa, api.rest, and store.neodatis