Home
last modified time | relevance | path

Searched refs:newParameterizedType (Results 1 – 13 of 13) sorted by relevance

/external/guice/core/src/com/google/inject/util/
DTypes.java49 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/
DTypeLiteralTypeResolutionTest.java23 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/
DTypesTest.java51 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()
DTypeTokenTest.java95 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 …]
DTypeTokenResolutionTest.java458 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/
DOptionalBinder.java22 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 …]
DMultibinder.java202 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()
DMapBinder.java23 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/
DTypesTest.java82 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/
DTypes.java93 return newParameterizedType(rawType, arguments); in newParameterizedTypeWithOwner()
105 static ParameterizedType newParameterizedType(Class<?> rawType, Type... arguments) { in newParameterizedType() method in Types
DInvokable.java253 return Types.newParameterizedType(declaringClass, typeParams); in getGenericReturnType()
DTypeToken.java965 of(Types.newParameterizedType(cls, typeParams));
/external/guice/extensions/multibindings/test/com/google/inject/multibindings/
DMapBinderTest.java106 return Types.newParameterizedType(javax.inject.Provider.class, type); in javaxProviderOf()
114 return Types.newParameterizedType(Collection.class, type); in collectionOf()