Preserving Inheritance Between Different Classpaths

37 Views Asked by At

Let's say I provide a Service Provider Interface for developers to extend/implement from. My application includes this SPI in its classpath, and loads other libraries at runtime that include implementations of this SPI. Call this version 1.0 of the SPI. People develop against this version 1.0 SPI and everything works.

Now, let's say I want to alter this SPI. I take a couple abstract classes, and I add methods that are implemented, but can still be overridden. Call this version 1.1. Can libraries developed against version 1.0 still work when the main application runs version 1.1? Is the inheritance structure still preserved? The methods added have implementations, so there will never be missing code. But is the bond between the parent and child broken? I don't understand how the inheritance between libraries works in the first place, so I don't have any idea how this will affect things.

0

There are 0 best solutions below