The enhanced JavaBean support feature is able to handle methods in the JavaBean that are overloaded. The only obstacle in this area arises when a Java method is overloaded in such a way that it would have identical PL/SQL signatures. For example, the following two Java methods would have the same PL/SQL signature:
public void setFillColor(Color color){} public void setFillColor(String HTMLcolorCode){}
Both of these argument lists map to a String in PL/SQL. To differentiate between
methods returning the same signature, the enhanced JavaBean support creates
different accessor methods for each, As a naming convention, it adds an underscore
and an incremented digit to the end of the method name. Using the example above,
the method names would become: setFillColor
and setFillColor_0
.
You could then use the methods in your PL/SQL program like this:
FBean.Invoke(myBeanArea, 1, 'setFillColor', 'aqua') FBean.Invoke(myBeanArea, 1, 'setFillColor_0', "#FFFFFF")
The enhanced JavaBean support records the names that it creates for overloaded JavaBean accessor methods in the logging information. To determine what method name you will need to use for a particular overloading of a JavaBean method, you will need to access this information. The enhanced JavaBean support contains several methods that let you do this.
To determine the names assigned for overloaded JavaBean methods:
Switch on logging with FBEAN.SET_LOGGING_MODE
using LOG_INFORMATION
or LOG_ALL
mode as the logging level. For example:
FBEAN.SET_LOGGING_MODE('MyBeanArea',1,FBEAN.LOG_ALL);
The generated names and their arguments will be output to the Java Console. For more information on accessing the names of JavaBean properties (both overloaded and otherwise), see Working in Debugging Mode.
Defining Method Arguments as a Delimited String
Defining Method Arguments as a List