[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Module.getModuleForClassLoader()

alesj do-not-reply at jboss.com
Wed Jan 21 07:47:00 EST 2009


"adrian at jboss.org" wrote : 
  | 
  |   |    public Module getModuleForClassLoader(ClassLoader cl) throws ClassNotFoundException
  |   |    {
  |   |       SecurityManager sm = System.getSecurityManager();
  |   |       if (sm != null)
  |   |          sm.checkPermission(new RuntimePermission("getClassLoader"));
  |   |       
  |   |       // Determine the module (if any) for the classloader 
  |   |       if (cl != null)
  |   |          return modulesByClassLoader.get(cl);
  |   |       // Unknown
  |   |       return null;
  |   |    }
  |   | 
  | 
  | I don't mind you adding static query methods to the Module class as long as
  | they have permissions checks.
  | 
Yeah, Kabir, this one could be made static.
I guess we don't expect it to be overridden somewhere?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203612#4203612

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203612



More information about the jboss-dev-forums mailing list