MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 752

Developing coldfusion mx applications
Table of Contents

Advertisement

CFML
XML document object
ColdFusion component Not applicable.
The following table lists how ColdFusion converts data returned by Java methods to ColdFusion
data types:
Java
boolean/Boolean
byte/Byte
char/Char
short/Short
int/Integer
long/Long
float/Float
double/Double
String
java.util.Date
java.util.List
byte[]
char[]
boolean[]
String[]
java.util.Vector
java.util.Map
Resolving ambiguous data types with the JavaCast function
You can overload Java methods so a class can have several identically named methods. At runtime,
the JVM resolves the specific method to use based on the parameters passed in the call and their
types.
In the section
"The Employee class" on page
for the SetJobGrade method. One method takes a string variable, the other an integer. If you
write code such as the following, which implementation to use is ambiguous:
<cfset emp.SetJobGrade("1")>
The "1" could be interpreted as a string or as a number, so there is no way to know which method
implementation to use. When ColdFusion encounters such an ambiguity, it throws a user
exception.
752
Chapter 33: Integrating J2EE and Java Elements in CFML Applications
Java
Not supported.
CFML
Boolean
String
String
Integer
Integer
Integer
Real Number
Real Number
String
Date-time
Comma-delimited list
Array
Array
Array
Array
Array
Structure
748, the Employee class has two implementations

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents