On the Method Mapping page, specify the methods of the Java class you are
mapping to. This page appears only if the class is remote (it
implements the java.rmi.Remote interface).
To add a method to the list, select Add. The Method
Definition Window appears prompting you for details about the method.
Specify the following information:
- Java method
- The Java method name.
- Smalltalk method
- The Smalltalk method name.
- Return Type
- The Java type returned by the method. You can enter the type
directly in the field or select from a drop-down list showing the available
Java types from the repository.
- Input Parameters
- The types of the parameters passed to the method. To add parameters
to the list, follow these steps:
- Select Add. A window appears prompting you for the type
of the parameter.
- Enter the parameter name or select
or
to choose from a list of available Java types imported from the Java
Repository of this Smalltalk image or from the VisualAge for Java servlet
interface.
- Select OK to add the parameter to the list
To remove a parameter from the list, select it and then select
Remove.
- Note:
- The number of parameters defined for the Java method must equal the number of
parameters defined by the corresponding Smalltalk method. If the two
methods do not match, an error message appears when you attempt to add the
method to the class mapping.
- Exceptions
- The exceptions thrown by the method. To add exceptions to the list,
follow these steps:
- Select Add. A window appears prompting you for the Java
exception that this method can throw.
- Enter the exception name or select
or
to choose from a list of available exceptions imported from the Java
Repository of this Smalltalk image or from the VisualAge for Java servlet
interface .
If the exception you want is not listed, this means no Smalltalk mapping
exists for it. You may enter the exception name and when you have
finished mapping the Java class, you will be prompted to map the exception
using the RMI Exception Wizard. See Mapping a Smalltalk class to a Java exception for more information on creating mapping exceptions.
- When you have finished adding exceptions, select OK.
To remove an exception from the list, select it and then select
Remove.
When you have finished editing the method, you can select New to
create a new method and repeat the process for additional methods or select
Next to continue to the next page.
If you want to change a method you have already added, follow these
steps:
- Select the method on the Method mapping page. The details of the
selected method are shown.
- Make your changes.
- Select another method to edit, select New to create a new
method, or select Next to continue to the next page.
To remove a method to the list, select the method and select
Remove.
If you are finished specifying methods for the class, select
Next to continue to the next page.