- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for newParameterizedType (0.24 sec)
-
android/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 =
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 14.8K bytes - Viewed (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 =
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 14.8K bytes - Viewed (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()); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 88.7K bytes - Viewed (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()); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 88.7K bytes - Viewed (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 =
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 19.5K bytes - Viewed (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 {
Java - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Viewed (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 =
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 19.5K bytes - Viewed (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<>();
Java - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat May 25 18:02:55 GMT 2019 - 3.8K bytes - Viewed (0) -
android/guava/src/com/google/common/reflect/Types.java
* {@code ownerType}. */ static ParameterizedType newParameterizedTypeWithOwner( @CheckForNull 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);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Apr 17 16:33:44 GMT 2024 - 23.1K bytes - Viewed (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() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Dec 14 20:35:03 GMT 2023 - 18.6K bytes - Viewed (0)