'Generic Method in Java with out parameters

I am trying to implement something similar to EventBus implemented in eshopOnContainers.

Is it Possible to define a method like this in java & read the meta data about T and TH at runtime ? There can be multiple classes extending IntegrationEvent(e.g. PriceChangedEvent) & we should be able to Identify the exact class name at runtime.

public <T extends IntegrationEvent, TH extends IntegrationEventHandler<T>> void subscribe() {
       
        
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source