@Test public void get3() throws Exception { TypeLiteral<?> expected = new TypeLiteral<List<List<Foo>>>() {}; TypeLiteral<?> inner = new TypeLiteral<List<Foo>>() {}; TypeLiteral<?> actual = TypeLiterals.get(List.class, inner); assertEquals(expected, actual); }
@SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); }
TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } }
TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private  TypeLiterals(); }
TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private  TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... parameters); static TypeLiteral<T> get(Class<T> type, Class<?>... parameters); static TypeLiteral<T> get(Class<T> type, TypeLiteral<?>... literals); }
TypeLiterals { @SuppressWarnings("unchecked") public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) { return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters)); } private  TypeLiterals(); @SuppressWarnings("unchecked") static TypeLiteral<T> get(Class<T> type, Type... parameters); static TypeLiteral<T> get(Class<T> type, Class<?>... parameters); static TypeLiteral<T> get(Class<T> type, TypeLiteral<?>... literals);  }