Package org.eclipse.sisu.plexus
Class TypeArguments
- java.lang.Object
-
- org.eclipse.sisu.plexus.TypeArguments
-
public final class TypeArguments extends Object
Utility methods for dealing with generic type arguments.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Type[]get(Type type)Get all type arguments from a generic type, for example[Foo,Bar]fromMap<Foo,Bar>.static Typeget(Type type, int index)Get an indexed type argument from a generic type, for exampleBarfromMap<Foo,Bar>.static Class<?>getRawType(Type type)
-
-
-
Method Detail
-
get
public static Type[] get(Type type)
Get all type arguments from a generic type, for example[Foo,Bar]fromMap<Foo,Bar>.- Parameters:
type- The generic type- Returns:
- Array of type arguments
-
get
public static Type get(Type type, int index)
Get an indexed type argument from a generic type, for exampleBarfromMap<Foo,Bar>.- Parameters:
type- The generic typeindex- The argument index- Returns:
- Indexed type argument;
Object.classif the given type is a raw class
-
-