- Sort Score
- Num 10 results
- Language All
Results 1 - 9 of 9 for newParameterizedType (0.15 seconds)
-
android/guava/src/com/google/common/reflect/Types.java
* {@code ownerType}. */ static ParameterizedType newParameterizedTypeWithOwner( @Nullable Type ownerType, Class<?> rawType, Type... arguments) { if (ownerType == null) { return newParameterizedType(rawType, arguments); } // ParameterizedTypeImpl constructor already checks, but we want to throw NPE before IAE checkNotNull(arguments);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Oct 31 19:34:24 GMT 2025 - 24.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/reflect/TypesTest.java
ParameterizedType jvmType = (ParameterizedType) new TypeCapture<Entry<String, Integer>>() {}.capture(); ParameterizedType ourType = Types.newParameterizedType(Entry.class, String.class, Integer.class); assertEquals(jvmType, ourType); assertEquals(Map.class, ourType.getOwnerType()); } public void testNewParameterizedType() { ParameterizedType jvmType =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 15.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/reflect/TypeTokenTest.java
public void testGetSupertype_withTypeVariable() { ParameterizedType expectedType = Types.newParameterizedType( Iterable.class, Types.newParameterizedType(List.class, ListIterable.class.getTypeParameters()[0])); assertEquals( expectedType, TypeToken.of(ListIterable.class).getSupertype(Iterable.class).getType()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 89.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/reflect/TypeTokenTest.java
public void testGetSupertype_withTypeVariable() { ParameterizedType expectedType = Types.newParameterizedType( Iterable.class, Types.newParameterizedType(List.class, ListIterable.class.getTypeParameters()[0])); assertEquals( expectedType, TypeToken.of(ListIterable.class).getSupertype(Iterable.class).getType()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 89.3K bytes - Click Count (0) -
samples/simple-client/src/main/java/okhttp3/sample/OkHttpContributors.java
private static final Moshi MOSHI = new Moshi.Builder().build(); private static final JsonAdapter<List<Contributor>> CONTRIBUTORS_JSON_ADAPTER = MOSHI.adapter( Types.newParameterizedType(List.class, Contributor.class)); static class Contributor { String login; int contributions; } public static void main(String... args) throws Exception {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
.addInterceptor(new GzipRequestInterceptor()) .build(); private final Moshi moshi = new Moshi.Builder().build(); private final JsonAdapter<Map<String, String>> mapJsonAdapter = moshi.adapter( Types.newParameterizedType(Map.class, String.class, String.class)); public void run() throws Exception { Map<String, String> requestBody = new LinkedHashMap<>();
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 04 17:43:43 GMT 2025 - 3.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/reflect/TypeTokenResolutionTest.java
TypeVariable<?> k = (TypeVariable<?>) paramType.getActualTypeArguments()[0]; TypeVariable<?> v = (TypeVariable<?>) paramType.getActualTypeArguments()[1]; assertEquals(Types.newParameterizedType(List.class, v), k.getBounds()[0]); assertEquals(Types.newParameterizedType(List.class, k), v.getBounds()[0]); } public void testWithGenericLowerBoundInWildcard() throws Exception { WildcardType wildcardType =
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 19.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/reflect/TypeTokenResolutionTest.java
TypeVariable<?> k = (TypeVariable<?>) paramType.getActualTypeArguments()[0]; TypeVariable<?> v = (TypeVariable<?>) paramType.getActualTypeArguments()[1]; assertEquals(Types.newParameterizedType(List.class, v), k.getBounds()[0]); assertEquals(Types.newParameterizedType(List.class, k), v.getBounds()[0]); } public void testWithGenericLowerBoundInWildcard() throws Exception { WildcardType wildcardType =
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 19.6K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/Invokable.java
Type getGenericReturnType() { Class<?> declaringClass = getDeclaringClass(); TypeVariable<?>[] typeParams = declaringClass.getTypeParameters(); if (typeParams.length > 0) { return Types.newParameterizedType(declaringClass, typeParams); } else { return declaringClass; } } @Override Type[] getGenericParameterTypes() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 21:06:42 GMT 2026 - 18.5K bytes - Click Count (0)