sp00ktober
Explore posts from servers❔ nested generic interface throws cast exception when added to list
Im working on a mod project and for this i need to handle different updates which are represented by individual classes that all inherit from the same generic interfaces.
To accomplish the handling i also wrote a generic interface which can then be implemented by a class that should handle one specific class.
In the end i want to have a list of handlers over which i can iterate to process the updates.
This is my interface signature
These are the interfaces for the update and data interfaces
This is the signature of one of my handler classes
These are the signatures of the update and data classes
This is the signature of the base class
This is how i create the List and fill it with values
Im happy for any input as im stuck on this for some hours now 😄
27 replies