/external/auto/common/src/test/java/com/google/auto/common/ |
D | MoreTypesTest.java | 66 TypeMirror objectType = elements.getTypeElement(Object.class.getCanonicalName()).asType(); in equivalence() 67 TypeMirror stringType = elements.getTypeElement(String.class.getCanonicalName()).asType(); in equivalence() 76 TypeMirror funkyBoundsVar = ((DeclaredType) funkyBounds.asType()).getTypeArguments().get(0); in equivalence() 77 TypeMirror funkyBounds2Var = ((DeclaredType) funkyBounds2.asType()).getTypeArguments().get(0); in equivalence() 78 TypeMirror funkierBoundsVar = ((DeclaredType) funkierBounds.asType()).getTypeArguments().get(0); in equivalence() 81 TypeMirror mapType = mapElement.asType(); in equivalence() 101 .addEquivalenceGroup(funkyBounds.asType()) in equivalence() 102 .addEquivalenceGroup(funkyBounds2.asType()) in equivalence() 103 .addEquivalenceGroup(funkierBounds.asType()) in equivalence() 107 .addEquivalenceGroup(enumElement.asType()) in equivalence() [all …]
|
D | MoreTypesIsTypeOfTest.java | 53 assertTrue(MoreTypes.isType(typeElementFor(TestType.class).asType())); in isTypeOf_DeclaredType() 55 .that(MoreTypes.isTypeOf(TestType.class, typeElementFor(TestType.class).asType())) in isTypeOf_DeclaredType() 58 .that(MoreTypes.isTypeOf(String.class, typeElementFor(TestType.class).asType())) in isTypeOf_DeclaredType() 67 assertTrue(MoreTypes.isType(typeElementFor(ArrayType.class).asType())); in isTypeOf_ArrayType() 79 assertTrue(MoreTypes.isType(typeElementFor(PrimitiveBoolean.class).asType())); in isTypeOf_PrimitiveBoolean() 89 assertTrue(MoreTypes.isType(typeElementFor(PrimitiveByte.class).asType())); in isTypeOf_PrimitiveByte() 99 assertTrue(MoreTypes.isType(typeElementFor(PrimitiveChar.class).asType())); in isTypeOf_PrimitiveChar() 109 assertTrue(MoreTypes.isType(typeElementFor(PrimitiveDouble.class).asType())); in isTypeOf_PrimitiveDouble() 119 assertTrue(MoreTypes.isType(typeElementFor(PrimitiveFloat.class).asType())); in isTypeOf_PrimitiveFloat() 129 assertTrue(MoreTypes.isType(typeElementFor(PrimitiveInt.class).asType())); in isTypeOf_PrimitiveInt() [all …]
|
/external/desugar/java/com/google/devtools/common/options/processor/ |
D | OptionProcessor.java | 116 converterMapBuilder.put(typeElement.asType(), entry.getValue()); in init() 129 converterMapBuilder.put(typeUtils.boxedClass(primitiveType).asType(), entry.getValue()); in init() 140 TypeMirror thisOptionClass = optionField.getEnclosingElement().asType(); in checkInOptionBase() 142 elementUtils.getTypeElement("com.google.devtools.common.options.OptionsBase").asType(); in checkInOptionBase() 174 TypeMirror optionType = optionField.asType(); in getAcceptedConverterReturnTypes() 176 TypeMirror listType = elementUtils.getTypeElement(List.class.getCanonicalName()).asType(); in getAcceptedConverterReturnTypes() 192 if (!typeUtils.isAssignable(optionDeclaredType.asElement().asType(), listType)) { in getAcceptedConverterReturnTypes() 223 return ImmutableList.of(optionField.asType()); in getAcceptedConverterReturnTypes() 271 optionField, "The converter type %s must be a concrete type", converterElement.asType()); in checkProvidedConverter() 274 DeclaredType converterType = (DeclaredType) converterElement.asType(); in checkProvidedConverter() [all …]
|
/external/auto/common/src/main/java/com/google/auto/common/ |
D | Overrides.java | 122 overriddenType = MoreElements.asType(overridden.getEnclosingElement()); in overrides() 128 typeUtils.erasure(in.asType()), typeUtils.erasure(overriddenType.asType()))) { in overrides() 177 DeclaredType inType = MoreTypes.asDeclared(in.asType()); in isSubsignature() 248 params.add(typeUtils.erasure(visit(param.asType()))); in erasedParameterTypes() 261 TypeElement element = MoreElements.asType(declared.asElement()); in erasedParameterTypes() 334 TypeElement methodContainer = MoreElements.asType(method.getEnclosingElement()); in methodFromSuperinterfaces() 336 TypeMirror methodContainerType = typeUtils.erasure(methodContainer.asType()); in methodFromSuperinterfaces() 345 TypeMirror candidateType = typeUtils.erasure(t.asType()); in methodFromSuperinterfaces() 380 TypeMirror tParamType = typeUtils.erasure(tMethod.getParameters().get(i).asType()); in methodInType() 394 return MoreElements.asType(typeUtils.asElement(sup)); in superclass() [all …]
|
/external/auto/value/src/test/java/com/google/auto/value/processor/ |
D | TypeVariablesTest.java | 84 TypeMirror setFooParameter = targetMethods.get(0).getParameters().get(0).asType(); in simpleTypeParameter() 108 TypeMirror setFooParameter = targetMethods.get(0).getParameters().get(0).asType(); in hairyTypeParameters() 138 TypeMirror setFooParameter = setFoo.getParameters().get(0).asType(); in nestedClasses() 143 TypeMirror setBarParameter = setBar.getParameters().get(0).asType(); in nestedClasses() 157 typeUtils.getDeclaredType(immutableMap, string.asType(), number.asType()); in canAssignStaticMethodResult() 159 typeUtils.getDeclaredType(immutableMap, string.asType(), integer.asType()); in canAssignStaticMethodResult() 161 TypeMirror erasedMap = typeUtils.erasure(map.asType()); in canAssignStaticMethodResult() 188 erasedParameterType, typeUtils.erasure(m.getParameters().get(0).asType()))) in methodNamed()
|
/external/javapoet/src/test/java/com/squareup/javapoet/ |
D | AbstractTypesTest.java | 61 return getElement(clazz).asType(); in getMirror() 97 ErrorType topLevel = (ErrorType) fields.get(0).asType(); in errorTypes() 98 ErrorType member = (ErrorType) fields.get(1).asType(); in errorTypes() 131 assertThat(TypeName.get(typeVariables.get(0).asType())) in getTypeVariableTypeMirror() 133 assertThat(TypeName.get(typeVariables.get(1).asType())) in getTypeVariableTypeMirror() 135 assertThat(TypeName.get(typeVariables.get(2).asType())) in getTypeVariableTypeMirror() 137 assertThat(TypeName.get(typeVariables.get(3).asType())) in getTypeVariableTypeMirror() 139 assertThat(TypeName.get(typeVariables.get(4).asType())) in getTypeVariableTypeMirror() 141 assertThat(TypeName.get(typeVariables.get(5).asType())) in getTypeVariableTypeMirror() 143 assertThat(((TypeVariableName) TypeName.get(typeVariables.get(4).asType())).bounds) in getTypeVariableTypeMirror() [all …]
|
/external/connectedappssdk/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/ |
D | EarlyValidator.java | 220 contextType = validatorContext.elements().getTypeElement("android.content.Context").asType(); in EarlyValidator() 222 parcelableType = validatorContext.elements().getTypeElement("android.os.Parcelable").asType(); in EarlyValidator() 228 .asType(); in EarlyValidator() 234 .asType(); in EarlyValidator() 240 .asType(); in EarlyValidator() 246 .asType(); in EarlyValidator() 253 .asType(); in EarlyValidator() 259 .asType(); in EarlyValidator() 593 .collect(toMap(element -> element.asType().toString(), element -> new HashSet<>())); in validateCrossProfileTypesAreProvided() 642 .anyMatch(v -> !validatorContext.types().isSameType(v.asType(), contextType)) in validateProviderMethods() [all …]
|
D | SupportedTypes.java | 314 addSupportForUsedType(types, elements, usableTypes, parameter.asType()); in addSupportForUsedTypes() 324 type = types.getArrayType(elements.getTypeElement("java.lang.Object").asType()); in addSupportForUsedType() 380 TypeMirror parcelable = elements.getTypeElement("android.os.Parcelable").asType(); in getSupportedType() 385 TypeMirror serializable = elements.getTypeElement("java.io.Serializable").asType(); in getSupportedType() 402 .setTypeMirror(type.asType()) in createCrossProfileCallbackType() 452 .setTypeMirror(elements.getTypeElement("java.lang.Void").asType()) in addDefaultTypes() 459 .setTypeMirror(elements.getTypeElement("java.lang.String").asType()) in addDefaultTypes() 477 .setTypeMirror(types.boxedClass(types.getPrimitiveType(TypeKind.BYTE)).asType()) in addDefaultTypes() 495 .setTypeMirror(types.boxedClass(types.getPrimitiveType(TypeKind.SHORT)).asType()) in addDefaultTypes() 513 .setTypeMirror(types.boxedClass(types.getPrimitiveType(TypeKind.INT)).asType()) in addDefaultTypes() [all …]
|
D | OtherProfileGenerator.java | 182 if (crossProfileType.supportedTypes().isAutomaticallyResolved(param.asType())) { in generateBlockingMethodOnOtherProfileClass() 188 TypeUtils.generateBundlerType(param.asType())); in generateBlockingMethodOnOtherProfileClass() 243 generatorContext.elements().getTypeElement(callbackParameter.asType().toString()); in generateCrossProfileCallbackMethodOnOtherProfileClass() 268 if (crossProfileType.supportedTypes().isAutomaticallyResolved(param.asType())) { in generateCrossProfileCallbackMethodOnOtherProfileClass() 277 TypeUtils.generateBundlerType(param.asType())); in generateCrossProfileCallbackMethodOnOtherProfileClass() 331 if (crossProfileType.supportedTypes().isAutomaticallyResolved(param.asType())) { in generateFutureMethodOnOtherProfileClass() 337 TypeUtils.generateBundlerType(param.asType())); in generateFutureMethodOnOtherProfileClass()
|
/external/skqp/src/core/ |
D | SkRect.cpp | 134 static const char* set_scalar(SkString* storage, SkScalar value, SkScalarAsStringType asType) { in set_scalar() argument 136 SkAppendScalar(storage, value, asType); in set_scalar() 141 SkScalarAsStringType asType = asHex ? kHex_SkScalarAsStringType : kDec_SkScalarAsStringType; in dump() local 146 line.printf( "SkRect::MakeLTRB(%s, /* %f */\n", set_scalar(&tmp, fLeft, asType), fLeft); in dump() 147 line.appendf(" %s, /* %f */\n", set_scalar(&tmp, fTop, asType), fTop); in dump() 148 line.appendf(" %s, /* %f */\n", set_scalar(&tmp, fRight, asType), fRight); in dump() 149 line.appendf(" %s /* %f */);", set_scalar(&tmp, fBottom, asType), fBottom); in dump()
|
/external/dagger2/java/dagger/internal/codegen/writing/ |
D | InjectionMethods.java | 20 import static com.google.auto.common.MoreElements.asType; 187 TypeElement enclosingType = MoreElements.asType(constructor.getEnclosingElement()); in constructorProxy() 192 .returns(TypeName.get(enclosingType.asType())); in constructorProxy() 214 .map(VariableElement::asType) in requiresInjectionMethod() 303 types.erasure(injectionSite.element().getEnclosingElement().asType()); in invokeAll() 345 membersInjectorNameForType(asType(injectionSite.element().getEnclosingElement())); in invoke() 383 } else if (dependency.requestElement().get().asType().getKind().equals(TypeKind.TYPEVAR)) { in injectionMethodArgument() 398 .map(element -> element.asType().getKind().isPrimitive()) in accessibleType() 443 TypeElement enclosingType = asType(method.getEnclosingElement()); in methodProxy() 449 instance = CodeBlock.of("$T", rawTypeName(TypeName.get(enclosingType.asType()))); in methodProxy() [all …]
|
/external/dagger2/java/dagger/internal/codegen/ |
D | AssistedFactoryProcessingStep.java | 19 import static com.google.auto.common.MoreElements.asType; 93 super(MoreElements::asType); in AssistedFactoryProcessingStep() 150 ExecutableType methodType = types.resolveExecutableType(method, factory.asType()); in validate() 180 AssistedFactoryMetadata.create(factory.asType(), elements, types); in validate() 272 TypeElement factory = asType(binding.bindingElement().get()); in write() 284 builder.addSuperinterface(factory.asType()); in write() 286 builder.superclass(factory.asType()); in write() 290 AssistedFactoryMetadata.create(asDeclared(factory.asType()), elements, types); in write() 325 .returns(providerOf(TypeName.get(factory.asType()))) in write()
|
D | ComponentProcessingStep.java | 19 import static com.google.auto.common.MoreElements.asType; 73 super(MoreElements::asType); in ComponentProcessingStep() 136 creatorValidator.validate(MoreElements.asType(creator)).printMessagesTo(messager); in processCreator() 140 ValidationReport<?> report = componentValidator.validate(asType(component)); in isComponentValid()
|
/external/dagger2/java/dagger/internal/codegen/validation/ |
D | ComponentCreatorValidator.java | 248 TypeMirror returnType = types.resolveExecutableType(method, type.asType()).getReturnType(); in validateSetterMethod() 249 if (returnType.getKind() != TypeKind.VOID && !types.isSubtype(type.asType(), returnType)) { in validateSetterMethod() 271 if (!bindsInstance && parameter.asType().getKind().isPrimitive()) { in validateSetterMethod() 312 && parameter.asType().getKind().isPrimitive()) { in validateFactoryMethod() 326 TypeMirror returnType = types.resolveExecutableType(method, type.asType()).getReturnType(); in validateFactoryMethodReturnType() 328 if (!types.isSubtype(component.asType(), returnType)) { in validateFactoryMethodReturnType() 344 TypeElement componentType = MoreElements.asType(component); in validateFactoryMethodReturnType() 345 if (!types.isSameType(componentType.asType(), returnType)) { in validateFactoryMethodReturnType()
|
D | BindingMethodValidator.java | 19 import static com.google.auto.common.MoreElements.asType; 168 TypeElement enclosingElement = asType(element.getEnclosingElement()); in checkEnclosingElement() 171 enclosingElement = asType(enclosingElement.getEnclosingElement()); in checkEnclosingElement() 234 dependencyRequestValidator.validateDependencyRequest(report, parameter, parameter.asType()); in checkParameter() 306 TypeMirror exceptionSupertype = validator.elements.getTypeElement(superclass).asType(); in checkThrows() 307 TypeMirror errorType = validator.elements.getTypeElement(Error.class).asType(); in checkThrows()
|
/external/connectedappssdk/processor/src/main/java/com/google/android/enterprise/connectedapps/processor/containers/ |
D | CrossProfileMethodInfo.java | 123 .filter(p -> !supportedTypes.isAutomaticallyResolved(p.asType())) in commaSeparatedParameters() 133 supportedTypes.isAutomaticallyResolved(p.asType()) in commaSeparatedParameters() 134 ? supportedTypes.getAutomaticallyResolvedReplacement(p.asType()) in commaSeparatedParameters() 150 return methodElement().getParameters().stream().map(Element::asType).collect(toSet()); in parameterTypes() 173 (TypeElement) generatorContext.types().asElement(param.get().asType())); in isSimpleCrossProfileCallback() 197 .filter(v -> isCrossProfileCallbackInterface(elements, v.asType())) in getCrossProfileCallbackParam()
|
/external/dagger2/javatests/dagger/internal/codegen/ |
D | KeyFactoryTest.java | 78 keyFactory.forInjectConstructorWithResolvedType(constructor.getEnclosingElement().asType()); in forInjectConstructorWithResolvedType() 79 assertThat(key).isEqualTo(Key.builder(typeElement.asType()).build()); in forInjectConstructorWithResolvedType() 89 TypeMirror stringType = elements.getTypeElement(String.class.getCanonicalName()).asType(); in forProvidesMethod() 107 TypeMirror stringType = elements.getTypeElement(String.class.getCanonicalName()).asType(); in forProvidesMethod_qualified() 116 .isEqualTo(MoreTypes.equivalence().wrap(qualifierElement.asType())); in forProvidesMethod_qualified() 138 TypeMirror type = elements.getTypeElement(String.class.getCanonicalName()).asType(); in qualifiedKeyEquivalents() 197 TypeMirror stringType = elements.getTypeElement(String.class.getCanonicalName()).asType(); in forProvidesMethod_sets() 267 TypeMirror stringType = elements.getTypeElement(String.class.getCanonicalName()).asType(); in forProducesMethod() 291 TypeMirror stringType = elements.getTypeElement(String.class.getCanonicalName()).asType(); in forProducesMethod_sets()
|
/external/skia/src/core/ |
D | SkRect.cpp | 143 static const char* set_scalar(SkString* storage, SkScalar value, SkScalarAsStringType asType) { in set_scalar() argument 145 SkAppendScalar(storage, value, asType); in set_scalar() 150 SkScalarAsStringType asType = asHex ? kHex_SkScalarAsStringType : kDec_SkScalarAsStringType; in dump() local 155 line.printf( "SkRect::MakeLTRB(%s, /* %f */\n", set_scalar(&tmp, fLeft, asType), fLeft); in dump() 156 line.appendf(" %s, /* %f */\n", set_scalar(&tmp, fTop, asType), fTop); in dump() 157 line.appendf(" %s, /* %f */\n", set_scalar(&tmp, fRight, asType), fRight); in dump() 158 line.appendf(" %s /* %f */);", set_scalar(&tmp, fBottom, asType), fBottom); in dump()
|
/external/dagger2/java/dagger/internal/codegen/binding/ |
D | BindingDeclarationFormatter.java | 62 || FORMATTABLE_ELEMENT_TYPE_KINDS.contains(bindingElement.asType().getKind()); in canFormat() 80 switch (bindingElement.asType().getKind()) { in format() 86 .map(module -> MoreTypes.asDeclared(module.asType()))); in format() 89 return stripCommonTypePrefixes(bindingElement.asType().toString()); in format()
|
D | MethodSignatureFormatter.java | 60 MoreElements.asType(method.getEnclosingElement())); in typedFormatter() 75 TypeElement type = MoreElements.asType(method.getEnclosingElement()); 76 ExecutableType executableType = MoreTypes.asExecutable(method.asType()); 79 type = MoreElements.asType(container.get().asElement());
|
D | BindingFactory.java | 127 ExecutableType constructorType = MoreTypes.asExecutable(constructorElement.asType()); in injectionBinding() 129 MoreTypes.asDeclared(constructorElement.getEnclosingElement().asType()); in injectionBinding() 169 TypeElement bindingTypeElement = MoreElements.asType(constructorElement.getEnclosingElement()); in injectionBinding() 180 DeclaredType factoryType = MoreTypes.asDeclared(factory.asType()); in assistedFactoryBinding() 265 types.asMemberOf(MoreTypes.asDeclared(contributedBy.asType()), method)); in setMethodBindingProperties() 266 if (!types.isSameType(methodType, method.asType())) { in setMethodBindingProperties() 267 builder.unresolved(create.apply(method, MoreElements.asType(method.getEnclosingElement()))); in setMethodBindingProperties() 326 .key(keyFactory.forType(componentDefinitionType.asType())) in componentBinding() 412 subcomponentCreatorMethod, asDeclared(component.asType())); in subcomponentCreatorBinding() 567 TypeElement typeElement = MoreElements.asType(declaredType.asElement()); in membersInjectionBinding() [all …]
|
/external/turbine/javatests/com/google/turbine/processing/ |
D | TurbineTypesFactoryTest.java | 100 turbineTypes.erasure(turbineElements.getTypeElement("java.util.Map").asType())), in arrayType() 115 .getWildcardType(turbineElements.getTypeElement("java.lang.String").asType(), null) in wildcardType() 123 .getWildcardType(null, turbineElements.getTypeElement("java.lang.String").asType()) in wildcardType() 137 turbineElements.getTypeElement("java.lang.String").asType(), in declaredType() 138 turbineElements.getTypeElement("java.lang.Integer").asType()), in declaredType()
|
/external/dagger2/java/dagger/internal/codegen/base/ |
D | Keys.java | 66 TypeElement element = MoreElements.asType(type.asElement()); in isValidImplicitProvisionKey() 85 return MoreTypes.asDeclared(element.asType()).getTypeArguments().isEmpty() in isValidImplicitProvisionKey() 86 || !types.isSameType(types.erasure(element.asType()), type); in isValidImplicitProvisionKey()
|
/external/dagger2/java/dagger/hilt/processor/internal/aggregateddeps/ |
D | PkgPrivateMetadata.java | 41 return TypeName.get(getTypeElement().asType()); in baseClassName() 86 if (Processors.requiresModuleInstance(elements, MoreElements.asType(element))) { in of() 91 new AutoValue_PkgPrivateMetadata(MoreElements.asType(element), installIn, annotation)); in of()
|
/external/robolectric-shadows/sandbox/src/main/java/org/robolectric/internal/bytecode/ |
D | InvokeDynamicSupport.java | 87 return new ConstantCallSite(mh.asType(type)); in bootstrapIntrinsic() 90 …private static final MethodHandle NOTHING = constant(Void.class, null).asType(methodType(void.clas… 133 mh = filterArguments(mh, 0, GET_SHADOW.asType(methodType(shadowType, site.thisType()))); in bindCallSite() 154 mh = switchPoint.guardWithTest(mh.asType(type), boundFallback); in bindWithFallback() 175 return catchException(mh, Throwable.class, EXCEPTION_HANDLER.asType(type)); in cleanStackTraces()
|