aspose file tools*
The moose likes Java in General and the fly likes Factory + ClassLoader Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Factory + ClassLoader Question" Watch "Factory + ClassLoader Question" New topic
Author

Factory + ClassLoader Question

Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Hi guys -
Given: A set of class objects returned by fctory methods, e.g. Factory.getInstance().
Requirement: Dynamic loading of these classes.
Statement: In all cases, this requires a custom ClassLoader.
Is the 'Statement' correct?
Regards, Guy
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm not sure what you're saying. Given a "set of class objects"? What are these, and how do they relate to the classes you want to load? Are these instances of the class Class? Instances of some other class, like maybe the one you want to load? In either of the above cases, it would seem you need to load the desired class before you can have any instances of that class, or of Class objects which represent your desired class. So I'm probably missing something here. Perhaps you could show a bit more of an example of what you're talking about?


"I'm not back." - Bill Harding, Twister
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
If you are trying to implement dynamic re-loading of classes, then you will need a custom ClassLoader.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Ah, yes. Agreed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Factory + ClassLoader Question