× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I sorted it out. Thanks everyone.

Lo


-----Original Message-----
From: Raikov, Lo [mailto:Lo.Raikov@MISYS.COM]
Sent: Tuesday, December 11, 2001 11:41 AM
To: 'java400-l@midrange.com'
Subject: RE: Dynamic program calls/run-time class names


 Thank you everyone who answered this question. It looks like it boils down
to making use of the reflection package. I'm afraid I'm not very well versed
in the way JVMs are usually implemented, so I can't help having a certain
performance worry.


Does

 Class fooClz = Class.forName("some.class.name");
     MyClass myFoo = (MyClass) fooClz.newInstance();

involve creation of a new proxy instance only, or is "some.class.name" also
instantiated? If it does, is it then shared between multiple threads in a
JVM? I guess "some.class.name" is not instantiated, but I'd like to be
absolutely sure - otherwise performance penalty of doing the above in
multiple threads could be too high.


Lo

-----Original Message-----
From: David Morris [mailto:David.Morris@plumcreek.com]
Sent: Tuesday, December 11, 2001 2:53 AM
To: java400-l@midrange.com; Lo.Raikov@MISYS.COM
Subject: RE: Dynamic program calls/run-time class names


Lo,

Since this list recently took an open source turn, why don't you have
a look at the beanutils, which are part of the Apache Jakarta project.

I have used those classes quite a bit and they do make the reflection
classes pretty easy to digest. The Commons web site is at:

http://jakarta.apache.org/commons

David Morris

>>> Lo.Raikov@MISYS.COM 12/10/01 12:28AM >>>
Thanks, I'll think about it. Although, to be quite frank, at first
glance,
it does not look particularly transparent. :-)

Lo

-----Original Message-----
From: Gary L Peskin [mailto:garyp@firstech.com]
Sent: Monday, December 10, 2001 5:49 PM
To: java400-l@midrange.com
Subject: RE: Dynamic program calls/run-time class names


Have a look at the java reflection classes in java.lang.reflect,
particularly Method and Class.

Gary
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.