I'm working with Anthill (an UrbanCode/IBM product) and one of the methods requires a parameter of type java.lang.Class<? extends SourceConfig<?>> sourceConfigType.
After reading the tutorial on generics I found that a class GitSourceConfig is a subclass of SourceConfig but I don't understand how the generic of SourceConfig<?> works in this context. Any ideas?
The end goal is to get a GitSourceConfig object and call the getRepositoryUrl/setRepositoryUrl methods. The Anthill Pro API is here and I'm looking at the SourceConfig class.
The generic bounded wildcard type in your example
java.lang.Class<? extends SourceConfig<?>> sourceConfigTypespecifies thatsourceConfigTypeis any class that can be bound by the upper bound type ofSourceConfig.From the tutorial,
Note
SourceConfigitself is also generic, and here it is using a regular unbounded wildcard.