Java Mapping for Operations on Local Types
An operation on a local interface or a local class is mapped to a Java method with the same name. The mapping of operation parameters to Java is identical to the Client-Side Mapping for these parameters, in particular, when an operation has more than one return value and out parameters, the mapped Java method returns a generated Result
object.
Unlike the Client-Side mapping, there is no mapped method with a trailing Context parameter.
For example:
Slice
module M { local interface L; // forward declared local sequence<L> LSeq; local interface L { string op(int n, string s, LocalObject any, out int m, out string t, out LSeq newLSeq); } }
is mapped to:
Java
package M; public interface L { public static class OpResult { public OpResult() { } public OpResult(String returnValue, int m, String t, L[] newLSeq) { this.returnValue = returnValue; this.m = m; this.t = t; this.newLSeq = newLSeq; } public String returnValue; public int m; public String t; public L[] newLSeq; } OpResult op(int n, String s, java.lang.Object any); }