Method signatures

Since the bindings map well into Java language constructs, Java method signatures correspond very closely to those in the specification. Adapted from the Babel regression tests, the following is an example specification of a package called ExceptionTest that has a class named Fib with a getFib method declared as$:$


int getFib(in int n, in int max_depth, in int max_value, in int depth)
  throws NegativeValueException, FibException;

The corresponding client-side, or stub, signature is$:$


 public native int getFib(
    int n,
    int max_depth,
    int max_value,
    int depth) throws
    ExceptionTest.FibException,
    ExceptionTest.NegativeValueException;

Note the one-to-one mapping in arguments and native exception types.

The corresponding implementation-side signature is$:$


  public int getFib_Impl (
    /*in*/ int n,
    /*in*/ int max_depth,
    /*in*/ int max_value,
    /*in*/ int depth )
    throws ExceptionTest.FibException,
    ExceptionTest.NegativeValueException,
    sidl.RuntimeException.Wrapper

Once again, there is a one-to-one mapping of arguments and the two specified exceptions. However, the implementation side includes the (implicit) sidl.RuntimeException's Wrapper class (since RuntimeException is an interface. For more on the reasoning behind this, refer to Subsection 10.2.3.



Subsections



babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov