- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 18 for TypeToken (0.2 seconds)
-
guava-tests/test/com/google/common/reflect/ImmutableTypeToInstanceMapTest.java
return immutableEntry((TypeToken) k, v); } @Override @SuppressWarnings("unchecked") public Entry<TypeToken, Object>[] createArray(int length) { return (Entry<TypeToken, Object>[]) new Entry<?, ?>[length]; } @Override public Iterable<Entry<TypeToken, Object>> order(List<Entry<TypeToken, Object>> insertionOrder) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Dec 19 18:03:30 GMT 2024 - 6.9K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/MutableTypeToInstanceMap.java
extends ForwardingMap<TypeToken<? extends @NonNull B>, B> implements TypeToInstanceMap<B> { /** Creates a new map. */ public MutableTypeToInstanceMap() {} private final Map<TypeToken<? extends @NonNull B>, B> backingMap = new HashMap<>(); @Override public <T extends @NonNull B> @Nullable T getInstance(Class<T> type) { return trustedGet(TypeToken.of(type)); } @Override
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue May 13 17:27:14 GMT 2025 - 5.7K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/ImmutableTypeToInstanceMap.java
} } private final ImmutableMap<TypeToken<? extends B>, B> delegate; private ImmutableTypeToInstanceMap(ImmutableMap<TypeToken<? extends B>, B> delegate) { this.delegate = delegate; } @Override public <T extends B> @Nullable T getInstance(TypeToken<T> type) { return trustedGet(type.rejectTypeVariables()); } @Override
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 5.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java
assertThat(map.get(TypeToken.of(Integer.class))).isNull(); assertThat(map.getInstance(Integer.class)).isNull(); map.putInstance(Long.class, null); assertTrue(map.containsKey(TypeToken.of(Long.class))); assertTrue(map.entrySet().contains(immutableEntry(TypeToken.of(Long.class), null))); assertThat(map.get(TypeToken.of(Long.class))).isNull();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 8.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/reflect/MutableTypeToInstanceMapTest.java
assertThat(map.get(TypeToken.of(Integer.class))).isNull(); assertThat(map.getInstance(Integer.class)).isNull(); map.putInstance(Long.class, null); assertTrue(map.containsKey(TypeToken.of(Long.class))); assertTrue(map.entrySet().contains(immutableEntry(TypeToken.of(Long.class), null))); assertThat(map.get(TypeToken.of(Long.class))).isNull();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 8.1K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/TypeToInstanceMap.java
/** * A map, each entry of which maps a {@link TypeToken} to an instance of that type. In addition to * implementing {@code Map}, the additional type-safe operations {@link #putInstance} and {@link * #getInstance} are available. * * <p>Generally, implementations don't support {@link #put} and {@link #putAll} because there is no * way to check an object at runtime to be an instance of a {@link TypeToken}. Instead, callerCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 3.7K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/TypeParameter.java
import java.lang.reflect.TypeVariable; import org.jspecify.annotations.Nullable; /** * Captures a free type variable that can be used in {@link TypeToken#where}. For example: * * {@snippet : * static <T> TypeToken<List<T>> listOf(Class<T> elementType) { * return new TypeToken<List<T>>() {} * .where(new TypeParameter<T>() {}, elementType); * } * } * * @author Ben Yu * @since 12.0 */ /*Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 2.4K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/DummyProxy.java
} /** Returns the dummy return value for {@code returnType}. */ abstract <R> @Nullable R dummyReturnValue(TypeToken<R> returnType); private final class DummyHandler extends AbstractInvocationHandler implements Serializable { private final TypeToken<?> interfaceType; DummyHandler(TypeToken<?> interfaceType) { this.interfaceType = interfaceType; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Aug 11 22:10:29 GMT 2025 - 4.5K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/DummyProxy.java
} /** Returns the dummy return value for {@code returnType}. */ abstract <R> @Nullable R dummyReturnValue(TypeToken<R> returnType); private final class DummyHandler extends AbstractInvocationHandler implements Serializable { private final TypeToken<?> interfaceType; DummyHandler(TypeToken<?> interfaceType) { this.interfaceType = interfaceType; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Aug 11 22:10:29 GMT 2025 - 4.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/reflect/SubtypeTester.java
.that(TypeToken.of(paramType).isSubtypeOf(returnType)) .isTrue(); assertWithMessage("%s is supertype of %s", returnType, paramType) .that(TypeToken.of(returnType).isSupertypeOf(paramType)) .isTrue(); if (!spec.suppressGetSubtype()) { assertThat(getSubtype(returnType, TypeToken.of(paramType).getRawType())).isEqualTo(paramType); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 6.1K bytes - Click Count (0)