Annotation Type ObjectiveCAdapterMethod


@Documented @Target(METHOD) @Retention(CLASS) public @interface ObjectiveCAdapterMethod
Annotation applicable to methods that generates a peer "adapter" method in the transpiled class or interface. Adapter methods can provide one or more "adaptations" to the generated method, which change the types and behavior of the annotated ("adapted") method.

Adapter methods are intended to reduce friction between native and J2ObjC interfaces, and improve type information and safety. For example, using the EXCEPTIONS_AS_ERRORS adaptation allows Java methods that throw exceptions to be safely called from Objective-C and Swift without needing to catch exceptions in Objective-C (exceptions cannot be caught in Swift).