Subj : Java factory question To : netscape.public.mozilla.jseng From : Mike Owens Date : Tue Jun 14 2005 10:44 am --=======AVGMAIL-42AF09650E77======= Content-Type: multipart/alternative; boundary=------------010003060904020506050104 --------------010003060904020506050104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have an application I am embedding Rhino in. I have a method that returns a requested class and I would like to enable Javascript to be able to use the reqular class instantiation syntax like so: var obj = new Factory("SomeClass"); In the Java code the Factory references a hash table that I have filled with Class instances via Class.forName. Is there a way to do this using Rhino? --------------010003060904020506050104 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have an application I am embedding Rhino in. I have a method that returns a requested class and I would like to enable Javascript to be able to use the reqular class instantiation syntax like so:

var obj = new Factory("SomeClass");

In the Java code the Factory references a hash table that I have filled with Class instances via Class.forName.

Is there a way to do this using Rhino?
--------------010003060904020506050104-- --=======AVGMAIL-42AF09650E77======= Content-Type: text/plain; x-avg=cert; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Description: "AVG certification" No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.7.1 - Release Date: 6/13/2005 --=======AVGMAIL-42AF09650E77=======-- .