ObjectiveCName
Stay organized with collections
Save and categorize content based on your preferences.
Annotation that specifies what the Objective-C class, protocol, method,
constructor or package declaration should be when translated.
For packages add the annotation to the package declaration in a package-info.java file to
specify the desired package prefix. Alternatively, package prefixes may be specified using the
--prefix
or --prefixes
flags when invoking j2objc.
For classes specify the desired Objective-C class name for the translated type.
For methods specify the desired Objective-C selector for the translated method:
@ObjectiveCName("setDateWithYear:month:day:")
public void setDate(int year, int month, int day);
Public Method Summary
String
|
value()
The Objective-C name to use for this element.
|
Inherited Method Summary
From interface
java.lang.annotation.Annotation
abstract
Class<? extends Annotation>
|
annotationType()
|
abstract
boolean
|
equals(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
String
|
toString()
|
Public Methods
public
String
value
()
The Objective-C name to use for this element.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["`@ObjectiveCName` annotation is used to specify the Objective-C name for translated Java packages, classes, methods, constructors, or package declarations."],["For packages, the annotation can be added to `package-info.java` or the desired prefix can be specified using `--prefix` or `--prefixes` flags with j2objc."],["When used with methods, it allows developers to define the Objective-C selector for the translated method."],["This annotation provides a `value()` method that returns the specified Objective-C name for the annotated element."]]],[]]