Casts data from Magic xpa to Java. Use this function whenever you need to implicitly cast a value to a Java type.
A possible use for this function is to select an overloaded method.
Another use for the JavaCast() function is to cast a Java variable of type Object to a specific object type, so you will be able to access its methods.
|
Example:
|
Assume the following scenario: you have two Java methods with the same name, one receives a parameter of type Integer and the other of type Double. In this case, it is not legal to send a Magic xpa numeric value to this method, since Magic xpa cannot know which method to use.
So the proper way is to implicitly specify the Java type to use.
For example: JavaCast(5, Java.java.lang.Integer)
|