I don't think there is a direct way to do this... You will probably have to
write a wrapper class that does it for you...

public class MyCastWrapper
{
        public MyClass cast(Object o)
                throws ClassCastException
        {
                return (MyClass)o;
        }

}



Where MyClass is the class you want to cast to.  This works, but means every
time you need to cast a different Object Type you have to write one of these
wrappers.

++++++++++++++++++++++++++++++++++++++++++
Pete Freitag ([EMAIL PROTECTED])
CFDEV.COM
ColdFusion Developers Resources
http://www.cfdev.com/



-----Original Message-----
From: Michael S. Kimmett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 3:39 PM
To: CF-Talk
Subject: Re: Casting Object in CF


Thanks Pete.  But this is a CF 5.0 solution.  I need a CF 4.5 solution.

Do you know of a CF 4.5 solution?

--michael
----- Original Message -----
From: "Pete Freitag" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 2:38 PM
Subject: RE: Casting Object in CF


> use the JavaCast(type, variable) function...
>
>
http://livedocs.allaire.com/cf50docs/CFML_Reference/Functions131.jsp#1106957
>
>
> ++++++++++++++++++++++++++++++++++++++
> Pete Freitag ([EMAIL PROTECTED])
> CFDEV.COM
> ColdFusion Developers Resources
> http://www.cfdev.com/
>
> -----Original Message-----
> From: Michael S. Kimmett [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 15, 2001 2:46 PM
> To: CF-Talk
> Subject: Casting Object in CF
>
>
> Does anyone know to cast to a Java object using Coldfusion??
>
> Thanks in advance.
>
> --Michael
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to