JBossClassPoolFactory32public class JBossClassPoolFactory32 extends Object implements ScopedClassPoolFactory
Fields Summary |
---|
protected File | tmpClassesDir |
Constructors Summary |
---|
public JBossClassPoolFactory32(File tmpClassesDir)
this.tmpClassesDir = tmpClassesDir;
|
Methods Summary |
---|
public javassist.scopedpool.ScopedClassPool | create(java.lang.ClassLoader cl, javassist.ClassPool src, javassist.scopedpool.ScopedClassPoolRepository repository)
try
{
File tempdir = createTempDir(cl);
return new JBossClassPool32(cl, src, repository, tempdir);
}
catch (IOException e)
{
throw new RuntimeException(e);
}
| public javassist.scopedpool.ScopedClassPool | create(javassist.ClassPool src, javassist.scopedpool.ScopedClassPoolRepository repository)
return new JBossClassPool32(src, repository);
| public java.io.File | createTempDir(java.lang.ClassLoader cl)
if (!(cl instanceof UnifiedClassLoader)) return null;
File tempdir = File.createTempFile("ucl", "", tmpClassesDir);
tempdir.delete();
tempdir.mkdir();
tempdir.deleteOnExit();
UnifiedClassLoader ucl = (UnifiedClassLoader) cl;
URL tmpURL = tempdir.toURL();
URL tmpCP = new URL(tmpURL, "?dynamic=true");
// we may be shutting down.
if (ucl.getLoaderRepository() != null) ucl.addURL(tmpCP);
return tempdir;
|
|