LoopTranslation
Stay organized with collections
Save and categorize content based on your preferences.
Annotation that specifies how an enhanced for loop should be translated by
the J2ObjC translator.
Example usage:
for (@LoopTranslation(LoopStyle.JAVA_ITERATOR) Runnable r : tasks) {
r.run();
}
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()
|
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."],[[["`@LoopTranslation` annotation controls how Java enhanced for loops are converted to Objective-C by the J2ObjC translator."],["Developers can specify the desired translation style using the `LoopTranslation.LoopStyle` enum within the annotation."],["The annotation provides options for controlling the translation of enhanced for loops, enabling customization for different use cases."],["`LoopTranslation` is specifically designed for the J2ObjC translator and aids in bridging the gap between Java and Objective-C code."]]],["The `LoopTranslation` annotation guides the J2ObjC translator on how to convert enhanced for loops. It allows specifying a `LoopStyle` for the translation, such as `JAVA_ITERATOR`. The `value()` method, which is part of this annotation, returns the chosen `LoopStyle`. Additionally, the `LoopTranslation` class has an inner enum called `LoopStyle` to specify translation options for the loops.\n"]]