Package io.dropwizard.util
Class Generics
java.lang.Object
io.dropwizard.util.Generics
Helper methods for class type parameters.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>getTypeParameter(Class<?> klass) Finds the type parameter for the given class.static <T> Class<T>getTypeParameter(Class<?> klass, Class<? super T> bound) Finds the type parameter for the given class which is assignable to the bound class.
-
Method Details
-
getTypeParameter
Finds the type parameter for the given class.- Parameters:
klass- a parameterized class- Returns:
- the class's type parameter
-
getTypeParameter
Finds the type parameter for the given class which is assignable to the bound class.- Type Parameters:
T- the type bound- Parameters:
klass- a parameterized classbound- the type bound- Returns:
- the class's type parameter
-