- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for getTypeParameters (0.12 sec)
-
android/guava-tests/test/com/google/common/reflect/InvokableTest.java
Invokable<?, ?> factory = Invokable.from(constructor); assertThat(factory.getTypeParameters()).hasLength(2); assertEquals(type.getTypeParameters()[0], factory.getTypeParameters()[0]); assertEquals(constructor.getTypeParameters()[0], factory.getTypeParameters()[1]); ParameterizedType returnType = (ParameterizedType) factory.getReturnType().getType();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 30.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/InvokableTest.java
Invokable<?, ?> factory = Invokable.from(constructor); assertThat(factory.getTypeParameters()).hasLength(2); assertEquals(type.getTypeParameters()[0], factory.getTypeParameters()[0]); assertEquals(constructor.getTypeParameters()[0], factory.getTypeParameters()[1]); ParameterizedType returnType = (ParameterizedType) factory.getReturnType().getType();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 30.7K bytes - Viewed (0) -
guava/src/com/google/common/reflect/Invokable.java
* syntax may show up in opposite order such as {@code new <A>Foo<B>()}. */ @Override public final TypeVariable<?>[] getTypeParameters() { TypeVariable<?>[] declaredByClass = getDeclaringClass().getTypeParameters(); TypeVariable<?>[] declaredByConstructor = constructor.getTypeParameters(); TypeVariable<?>[] result = new TypeVariable<?>[declaredByClass.length + declaredByConstructor.length];
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 19.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/TypeParameterTest.java
TypeVariable<?> variable = new TypeParameter<T>() {}.typeVariable; TypeVariable<?> expected = TypeParameterTest.class.getDeclaredMethod("testCaptureTypeParameter") .getTypeParameters()[0]; assertEquals(expected, variable); } public void testConcreteTypeRejected() { assertThrows(IllegalArgumentException.class, () -> new TypeParameter<String>() {}); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 1.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/TypeTokenTest.java
TypeToken<?> f = TypeToken.of(new TypeCapture<F>() {}.capture()); assertEquals(String.class, f.resolveType(Function.class.getTypeParameters()[0]).getType()); assertEquals(Integer.class, f.resolveType(Function.class.getTypeParameters()[1]).getType()); assertEquals(Long.class, f.resolveType(Iterable.class.getTypeParameters()[0]).getType()); } public <E extends Comparable<Iterable<String>> & Iterable<Integer>>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 21:13:09 UTC 2024 - 89.1K bytes - Viewed (0) -
guava/src/com/google/common/reflect/Types.java
private final Class<?> rawType; ParameterizedTypeImpl(@CheckForNull Type ownerType, Class<?> rawType, Type[] typeArguments) { checkNotNull(rawType); checkArgument(typeArguments.length == rawType.getTypeParameters().length); disallowPrimitiveType(typeArguments, "type parameter"); this.ownerType = ownerType; this.rawType = rawType; this.argumentsList = JavaVersion.CURRENT.usedInGenericType(typeArguments);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 23K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/reflect/TypeTokenTest.java
TypeToken<?> f = TypeToken.of(new TypeCapture<F>() {}.capture()); assertEquals(String.class, f.resolveType(Function.class.getTypeParameters()[0]).getType()); assertEquals(Integer.class, f.resolveType(Function.class.getTypeParameters()[1]).getType()); assertEquals(Long.class, f.resolveType(Iterable.class.getTypeParameters()[0]).getType()); } public <E extends Comparable<Iterable<String>> & Iterable<Integer>>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 21:13:09 UTC 2024 - 89.1K bytes - Viewed (0) -
android/guava/src/com/google/common/reflect/TypeResolver.java
} @Override void visitParameterizedType(ParameterizedType parameterizedType) { Class<?> rawClass = (Class<?>) parameterizedType.getRawType(); TypeVariable<?>[] vars = rawClass.getTypeParameters(); Type[] typeArgs = parameterizedType.getActualTypeArguments(); checkState(vars.length == typeArgs.length); for (int i = 0; i < vars.length; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 24.2K bytes - Viewed (0) -
src/test/java/org/codelibs/core/lang/GenericsUtilTest.java
final Map<TypeVariable<?>, Type> map = GenericsUtil.getTypeVariableMap(Foo.class); assertThat(map, is(notNullValue())); assertThat(map.isEmpty(), is(false)); assertThat(map.get(Foo.class.getTypeParameters()[0]), is(sameClass(Object.class))); } /** * @throws Exception */ public void testGenericMethod() throws Exception {
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 11.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/NullPointerTester.java
return defaultType; } if (type.getRawType() == Converter.class) { TypeToken<?> convertFromType = type.resolveType(Converter.class.getTypeParameters()[0]); TypeToken<?> convertToType = type.resolveType(Converter.class.getTypeParameters()[1]); @SuppressWarnings("unchecked") // returns default for both F and T T defaultConverter = (T) defaultConverter(convertFromType, convertToType);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 11 16:13:05 UTC 2024 - 22.6K bytes - Viewed (0)