Home
last modified time | relevance | path

Searched refs:GetType (Results 1 – 22 of 22) sorted by relevance

/system/tools/aidl/
Dgenerate_cpp_analyzer.cpp53 out.Write("%s %s;\n", CppNameOf(a->GetType(), typenames).c_str(), BuildVarName(*a).c_str()); in GenerateAnalyzerTransaction()
59 if (method.GetType().GetName() != "void") { in GenerateAnalyzerTransaction()
60 out.Write("%s %s;\n", CppNameOf(method.GetType(), typenames).c_str(), kReturnVarName); in GenerateAnalyzerTransaction()
65 if (method.GetType().GetName() != "void") { in GenerateAnalyzerTransaction()
67 ParcelReadMethodOf(method.GetType(), typenames).c_str(), in GenerateAnalyzerTransaction()
68 ParcelReadCastOf(method.GetType(), typenames, string("&") + kReturnVarName).c_str()); in GenerateAnalyzerTransaction()
83 ParcelReadMethodOf(a->GetType(), typenames).c_str(), in GenerateAnalyzerTransaction()
84 ParcelReadCastOf(a->GetType(), typenames, "&" + BuildVarName(*a)).c_str()); in GenerateAnalyzerTransaction()
112 if (method.GetType().GetName() != "void") { in GenerateAnalyzerTransaction()
Dgenerate_cpp.cpp104 const bool non_copyable = IsNonCopyableType(a->GetType(), typenames); in GenerateArgList()
108 literal = CppNameOf(a->GetType(), typenames); in GenerateArgList()
113 const auto defined_type = typenames.TryGetDefinedType(a->GetType().GetName()); in GenerateArgList()
116 const bool is_primitive = AidlTypenames::IsPrimitiveTypename(a->GetType().GetName()); in GenerateArgList()
120 if (!(is_primitive || is_enum || non_copyable) || a->GetType().IsArray()) { in GenerateArgList()
142 if (method.GetType().GetName() != "void") { in GenerateArgList()
145 literal = CppNameOf(method.GetType(), typenames) + "*"; in GenerateArgList()
216 ParcelWriteMethodOf(a->GetType(), typenames).c_str(), in GenerateClientTransaction()
217 ParcelWriteCastOf(a->GetType(), typenames, var_name).c_str()); in GenerateClientTransaction()
219 } else if (a->IsOut() && a->GetType().IsDynamicArray()) { in GenerateClientTransaction()
[all …]
Dgenerate_java.cpp150 if (CanDescribeContents(f->GetType(), types, &describers)) { in GenerateParcelableDescribeContents()
172 if (CanDescribeContents(f->GetType(), types, &describers)) { in GenerateParcelableDescribeContents()
200 .type = field->GetType(), in GenerateToString()
223 .type = field->GetType(), in GenerateToString()
334 if (variable->GetType().GetName() == "ParcelableHolder" || parcel->IsJavaOnlyImmutable()) { in GenerateParcelableClass()
337 out << JavaSignatureOf(variable->GetType()) << " " << variable->GetName(); in GenerateParcelableClass()
340 } else if (variable->GetType().GetName() == "ParcelableHolder") { in GenerateParcelableClass()
342 out << " = new " << JavaSignatureOf(variable->GetType()) << "("; in GenerateParcelableClass()
364 out << "private " << JavaSignatureOf(variable->GetType()) << " " << variable->GetName(); in GenerateParcelableClass()
370 << JavaSignatureOf(variable->GetType()) << " " << variable->GetName() << ") {\n" in GenerateParcelableClass()
[all …]
Dgenerate_rust.cpp106 auto arg_type = RustNameOf(arg.GetType(), typenames, arg_mode, lifetime); in BuildArg()
140 auto method_type = RustNameOf(method.GetType(), typenames, StorageMode::VALUE, lifetime); in BuildMethod()
203 } else if (arg->GetType().IsDynamicArray()) { in GenerateClientMethodHelpers()
205 if (arg->GetType().IsNullable()) { in GenerateClientMethodHelpers()
218 auto return_type = RustNameOf(method.GetType(), typenames, StorageMode::VALUE, Lifetime::NONE); in GenerateClientMethodHelpers()
253 if (method.GetType().GetName() != "void") { in GenerateClientMethodHelpers()
255 RustNameOf(method.GetType(), typenames, StorageMode::VALUE, Lifetime::NONE); in GenerateClientMethodHelpers()
411 if (interface.EnforceExpression() || method.GetType().EnforceExpression()) { in GenerateServerTransaction()
425 auto arg_type = RustNameOf(arg->GetType(), typenames, arg_mode, Lifetime::NONE); in GenerateServerTransaction()
430 if (!arg->IsIn() && arg->GetType().IsDynamicArray()) { in GenerateServerTransaction()
[all …]
Ddiagnostics.cpp110 void Visit(const AidlMethod& a) override { fun(a.GetType()); } in Check()
183 if (v.GetType().IsNullable()) return; in CheckExplicitDefault()
184 if (v.GetType().IsArray()) return; in CheckExplicitDefault()
185 const auto defined_type = v.GetType().GetDefinedType(); in CheckExplicitDefault()
216 for (const auto& w : m.GetType().SuppressWarnings()) { in Suppressed()
229 if (a->GetType().IsArray() && a->IsOut()) { in Visit()
232 << "'. Instead prefer APIs like '" << a->GetType().Signature() << " " << m.GetName() in Visit()
252 if (a.GetType().IsArray()) return; in Visit()
253 if (a.IsOut() && a.GetType().IsNullable()) { in Visit()
320 if (m->GetType().IsPermissionAnnotated()) { in Visit()
Dgenerate_java_binder.cpp440 const AidlTypeSpecifier& type = constant->GetType(); in GenerateConstantDeclarations()
453 decl->returnType = JavaSignatureOf(method.GetType()); in GenerateInterfaceMethod()
462 auto var = std::make_shared<Variable>(JavaSignatureOf(arg->GetType()), arg->GetName()); in GenerateInterfaceMethod()
463 var->annotations = JavaAnnotationsFor(arg->GetType()); in GenerateInterfaceMethod()
538 } else if (auto methodPermExpr = method.GetType().EnforceExpression(); methodPermExpr) { in GeneratePermissionMethod()
563 std::shared_ptr<Variable> v = stubArgs.Get(arg->GetType()); in GenerateStubCode()
573 .type = arg->GetType(), in GenerateStubCode()
581 string java_type = InstantiableJavaSignatureOf(arg->GetType()); in GenerateStubCode()
583 if (arg->GetType().IsDynamicArray()) { in GenerateStubCode()
592 } else if (arg->GetType().IsFixedSizeArray()) { in GenerateStubCode()
[all …]
Dgenerate_aidl_mappings.cpp42 signature << java::JavaSignatureOf(arg->GetType()) << ","; in generate_mappings()
45 signature << java::JavaSignatureOf(method->GetType()); in generate_mappings()
Daidl_checkapi.cpp99 if (kIgnoreAnnotations.find(annotation->GetType()) != kIgnoreAnnotations.end()) { in get_strict_annotations()
156 compatible &= are_compatible_types(old_c->GetType(), new_c->GetType()); in are_compatible_constants()
204 compatible &= are_compatible_types(old_m->GetType(), new_m->GetType()); in are_compatible_interfaces()
213 compatible &= are_compatible_types(old_a.GetType(), new_a.GetType()); in are_compatible_interfaces()
272 compatible &= are_compatible_types(old_field->GetType(), new_field->GetType()); in are_compatible_parcelables()
280 auto enum_decl = new_types.GetEnumDeclaration(new_field->GetType()); in are_compatible_parcelables()
314 if (const auto& enum_decl = new_types.GetEnumDeclaration(new_field->GetType()); in are_compatible_parcelables()
Daidl_dumpapi.cpp121 if (c.GetType() == AidlConstantValue::Type::ARRAY) { in DumpConstantValue()
191 Visit(v.GetType()); in Visit()
194 DumpConstantValue(v.GetType(), *v.GetDefaultValue()); in Visit()
207 Visit(c.GetType()); in Visit()
209 DumpConstantValue(c.GetType(), c.GetValue()); in Visit()
Daidl_to_rust.cpp285 const auto typeName = arg.GetType().GetName(); in ArgumentStorageMode()
290 if (typeName == "String" || arg.GetType().IsDynamicArray() || typenames.IsList(arg.GetType())) { in ArgumentStorageMode()
292 } else if (!(isPrimitive || isEnum) || arg.GetType().IsFixedSizeArray()) { in ArgumentStorageMode()
303 if (arg.GetType().IsNullable()) { in ArgumentReferenceMode()
315 if (arg.GetType().IsNullable()) { in ArgumentReferenceMode()
Daidl_language.cpp412 if (a->GetType() == type) { in GetAnnotation()
573 declared.emplace(annotation->GetType(), annotation->GetLocation()); in CheckValid()
838 if (dim->GetType() > AidlConstantValue::Type::INT32) { in CheckValid()
902 if (GetType().IsNullable()) { in HasUsefulDefaultValue()
947 return default_value_->ValueString(GetType(), decorator); in ValueString()
955 traverse(GetType()); in TraverseChildren()
1017 if (!GetType().CheckValid(typenames)) { in CheckValid()
1021 const auto& aspect = typenames.GetArgumentAspect(GetType()); in CheckValid()
1115 arg_signatures.emplace_back(arg->GetType().Signature()); in Signature()
1125 string ret = (IsOneway() ? "oneway " : "") + GetType().ToString() + " " + GetName() + "(" + in ToString()
[all …]
Dgenerate_ndk.cpp422 const AidlTypeSpecifier& type = constant->GetType(); in GenerateConstantDeclarations()
447 AIDL_FATAL_IF(value.GetType() == AidlConstantValue::Type::UNARY || in GenerateConstantDefinitions()
448 value.GetType() == AidlConstantValue::Type::BINARY, in GenerateConstantDefinitions()
450 if (value.GetType() == AidlConstantValue::Type::STRING) { in GenerateConstantDefinitions()
527 WriteToParcelFor({out, types, arg->GetType(), "_aidl_in.get()", prefix + var_name}); in GenerateClientMethodDefinition()
530 } else if (arg->IsOut() && arg->GetType().IsDynamicArray()) { in GenerateClientMethodDefinition()
575 if (method.GetType().GetName() != "void") { in GenerateClientMethodDefinition()
577 ReadFromParcelFor({out, types, method.GetType(), "_aidl_out.get()", "_aidl_return"}); in GenerateClientMethodDefinition()
588 ReadFromParcelFor({out, types, arg->GetType(), "_aidl_out.get()", cpp::BuildVarName(*arg)}); in GenerateClientMethodDefinition()
614 if (defined_type.EnforceExpression() || method.GetType().EnforceExpression()) { in GenerateServerCaseDefinition()
[all …]
Daidl_to_cpp_common.cpp219 if (method.GetType().GetName() != "void") { in GenLogAfterExecute()
527 const auto& default_value = name_of(first_field->GetType(), typenames) + "(" + in PrivateFields()
537 out << name_of(f->GetType(), typenames) << " " << fn; in PrivateFields()
539 int alignment = AlignmentOf(f->GetType(), typenames); in PrivateFields()
554 field_types.push_back(name_of(f->GetType(), typenames)); in PrivateFields()
573 field_types.push_back(name_of(f->GetType(), typenames)); in PublicFields()
609 const auto& default_value = name_of(first_field->GetType(), typenames) + "(" + in PublicFields()
686 const auto& type = variable->GetType(); in ReadFromParcel()
728 ctx.write_func(out, "get<" + variable->GetName() + ">()", variable->GetType()); in WriteToParcel()
Dpreprocess.cpp122 Visit(c.GetType()); in Visit()
124 DumpConstantValue(c.GetType(), c.GetValue()); in Visit()
Daidl.cpp333 Check(m.GetType(), AidlAnnotation::CONTEXT_TYPE_SPECIFIER | AidlAnnotation::CONTEXT_METHOD); in ValidateAnnotationContext()
335 Check(arg->GetType(), AidlAnnotation::CONTEXT_TYPE_SPECIFIER); in ValidateAnnotationContext()
339 Check(m.GetType(), AidlAnnotation::CONTEXT_TYPE_SPECIFIER | AidlAnnotation::CONTEXT_CONST); in ValidateAnnotationContext()
342 Check(m.GetType(), AidlAnnotation::CONTEXT_TYPE_SPECIFIER | AidlAnnotation::CONTEXT_FIELD); in ValidateAnnotationContext()
671 check_untyped_container(method->GetType(), method.get()); in load_and_validate_aidl()
673 check_untyped_container(arg->GetType(), method.get()); in load_and_validate_aidl()
678 check_untyped_container(field->GetType(), field.get()); in load_and_validate_aidl()
Daidl_to_ndk.cpp245 std::string type = NdkNameOf(types, a->GetType(), mode); in NdkArgList()
250 if (method.GetType().GetName() != "void") { in NdkArgList()
251 std::string type = NdkNameOf(types, method.GetType(), StorageMode::OUT_ARGUMENT); in NdkArgList()
Daidl_language.h279 const Type& GetType() const { return schema_.type; }
525 const AidlTypeSpecifier& GetType() const { return *type_; }
682 Type GetType() const { return final_type_; }
826 const AidlTypeSpecifier& GetType() const { return *type_; }
845 return value_->ValueString(GetType(), decorator);
849 traverse(GetType());
875 const AidlTypeSpecifier& GetType() const { return *type_; }
912 traverse(GetType());
Dparser.cpp156 const auto& ref = f->GetType(); in CheckNoRecursiveDefinition()
Daidl_const_expressions.cpp1020 << ToString(right_val_->GetType()) << " and " << ToString(left_val_->GetType()) in evaluate()
Daidl_unittest.cpp394 EXPECT_FALSE(interface->GetMethods()[0]->GetType().IsNullable()); in TEST_P()
404 EXPECT_TRUE(interface->GetMethods()[0]->GetType().IsNullable()); in TEST_P()
414 EXPECT_FALSE(interface->GetMethods()[0]->GetType().IsUtf8InCpp()); in TEST_P()
424 EXPECT_TRUE(interface->GetMethods()[0]->GetType().IsUtf8InCpp()); in TEST_P()
754 const AidlTypeSpecifier& ret_type = method->GetType(); in TEST_P()
1395 EXPECT_EQ(num->GetType(), AidlConstantValue::Type::INT8); in TEST_F()
1857 type = &v.GetType(); in Visit()
1862 type = &m.GetType(); in Visit()
/system/apex/apexd/
Dapex_database.cpp69 BlockDeviceType GetType() const { in GetType() function in android::apex::__anon1df56a490111::BlockDevice
142 if (dev.GetType() != LoopDevice) { in PopulateLoopInfo()
205 switch (block.GetType()) { in ResolveMountInfo()
/system/apex/tools/
Ddeapexer.py264 if GetType(args.apex) == ApexType.COMPRESSED:
290 if GetType(args.apex) == ApexType.COMPRESSED:
312 def GetType(apex_path): function
328 res = GetType(args.apex)