/external/guice/core/src/com/google/inject/util/ |
D | Types.java | 49 public static ParameterizedType newParameterizedType(Type rawType, Type... typeArguments) { in newParameterizedType() method in Types 100 return newParameterizedType(List.class, elementType); in listOf() 110 return newParameterizedType(Set.class, elementType); in setOf() 120 return newParameterizedType(Map.class, keyType, valueType); in mapOf() 132 return newParameterizedType(Provider.class, providedType); in providerOf()
|
/external/guice/core/test/com/google/inject/ |
D | TypeLiteralTypeResolutionTest.java | 23 import static com.google.inject.util.Types.newParameterizedType; 53 Type arrayListOfString = newParameterizedType(ArrayList.class, String.class); 107 assertEquals(newParameterizedType(Collection.class, String.class), in testGenericSupertype() 109 assertEquals(newParameterizedType(Iterable.class, String.class), in testGenericSupertype() 111 assertEquals(newParameterizedType(AbstractList.class, String.class), in testGenericSupertype() 286 assertEquals(Types.newParameterizedType(AbstractCollection.class, String.class), in testGetSupertype() 289 TypeLiteral arrayListOfE = TypeLiteral.get(newParameterizedType( in testGetSupertype() 292 newParameterizedType(AbstractCollection.class, ArrayList.class.getTypeParameters()), in testGetSupertype() 299 TypeLiteral type = TypeLiteral.get(newParameterizedType(AbstractList.class, anotherE)); in testGetSupertypeForArraysAsList() 300 assertEquals(newParameterizedType(AbstractCollection.class, anotherE), in testGetSupertypeForArraysAsList()
|
/external/guava/guava-tests/test/com/google/common/reflect/ |
D | TypesTest.java | 51 ParameterizedType ourType = Types.newParameterizedType( in testNewParameterizedType_ownerTypeImplied() 60 ParameterizedType ourType = Types.newParameterizedType( in testNewParameterizedType() 81 Type ourType = Types.newParameterizedType(LocalClass.class, String.class); in testNewParameterizedType_nonStaticLocalClass() 92 Type ourType = Types.newParameterizedType(LocalClass.class, String.class); in doTestNewParameterizedType_staticLocalClass() 115 SerializableTester.reserializeAndAssert(Types.newParameterizedType( in testNewParameterizedType_serializable() 129 Types.newParameterizedType(Map.Entry.class, String.class, Integer.class), in testNewParameterizedType_ownerMissing() 153 Types.newParameterizedType(List.class, String.class)); in testNewArrayType() 380 = Types.newParameterizedType(Map.class, typesIn); in testNewParameterizedTypeImmutability() 394 Types.newParameterizedType( in testNewParameterizedTypeWithWrongNumberOfTypeArguments()
|
D | TypeTokenTest.java | 95 assertEquals(Types.newParameterizedType(Local.class, String.class), in testNonStaticLocalClass() 107 assertEquals(Types.newParameterizedType(Local.class, String.class), in doTestStaticLocalClass() 990 assertEquals(Types.newParameterizedType(Iterable.class, Iterable.class.getTypeParameters()[0]), in testToGenericType() 1000 ParameterizedType expectedType = Types.newParameterizedType(Iterable.class, in testGetSupertype_withTypeVariable() 1001 Types.newParameterizedType(List.class, ListIterable.class.getTypeParameters()[0])); in testGetSupertype_withTypeVariable() 1007 ParameterizedType expectedType = Types.newParameterizedType(Iterable.class, in testGetSupertype_withoutTypeVariable() 1008 Types.newParameterizedType(List.class, String.class)); in testGetSupertype_withoutTypeVariable() 1017 ParameterizedType expectedType = Types.newParameterizedType(Iterable.class, in testGetSupertype_chained() 1018 Types.newParameterizedType(List.class, String.class)); in testGetSupertype_chained() 1049 assertEquals(Types.newParameterizedType(Iterable.class, List.class.getTypeParameters()[0]), in testGetSupertype_fromRawClass() [all …]
|
D | TypeTokenResolutionTest.java | 458 assertEquals(Types.newParameterizedType(Enum.class, typeVariable), 468 assertEquals(Types.newParameterizedType(List.class, v), k.getBounds()[0]); 469 assertEquals(Types.newParameterizedType(List.class, k), v.getBounds()[0]);
|
/external/guice/extensions/multibindings/src/com/google/inject/multibindings/ |
D | OptionalBinder.java | 22 import static com.google.inject.util.Types.newParameterizedType; 217 Types.newParameterizedType(Optional.class, type.getType())); in optionalOf() 223 return TypeLiteral.get(Types.newParameterizedType(JAVA_OPTIONAL_CLASS, type.getType())); in javaOptionalOf() 230 Types.newParameterizedType(Optional.class, in optionalOfJavaxProvider() 231 newParameterizedType(javax.inject.Provider.class, type.getType()))); in optionalOfJavaxProvider() 237 return TypeLiteral.get(Types.newParameterizedType(JAVA_OPTIONAL_CLASS, in javaOptionalOfJavaxProvider() 238 newParameterizedType(javax.inject.Provider.class, type.getType()))); in javaOptionalOfJavaxProvider() 243 return (TypeLiteral<Optional<Provider<T>>>) TypeLiteral.get(Types.newParameterizedType( in optionalOfProvider() 244 Optional.class, newParameterizedType(Provider.class, type.getType()))); in optionalOfProvider() 249 return TypeLiteral.get(Types.newParameterizedType(JAVA_OPTIONAL_CLASS, in javaOptionalOfProvider() [all …]
|
D | Multibinder.java | 202 Type type = Types.newParameterizedType(Collection.class, providerType); in collectionOfProvidersOf() 210 Types.newParameterizedType(javax.inject.Provider.class, elementType.getType()); in collectionOfJavaxProvidersOf() 211 Type type = Types.newParameterizedType(Collection.class, providerType); in collectionOfJavaxProvidersOf()
|
D | MapBinder.java | 23 import static com.google.inject.util.Types.newParameterizedType; 222 newParameterizedType(javax.inject.Provider.class, valueType.getType()))); in mapOfJavaxProviderOf()
|
/external/guice/core/test/com/google/inject/util/ |
D | TypesTest.java | 82 ParameterizedType parameterizedType = Types.newParameterizedType(Map.class, arguments); in testDefensiveCopies() 105 Types.newParameterizedType(Map.class, String.class, int.class); in testTypeParametersMustNotBePrimitives() 155 = Types.newParameterizedType(Map.class, String.class, Integer.class); in testEqualsAndHashcode() 160 Types.newParameterizedType(Set.class, String.class))); in testEqualsAndHashcode() 184 Types.newParameterizedType(Owning.class, String.class); in testCanonicalizeRequiresOwnerTypes()
|
/external/guava/guava/src/com/google/common/reflect/ |
D | Types.java | 93 return newParameterizedType(rawType, arguments); in newParameterizedTypeWithOwner() 105 static ParameterizedType newParameterizedType(Class<?> rawType, Type... arguments) { in newParameterizedType() method in Types
|
D | Invokable.java | 253 return Types.newParameterizedType(declaringClass, typeParams); in getGenericReturnType()
|
D | TypeToken.java | 965 of(Types.newParameterizedType(cls, typeParams));
|
/external/guice/extensions/multibindings/test/com/google/inject/multibindings/ |
D | MapBinderTest.java | 106 return Types.newParameterizedType(javax.inject.Provider.class, type); in javaxProviderOf() 114 return Types.newParameterizedType(Collection.class, type); in collectionOf()
|