Implementing a (compile-time) plugin architecture without split packages
问题 In a past question I asked how to design a system where: A class contains one or more optional methods. Optional methods are implemented by plugins that may or not may be present at compile-time. If a user invokes a method whose associated plugin is not present at compile-time, they will get a compile-time error. I provided one possible solution that works in Java 8. Unfortunately, this solution depends on the use of split packages (two modules exporting the same package) which are disallowed