I'm working on a plugin which has two components, a public API (Java module) and
a private implementation (Plugin module). The plugin module depends on the Java
module. I have a third plugin which uses the API, so it depends on the Java module.
The plugin module has an ApplicationComponent which has an interface-class which
is an interface in the Java module, and an implementation-class which is in the
When I call Application.getComponent(TheInterfaceClass.class), it returns null.
However, in the debugger, when I call Application.getComponentInterfaces(), I
see TheInterfaceClass in the list. Also, calling Application.getComponent("The
component name"), it returns the correct component.
It looks like the problem is that they're two different instantiations of the
same class. When I call getComponent(TheInterfaceClass.class), it doesn't find
anything because it's a different Class object than the one stored in Application.
My question is, is this desired behavior, or is there some workaround?