[jboss-dev-forums] [JBoss AS7 Development] - Re: Lazy modules resolving / linking
Ales Justin
do-not-reply at jboss.com
Sun Sep 26 11:00:15 EDT 2010
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Re: Lazy modules resolving / linking"
To view the discussion, visit: http://community.jboss.org/message/563687#563687
--------------------------------------------------------------
Adding and usgin something like this helps:
public final class ModuleLocalLoader extends ClassLoaderLocalLoader {
private final Module module;
public ModuleLocalLoader(Module module) {
super(check(module));
this.module = module;
}
private static ClassLoader check(Module module) {
if (module == null)
throw new IllegalArgumentException("Null module");
return module.getClassLoader();
}
public Class<?> loadClassLocal(final String name, final boolean resolve) {
return module.loadModuleClass(name, false, resolve);
}
}
It's public, but it exposes only read only stuff.
Wdyt?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563687#563687]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100926/81a40cb0/attachment.html
More information about the jboss-dev-forums
mailing list