MACROMEDIA COLFUSION MX 7-CFML Reference page 703

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

JavaCast
Description
Converts the data type of a ColdFusion variable to pass as an argument to an overloaded method
of a Java object. Use only for scalar and string arguments.
Returns
The variable, as type type.
Category
String functions
Function syntax
JavaCast(type, variable)
See also
,
CreateObject
Parameters
Parameter
type
variable
Usage
Use after creating a Java object with the
method takes more than one overloaded argument, you must call
only when a method is overloaded (because its arguments can take more than one data
JavaCast
type, not because the method can take a variable number of arguments).
cannot be used to cast between complex objects, nor to cast to a super-class.
JavaCast
Use the result of this function only on calls to Java objects, as shown in the following example:
<cfscript>
x = CreateObject("java", "test.Hello");
x.init();
ret = x.sayHello(JavaCast("null", ""));
</cfscript>
Warning: Do not assign the results of
results will occur.
cfobject
Description
Data type to which to convert variable:
• boolean
• int
• long
• float
• double
• string
• null
A ColdFusion variable that holds a scalar or string type. Must be
JavaCast("null","")
tag, before calling one of its methods. If the
cfobject
to a ColdFusion variable. Unexpected
if type is null.
""
for each one. Use
JavaCast
JavaCast
703

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents