LoopTranslation

  • @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.

public abstract @interface LoopTranslation implements Annotation

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();
 }

Nested Class Summary

enum LoopTranslation.LoopStyle Enumerates the available translation options for enhanced for loops. 

Public Method Summary

LoopTranslation.LoopStyle
value()

Inherited Method Summary

Public Methods

public LoopTranslation.LoopStyle value ()