| 705 | } |
| 706 | |
| 707 | bool idl_mapping_java::gen_interf(UTL_ScopedName *name, bool local, |
| 708 | const std::vector<AST_Interface *> &inherits, |
| 709 | const std::vector<AST_Interface *> &inherits_flat, |
| 710 | const std::vector<AST_Attribute *> &attrs, |
| 711 | const std::vector<AST_Operation *> &ops, const char *repoid) |
| 712 | { |
| 713 | JavaName jn(name); |
| 714 | JavaName jn_ops(jn, "Operations"); |
| 715 | JavaName jn_stub(jn, local ? "TAOPeer" : "Stub", true); |
| 716 | |
| 717 | string extends = jn.clazz_ + "Operations, " |
| 718 | + (inherits.size() ? "" : "org.omg.CORBA.Object"); |
| 719 | string extends_ops; |
| 720 | |
| 721 | for (size_t i = 0; i < inherits.size(); ++i) { |
| 722 | extends += type(inherits[i]); |
| 723 | extends_ops += type(inherits[i]) + "Operations"; |
| 724 | |
| 725 | if (i != inherits.size() - 1) { |
| 726 | extends += ", "; |
| 727 | extends_ops += ", "; |
| 728 | } |
| 729 | } |
| 730 | |
| 731 | string extends_stub = string("i2jrt.TAO") + |
| 732 | (local ? "Local" : "") + "Object"; |
| 733 | |
| 734 | string allRepoIds = '"' + string(repoid) + '"'; |
| 735 | string body_ops; |
| 736 | string body_stub = |
| 737 | " protected " + jn_stub.clazz_ + "(long ptr) {\n" |
| 738 | " super(ptr);\n" |
| 739 | " }\n\n"; |
| 740 | |
| 741 | for (size_t i = 0; i < attrs.size(); ++i) { |
| 742 | AST_Attribute *attr = attrs[i]; |
| 743 | |
| 744 | string signature = attr_signature_r(attr); |
| 745 | body_ops += |
| 746 | " " + signature + ";\n"; |
| 747 | body_stub += |
| 748 | " public native " + signature + ";\n\n"; |
| 749 | |
| 750 | if (!attr->readonly()) { |
| 751 | string signature_w = attr_signature_w(attr); |
| 752 | body_ops += |
| 753 | " " + signature_w + ";\n"; |
| 754 | body_stub += |
| 755 | " public native " + signature_w + ";\n\n"; |
| 756 | } |
| 757 | } |
| 758 | |
| 759 | for (size_t i = 0; i < ops.size(); ++i) { |
| 760 | string signature = op_signature(ops[i]); |
| 761 | if (is_hidden_op_in_java(ops[i])) { |
| 762 | continue; |
| 763 | } |
| 764 |
nothing calls this directly
no test coverage detected