@Test(expected = NullPointerException.class) public void getTypeParametersRequiresNonNullParameter() { getTypeParameters(null); }
public static Type[] getTypeParameters(Type type) { Objects.requireNonNull(type, "Type must be given."); if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; return parameterizedType.getActualTypeArguments(); } return EMPTY_TYPE_ARRAY; }
TypeLiteral implements Serializable { public static Type[] getTypeParameters(Type type) { Objects.requireNonNull(type, "Type must be given."); if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; return parameterizedType.getActualTypeArguments(); } return EMPTY_TYPE_ARRAY; } }
TypeLiteral implements Serializable { public static Type[] getTypeParameters(Type type) { Objects.requireNonNull(type, "Type must be given."); if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; return parameterizedType.getActualTypeArguments(); } return EMPTY_TYPE_ARRAY; } TypeLiteral(Type definedType);  TypeLiteral(); }
TypeLiteral implements Serializable { public static Type[] getTypeParameters(Type type) { Objects.requireNonNull(type, "Type must be given."); if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; return parameterizedType.getActualTypeArguments(); } return EMPTY_TYPE_ARRAY; } TypeLiteral(Type definedType);  TypeLiteral(); static TypeLiteral<R> of(Type type); static Type[] getGenericInterfaceTypeParameters(Class<?> clazz, Class<?> interfaceType); static Type[] getTypeParameters(Type type); final Type getType(); @SuppressWarnings("unchecked") final Class<T> getRawType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
TypeLiteral implements Serializable { public static Type[] getTypeParameters(Type type) { Objects.requireNonNull(type, "Type must be given."); if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; return parameterizedType.getActualTypeArguments(); } return EMPTY_TYPE_ARRAY; } TypeLiteral(Type definedType);  TypeLiteral(); static TypeLiteral<R> of(Type type); static Type[] getGenericInterfaceTypeParameters(Class<?> clazz, Class<?> interfaceType); static Type[] getTypeParameters(Type type); final Type getType(); @SuppressWarnings("unchecked") final Class<T> getRawType(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }