Home | History | Annotate | Download | only in hidl

Lines Matching refs:method

23 #include "Method.h"
83 bool Interface::fillPingMethod(Method *method) const {
84 if (method->name() != "ping") {
88 method->fillImplementation(
114 bool Interface::fillLinkToDeathMethod(Method *method) const {
115 if (method->name() != "linkToDeath") {
119 method->fillImplementation(
158 bool Interface::fillUnlinkToDeathMethod(Method *method) const {
159 if (method->name() != "unlinkToDeath") {
163 method->fillImplementation(
206 bool Interface::fillSyspropsChangedMethod(Method *method) const {
207 if (method->name() != "notifySyspropsChanged") {
211 method->fillImplementation(
224 bool Interface::fillSetHALInstrumentationMethod(Method *method) const {
225 if (method->name() != "setHALInstrumentation") {
229 method->fillImplementation(
257 bool Interface::fillDescriptorChainMethod(Method *method) const {
258 if (method->name() != "interfaceChain") {
262 method->fillImplementation(
310 bool Interface::fillHashChainMethod(Method *method) const {
311 if (method->name() != "getHashChain") {
314 const VectorType *chainType = static_cast<const VectorType *>(&method->results()[0]->type());
317 method->fillImplementation(
345 bool Interface::fillGetDescriptorMethod(Method *method) const {
346 if (method->name() != "interfaceDescriptor") {
350 method->fillImplementation(
367 bool Interface::fillGetDebugInfoMethod(Method *method) const {
368 if (method->name() != "getDebugInfo") {
379 method->fillImplementation(
405 { { IMPL_INTERFACE, [method](auto &out) {
406 const Type &refInfo = method->results().front()->type();
419 bool Interface::fillDebugMethod(Method *method) const {
420 if (method->name() != "debug") {
424 method->fillImplementation(
436 /* unused, as the debug method is hidden from Java */
443 static std::map<std::string, Method *> gAllReservedMethods;
445 bool Interface::addMethod(Method *method) {
447 if (!gAllReservedMethods.emplace(method->name(), method).second) {
448 std::cerr << "ERROR: hidl-gen encountered duplicated reserved methodmethod->name()
456 CHECK(!method->isHidlReserved());
457 mUserMethods.push_back(method);
469 for (const auto* method : methods()) {
470 const auto& references = method->getReferences();
479 for (const auto* method : methods()) {
480 const auto& retMethod = method->getConstantExpressions();
496 for (const auto* method : methods()) {
497 const auto& references = method->getStrongReferences();
510 for (Method* method : mUserMethods) {
518 method->setSerialId(serial);
553 // No need to check super method uniqueness
554 registeredMethodNames[tuple.method()->name()] = tuple.interface();
557 for (const Method* method : mUserMethods) {
558 auto registered = registeredMethodNames.find(method->name());
565 std::cerr << "ERROR: Redefinition of method '" << method->name() << "'";
568 std::cerr << "ERROR: Redefinition of reserved method '" << method->name() << "'";
571 std::cerr << "ERROR: Redefinition of method '" << method->name()
574 std::cerr << " at " << method->location() << std::endl;
578 registeredMethodNames[method->name()] = this;
585 for (const Method* method : methods()) {
586 for (const Annotation* annotation : method->annotations()) {
594 << "' for method: " << method->name() << ". An annotation should be one of: "
604 std::map<int32_t, Method *> reservedMethodsById;
606 Method *method = pair.second->copySignature();
607 bool fillSuccess = fillPingMethod(method)
608 || fillDescriptorChainMethod(method)
609 || fillGetDescriptorMethod(method)
610 || fillHashChainMethod(method)
611 || fillSyspropsChangedMethod(method)
612 || fillLinkToDeathMethod(method)
613 || fillUnlinkToDeathMethod(method)
614 || fillSetHALInstrumentationMethod(method)
615 || fillGetDebugInfoMethod(method)
616 || fillDebugMethod(method);
619 std::cerr << "ERROR: hidl-gen does not recognize a reserved method " << method->name()
623 if (!reservedMethodsById.emplace(method->getSerialId(), method).second) {
624 std::cerr << "ERROR: hidl-gen uses duplicated serial id for " << method->name()
625 << " and " << reservedMethodsById[method->getSerialId()]->name()
626 << ", serialId = " << method->getSerialId() << std::endl;
672 const std::vector<Method *> &Interface::userDefinedMethods() const {
676 const std::vector<Method *> &Interface::hidlReservedMethods() const {
680 std::vector<Method *> Interface::methods() const {
681 std::vector<Method *> v(mUserMethods);
691 for (Method *userMethod : iface->userDefinedMethods()) {
695 for (Method *reservedMethod : hidlReservedMethods()) {
903 for (const auto &method : methods()) {
904 if (method->isHidlReserved()) {
910 out << "name: \"" << method->name() << "\"\n";
912 for (const auto &result : method->results()) {
920 for (const auto &arg : method->args()) {
928 for (const auto &annotation : method->annotations()) {
963 for (auto const &method : methods()) {
964 if (method->isOneway()) {
983 for (const auto* method : methods()) {
984 if (!method->deepIsJavaCompatible(visited)) {