Home
last modified time | relevance | path

Searched refs:subtypeOf (Results 1 – 16 of 16) sorted by relevance

/external/guice/core/test/com/google/inject/util/
DTypesTest.java22 import static com.google.inject.util.Types.subtypeOf;
117 assertEqualsBothWays(getWildcard("wildcardExtends"), subtypeOf(CharSequence.class)); in testWildcardTypes()
118 assertEqualsBothWays(getWildcard("wildcardObject"), subtypeOf(Object.class)); in testWildcardTypes()
121 assertEquals("? extends java.lang.CharSequence", subtypeOf(CharSequence.class).toString()); in testWildcardTypes()
122 assertEquals("?", subtypeOf(Object.class).toString()); in testWildcardTypes()
125 assertEqualWhenReserialized(subtypeOf(CharSequence.class)); in testWildcardTypes()
138 subtypeOf(int.class); in testWildcardBoundsMustNotBePrimitives()
/external/javapoet/src/main/java/com/squareup/javapoet/
DWildcardTypeName.java79 public static WildcardTypeName subtypeOf(TypeName upperBound) { in subtypeOf() method in WildcardTypeName
83 public static WildcardTypeName subtypeOf(Type upperBound) { in subtypeOf() method in WildcardTypeName
84 return subtypeOf(TypeName.get(upperBound)); in subtypeOf()
111 return subtypeOf(Object.class); in get()
116 return subtypeOf(TypeName.get(extendsBound, typeVariables)); in get()
/external/guava/guava-tests/test/com/google/common/reflect/
DTypesTest.java185 Type wildcard = Types.subtypeOf(Number.class); in testNewArrayType_upperBoundedWildcard()
186 assertEquals(Types.subtypeOf(Number[].class), Types.newArrayType(wildcard)); in testNewArrayType_upperBoundedWildcard()
232 Types.subtypeOf(Object.class); in testNewWildcardType()
234 Types.subtypeOf(int[][].class); in testNewWildcardType()
253 Types.subtypeOf(int.class); in testNewWildcardType_primitiveTypeBound()
262 Types.subtypeOf(String.class)); in testNewWildcardType_serializable()
264 Types.subtypeOf(Object.class)); in testNewWildcardType_serializable()
DTypeTokenTest.java456 TypeToken.of(Types.subtypeOf(Object.class)).getGenericSuperclass()); in testGetGenericSuperclass_wildcard_boundIsClass()
458 TypeToken.of(Types.subtypeOf(Object[].class)).getGenericSuperclass()); in testGetGenericSuperclass_wildcard_boundIsClass()
462 assertNull(TypeToken.of(Types.subtypeOf(CharSequence.class)).getGenericSuperclass()); in testGetGenericSuperclass_wildcard_boundIsInterface()
464 TypeToken.of(Types.subtypeOf(CharSequence[].class)).getGenericSuperclass()); in testGetGenericSuperclass_wildcard_boundIsInterface()
524 assertThat(TypeToken.of(Types.subtypeOf(Object.class)).getGenericInterfaces()).isEmpty(); in testGetGenericInterfaces_wildcard_boundIsClass()
525 assertThat(TypeToken.of(Types.subtypeOf(Object[].class)).getGenericInterfaces()).isEmpty(); in testGetGenericInterfaces_wildcard_boundIsClass()
530 makeUnmodifiable(TypeToken.of(Types.subtypeOf(interfaceType.getType())).getGenericInterfaces()) in testGetGenericInterfaces_wildcard_boundIsInterface()
601 Type wildcardType = Types.subtypeOf(Object[].class); in testAssignableWildcardBoundedByArrayToArrayClass()
609 TypeToken<?> upperBounded = TypeToken.of(Types.subtypeOf(Object[].class)); in testAssignableArrayClassToBoundedWildcard()
621 Type wildcardType = Types.subtypeOf(int[].class); in testAssignableWildcardBoundedByIntArrayToArrayClass()
[all …]
DTypeVisitorTest.java57 WildcardType type = Types.subtypeOf(String.class); in testVisitWildcardType()
DTypeResolverTest.java114 assertEquals(Types.subtypeOf(String.class), new TypeResolver() in testWhere_parameterizedTypeMapping()
/external/javapoet/src/test/java/com/squareup/javapoet/
DTypeNameTest.java154 assertEqualsHashCodeAndToString(WildcardTypeName.subtypeOf(Object.class), in equalsAndHashCodeWildcardTypeName()
155 WildcardTypeName.subtypeOf(Object.class)); in equalsAndHashCodeWildcardTypeName()
156 assertEqualsHashCodeAndToString(WildcardTypeName.subtypeOf(Serializable.class), in equalsAndHashCodeWildcardTypeName()
157 WildcardTypeName.subtypeOf(Serializable.class)); in equalsAndHashCodeWildcardTypeName()
DAbstractTypesTest.java217 WildcardTypeName type = WildcardTypeName.subtypeOf(CharSequence.class); in wildcardExtendsType()
222 WildcardTypeName type = WildcardTypeName.subtypeOf(Object.class); in wildcardExtendsObject()
DAnnotatedTypeNameTest.java98 TypeName actual = WildcardTypeName.subtypeOf(type); in annotatedWildcardTypeNameWithExtends()
DTypeSpecTest.java85 ClassName.get(List.class), WildcardTypeName.subtypeOf(Object.class)); in interestingTypes()
87 ClassName.get(List.class), WildcardTypeName.subtypeOf(Serializable.class)); in interestingTypes()
/external/guice/core/test/com/google/inject/
DTypeLiteralTest.java61 TypeLiteral<?> b = TypeLiteral.get(Types.listOf(Types.subtypeOf(CharSequence.class))); in testWithWildcardType()
104 assertEquals(Object.class, TypeLiteral.get(Types.subtypeOf(Runnable.class)).getRawType()); in testTypeLiteralsMustHaveRawTypes()
DTypeLiteralInjectionTest.java90 assertEquals(TypeLiteral.get(listOf(Types.subtypeOf(Integer.class))), b.listOfWildcardT); in testInjectTypeLiteralWithClassTypes()
DKeyTest.java155 assertNotSerializable(Key.get(Types.listOf(Types.subtypeOf(CharSequence.class)))); in testSerialization()
/external/guice/core/src/com/google/inject/util/
DTypes.java78 public static WildcardType subtypeOf(Type bound) { in subtypeOf() method in Types
/external/guava/guava/src/com/google/common/reflect/
DTypes.java80 return subtypeOf(newArrayType(upperBounds[0])); in newArrayType()
165 @VisibleForTesting static WildcardType subtypeOf(Type upperBound) { in subtypeOf() method in Types
225 return subtypeOf(componentType); in subtypeOfComponentType()
/external/guice/core/src/com/google/inject/
DTypeLiteral.java218 return Types.subtypeOf(upperBound); in resolveType()