/** Create a new <code>ClassRealm</code>. * * @param id The realm id. * * @return The newly created realm. * * @throws DuplicateRealmException If this class-world already * contains a realm with the specified id. */ public ClassRealm newRealm(String id) throws DuplicateRealmException { if ( this.realms.containsKey( id ) ) { throw new DuplicateRealmException( this, id ); } DefaultClassRealm realm = new DefaultClassRealm( this, id ); this.realms.put( id, realm ); return realm; }
public org.codehaus.plexus.classworlds.realm.ClassRealm newRealm( String id ) throws org.codehaus.plexus.classworlds.realm.DuplicateRealmException { try { return ClassRealmReverseAdapter.getInstance( world.newRealm( id ) ); } catch ( DuplicateRealmException e ) { throw new org.codehaus.plexus.classworlds.realm.DuplicateRealmException( this, e.getId() ); } }
public Object run() { try { // Try to create a new ClassWorld object ClassPathManager.this.classWorld = new ClassWorld(); // Create a core realm (for internal and classpath://* plugins) try { ClassPathManager.this.classWorld.newRealm("core", getClass().getClassLoader()); } catch (DuplicateRealmException e) { e.printStackTrace(); } // Signal that we are okay. ClassPathManager.this.initializedProperly = true; } catch (SecurityException e) { ClassPathManager.this.logger.warning("Proper initialization failed due to security restrictions. Only classpath://xxx URIs will work. Sorry."); } return null; } });
public ClassRealm newRealm( String id, ClassLoader classLoader ) throws DuplicateRealmException { if ( realms.containsKey( id ) ) { throw new DuplicateRealmException( this, id ); } ClassRealm realm = null; if ( classLoader != null ) { realm = new DefaultClassRealm( this, id, classLoader ); realms.put( id, realm ); } else { realm = new DefaultClassRealm( this, id ); } realms.put( id, realm ); return realm; }
public org.codehaus.plexus.classworlds.realm.ClassRealm newRealm( String id ) throws org.codehaus.plexus.classworlds.realm.DuplicateRealmException { try { return ClassRealmReverseAdapter.getInstance( world.newRealm( id ) ); } catch ( DuplicateRealmException e ) { throw new org.codehaus.plexus.classworlds.realm.DuplicateRealmException( this, e.getId() ); } }
public ClassRealm newRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public org.codehaus.plexus.classworlds.realm.ClassRealm newRealm( String id, ClassLoader classLoader ) throws org.codehaus.plexus.classworlds.realm.DuplicateRealmException { try { return ClassRealmReverseAdapter.getInstance( world.newRealm( id, classLoader ) ); } catch ( DuplicateRealmException e ) { throw new org.codehaus.plexus.classworlds.realm.DuplicateRealmException( this, e.getId() ); } }
public ClassRealm newRealm( String id, ClassLoader classLoader ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id, classLoader ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public org.codehaus.plexus.classworlds.realm.ClassRealm newRealm( String id, ClassLoader classLoader ) throws org.codehaus.plexus.classworlds.realm.DuplicateRealmException { try { return ClassRealmReverseAdapter.getInstance( world.newRealm( id, classLoader ) ); } catch ( DuplicateRealmException e ) { throw new org.codehaus.plexus.classworlds.realm.DuplicateRealmException( this, e.getId() ); } }
public ClassRealm newRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public org.codehaus.plexus.classworlds.realm.ClassRealm createChildRealm( String id ) throws org.codehaus.plexus.classworlds.realm.DuplicateRealmException { try { return getInstance( realm.createChildRealm( id ) ); } catch ( DuplicateRealmException e ) { throw new org.codehaus.plexus.classworlds.realm.DuplicateRealmException( getWorld(), e.getId() ); } }
public ClassRealm newRealm( String id, ClassLoader classLoader ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( world.newRealm( id, classLoader ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( this, e.getId() ); } }
public org.codehaus.plexus.classworlds.realm.ClassRealm createChildRealm( String id ) throws org.codehaus.plexus.classworlds.realm.DuplicateRealmException { try { return getInstance( realm.createChildRealm( id ) ); } catch ( DuplicateRealmException e ) { throw new org.codehaus.plexus.classworlds.realm.DuplicateRealmException( getWorld(), e.getId() ); } }
public ClassRealm createChildRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( realm.createChildRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( getWorld(), e.getId() ); } }
public ClassRealm createChildRealm( String id ) throws DuplicateRealmException { try { return ClassRealmAdapter.getInstance( realm.createChildRealm( id ) ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( getWorld(), e.getId() ); } }
public void configureAdapter( InputStream is ) throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException, NoSuchRealmException { try { config.configure( is ); } catch ( org.codehaus.plexus.classworlds.launcher.ConfigurationException e ) { throw new ConfigurationException( e.getMessage() ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } catch ( org.codehaus.plexus.classworlds.realm.NoSuchRealmException e ) { throw new NoSuchRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } }
public void configureAdapter( InputStream is ) throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException, NoSuchRealmException { try { config.configure( is ); } catch ( org.codehaus.plexus.classworlds.launcher.ConfigurationException e ) { throw new ConfigurationException( e.getMessage() ); } catch ( org.codehaus.plexus.classworlds.realm.DuplicateRealmException e ) { throw new DuplicateRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } catch ( org.codehaus.plexus.classworlds.realm.NoSuchRealmException e ) { throw new NoSuchRealmException( ClassWorldAdapter.getInstance( e.getWorld() ), e.getId() ); } }