يمكن تغيير أسماء الطرق باستخدام العلامة --mapping، التي تأخذ ملفًا بالخصائص مع
التخطيطات المراد استخدامها. يتم تحديد كل عملية ربط لكل طريقة من خلال التوقيع الكامل لطريقة Java للمفتاح،
قيمة محدد الهدف-ج. على سبيل المثال، السطر المراد تعيين Object.equals() إلى NSObject.isEqual:
:
التعريف الأيمن هو توقيع الطريقة الكاملة، كما هو محدد من خلال جهاز Java الافتراضي.
المواصفات: اليمين
يدويًا يتكون من محدد iOS (أي ما ستمرره إلى @selector()).
يجب أن تحتوي الطريقة وربطها على نفس عدد المعلمات.
مثال آخر، هذا السطر مكافئ للمثال الوارد في القسم السابق:
تاريخ التعديل الأخير: 2024-08-28 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-08-28 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `@ObjectiveCName` annotation allows developers to rename Java methods and their overrides within the translated Objective-C code."],["Method renaming can also be accomplished using mapping files specified with the `--mapping` flag during translation, providing an alternative to annotations."],["Mapping files utilize a key-value structure where the key is the Java method signature and the value is the desired Objective-C selector, ensuring both have the same parameter count."]]],["The `@ObjectiveCName` annotation renames Java methods in their Objective-C translation. The annotation's string value defines the desired Objective-C selector, excluding parameter types and names. Alternatively, the `--mapping` flag utilizes a properties file to map Java method signatures to Objective-C selectors. Each mapping specifies the full Java method signature on the left and the Objective-C selector on the right. Multiple mapping files can be provided. Mapped methods must have the same number of parameters.\n"]]