Package io.atomix.utils
Class Generics
- java.lang.Object
-
- io.atomix.utils.Generics
-
public final class Generics extends Object
Generics utility.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypegetGenericClassType(Object instance, Class<?> clazz, int position)Returns the generic type at the given position for the given class.static TypegetGenericInterfaceType(Object instance, Class<?> iface, int position)Returns the generic type at the given position for the given interface.
-
-
-
Method Detail
-
getGenericClassType
public static Type getGenericClassType(Object instance, Class<?> clazz, int position)
Returns the generic type at the given position for the given class.- Parameters:
instance- the implementing instanceclazz- the generic classposition- the generic position- Returns:
- the generic type at the given position
-
getGenericInterfaceType
public static Type getGenericInterfaceType(Object instance, Class<?> iface, int position)
Returns the generic type at the given position for the given interface.- Parameters:
instance- the implementing instanceiface- the generic interfaceposition- the generic position- Returns:
- the generic type at the given position
-
-