From 4165b027071621398386956bd388bb0ebf9f4a4a Mon Sep 17 00:00:00 2001
From: Sylwester Lachiewicz Autonomous sub-portion of a This class most closed maps to the ClassWorld.ClassLoader
- * role from Java and in facts can provide a ClassLoader
- * view of itself using {@link #getClassLoader}.ClassWorld errors.
- *
- * @author bob mcwhirter
- */
-@Deprecated
-public class ClassWorldException extends Exception {
- // ------------------------------------------------------------
- // Instance members
- // ------------------------------------------------------------
-
- /**
- * The world.
- */
- private final ClassWorld world;
-
- // ------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------
-
- /**
- * Construct.
- *
- * @param world The world.
- */
- public ClassWorldException(final ClassWorld world) {
- this.world = world;
- }
-
- /**
- * Construct.
- *
- * @param world The world.
- * @param msg The detail message.
- */
- public ClassWorldException(final ClassWorld world, final String msg) {
- super(msg);
- this.world = world;
- }
-
- // ------------------------------------------------------------
- // Instance methods
- // ------------------------------------------------------------
-
- /**
- * Retrieve the world.
- *
- * @return The world.
- */
- public ClassWorld getWorld() {
- return this.world;
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/ClassWorldReverseAdapter.java b/src/main/java/org/codehaus/classworlds/ClassWorldReverseAdapter.java
deleted file mode 100644
index 31c91311..00000000
--- a/src/main/java/org/codehaus/classworlds/ClassWorldReverseAdapter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
- * Copyright 2001-2010 Codehaus Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Vector;
-
-/**
- * A reverse adapter for ClassWorlds
- *
- * @author Andrew Williams
- */
-@SuppressWarnings({"unchecked", "rawtypes"})
-@Deprecated
-public class ClassWorldReverseAdapter extends org.codehaus.plexus.classworlds.ClassWorld {
- private static final HashMap instances = new HashMap();
-
- public static ClassWorldReverseAdapter getInstance(ClassWorld oldWorld) {
- if (instances.containsKey(oldWorld)) return (ClassWorldReverseAdapter) instances.get(oldWorld);
-
- ClassWorldReverseAdapter adapter = new ClassWorldReverseAdapter(oldWorld);
- instances.put(oldWorld, adapter);
-
- return adapter;
- }
-
- private final ClassWorld world;
-
- private ClassWorldReverseAdapter(ClassWorld newWorld) {
- super();
- this.world = newWorld;
- }
-
- 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 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 void disposeRealm(String id) throws org.codehaus.plexus.classworlds.realm.NoSuchRealmException {
- try {
- world.disposeRealm(id);
- } catch (NoSuchRealmException e) {
- throw new org.codehaus.plexus.classworlds.realm.NoSuchRealmException(this, e.getId());
- }
- }
-
- public org.codehaus.plexus.classworlds.realm.ClassRealm getRealm(String id)
- throws org.codehaus.plexus.classworlds.realm.NoSuchRealmException {
- try {
- return ClassRealmReverseAdapter.getInstance(world.getRealm(id));
- } catch (NoSuchRealmException e) {
- throw new org.codehaus.plexus.classworlds.realm.NoSuchRealmException(this, e.getId());
- }
- }
-
- public Collection getRealms() {
- Collection realms = world.getRealms();
- Vector ret = new Vector();
-
- for (Object o : realms) {
- ClassRealm realm = (ClassRealm) o;
- ret.add(ClassRealmReverseAdapter.getInstance(realm));
- }
-
- return ret;
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/ConfigurationException.java b/src/main/java/org/codehaus/classworlds/ConfigurationException.java
deleted file mode 100644
index f536be2a..00000000
--- a/src/main/java/org/codehaus/classworlds/ConfigurationException.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
-
-Copyright 2002 (C) The Werken Company. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
- statements and notices. Redistributions must also contain a
- copy of this document.
-
-2. Redistributions in binary form must reproduce the
- above copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
-3. The name "classworlds" must not be used to endorse or promote
- products derived from this Software without prior written
- permission of The Werken Company. For written permission,
- please contact bob@werken.com.
-
-4. Products derived from this Software may not be called "classworlds"
- nor may "classworlds" appear in their names without prior written
- permission of The Werken Company. "classworlds" is a registered
- trademark of The Werken Company.
-
-5. Due credit should be given to The Werken Company.
- (http://classworlds.werken.com/).
-
-THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-/**
- * Indicates an error during Launcher configuration.
- *
- * @author bob mcwhirter
- */
-@Deprecated
-public class ConfigurationException extends Exception {
- /**
- * Construct.
- *
- * @param msg The message.
- */
- public ConfigurationException(String msg) {
- super(msg);
- }
-
- /**
- * Construct.
- *
- * @param msg The message.
- * @param lineNo The number of configuraton line where the problem occured.
- * @param line The configuration line where the problem occured.
- */
- public ConfigurationException(String msg, int lineNo, String line) {
- super(msg + " (" + lineNo + "): " + line);
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/Configurator.java b/src/main/java/org/codehaus/classworlds/Configurator.java
deleted file mode 100644
index 5f76e53e..00000000
--- a/src/main/java/org/codehaus/classworlds/Configurator.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
- * Copyright 2001-2010 Codehaus Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-
-/**
- * A compatibility wrapper for org.codehaus.plexus.classworlds.launcher.Configurator
- * provided for legacy code
- *
- * @author Andrew Williams
- */
-@Deprecated
-public class Configurator {
- private final ConfiguratorAdapter config;
-
- /** Construct.
- *
- * @param launcher The launcher to configure.
- */
- public Configurator(Launcher launcher) {
- config = ConfiguratorAdapter.getInstance(
- new org.codehaus.plexus.classworlds.launcher.Configurator(launcher), launcher);
- }
-
- /** Construct.
- *
- * @param world The classWorld to configure.
- */
- public Configurator(ClassWorld world) {
- config = ConfiguratorAdapter.getInstance(
- new org.codehaus.plexus.classworlds.launcher.Configurator(ClassWorldReverseAdapter.getInstance(world)),
- world);
- }
-
- /** set world.
- * this setter is provided so you can use the same configurator to configure several "worlds"
- *
- * @param world The classWorld to configure.
- */
- public void setClassWorld(ClassWorld world) {
- config.setClassWorld(world);
- }
-
- /**
- * Configure from a file.
- *
- * @param is The config input stream
- * @throws IOException If an error occurs reading the config file.
- * @throws MalformedURLException If the config file contains invalid URLs.
- * @throws ConfigurationException If the config file is corrupt.
- * @throws DuplicateRealmException If the config file defines two realms with the same id.
- * @throws NoSuchRealmException If the config file defines a main entry point in
- * a non-existent realm.
- */
- public void configure(InputStream is)
- throws IOException, MalformedURLException, ConfigurationException, DuplicateRealmException,
- NoSuchRealmException {
- config.configureAdapter(is);
- }
-
- /**
- * Associate parent realms with their children.
- */
- protected void associateRealms() {
- config.associateRealms();
- }
-
- /**
- * Load a glob into the specified classloader.
- *
- * @param line The path configuration line.
- * @param realm The realm to populate
- * @throws MalformedURLException If the line does not represent
- * a valid path element.
- * @throws FileNotFoundException If the line does not represent
- * a valid path element in the filesystem.
- */
- protected void loadGlob(String line, ClassRealm realm) throws MalformedURLException, FileNotFoundException {
- loadGlob(line, realm, false);
- }
-
- /**
- * Load a glob into the specified classloader.
- *
- * @param line The path configuration line.
- * @param realm The realm to populate
- * @param optionally Whether the path is optional or required
- * @throws MalformedURLException If the line does not represent
- * a valid path element.
- * @throws FileNotFoundException If the line does not represent
- * a valid path element in the filesystem.
- */
- @SuppressWarnings("RedundantThrows")
- protected void loadGlob(String line, ClassRealm realm, boolean optionally)
- throws MalformedURLException, FileNotFoundException {
- config.loadGlob(line, realm, optionally);
- }
-
- /**
- * Filter a string for system properties.
- *
- * @param text The text to filter.
- * @return The filtered text.
- * @throws ConfigurationException If the property does not
- * exist or if there is a syntax error.
- */
- @SuppressWarnings("RedundantThrows")
- protected String filter(String text) throws ConfigurationException {
- return config.filter(text);
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/ConfiguratorAdapter.java b/src/main/java/org/codehaus/classworlds/ConfiguratorAdapter.java
deleted file mode 100644
index 37041715..00000000
--- a/src/main/java/org/codehaus/classworlds/ConfiguratorAdapter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
- * Copyright 2001-2010 Codehaus Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-
-/**
- */
-@Deprecated
-public class ConfiguratorAdapter extends Configurator {
-
- public static ConfiguratorAdapter getInstance(
- org.codehaus.plexus.classworlds.launcher.Configurator newConfig, Launcher launcher) {
- return new ConfiguratorAdapter(newConfig, launcher);
- }
-
- public static ConfiguratorAdapter getInstance(
- org.codehaus.plexus.classworlds.launcher.Configurator newConfig, ClassWorld world) {
- return new ConfiguratorAdapter(newConfig, world);
- }
-
- private final org.codehaus.plexus.classworlds.launcher.Configurator config;
-
- private ConfiguratorAdapter(org.codehaus.plexus.classworlds.launcher.Configurator config, Launcher launcher) {
- super(launcher);
- this.config = config;
- }
-
- private ConfiguratorAdapter(org.codehaus.plexus.classworlds.launcher.Configurator config, ClassWorld world) {
- super(world);
- this.config = config;
- }
-
- public void associateRealms() {
- config.associateRealms();
- }
-
- @SuppressWarnings("DuplicateThrows")
- 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());
- }
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/DefaultClassRealm.java b/src/main/java/org/codehaus/classworlds/DefaultClassRealm.java
deleted file mode 100644
index d7435258..00000000
--- a/src/main/java/org/codehaus/classworlds/DefaultClassRealm.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
- * Copyright 2001-2010 Codehaus Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * A compatibility wrapper for org.codehaus.plexus.classworlds.realm.ClassRealm
- * provided for legacy code
- *
- * @author Andrew Williams
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Enumeration;
-
-@SuppressWarnings("rawtypes")
-@Deprecated
-public class DefaultClassRealm implements ClassRealm {
- private final ClassRealmAdapter adapter;
-
- public DefaultClassRealm(ClassWorld world, String id) {
- this(world, id, null);
- }
-
- public DefaultClassRealm(ClassWorld world, String id, ClassLoader foreignClassLoader) {
- this.adapter = ClassRealmAdapter.getInstance(new org.codehaus.plexus.classworlds.realm.ClassRealm(
- ClassWorldReverseAdapter.getInstance(world), id, foreignClassLoader));
- }
-
- public URL[] getConstituents() {
- return adapter.getConstituents();
- }
-
- public ClassRealm getParent() {
- return adapter.getParentRealm();
- }
-
- public void setParent(ClassRealm parent) {
- adapter.setParent(parent);
- }
-
- public String getId() {
- return adapter.getId();
- }
-
- public ClassWorld getWorld() {
- return adapter.getWorld();
- }
-
- public void importFrom(String realmId, String packageName) throws NoSuchRealmException {
- adapter.importFrom(realmId, packageName);
- }
-
- public void addConstituent(URL constituent) {
- adapter.addConstituent(constituent);
- }
-
- /**
- * Adds a byte[] class definition as a constituent for locating classes.
- * Currently uses BytesURLStreamHandler to hold a reference of the byte[] in memory.
- * This ensures we have a unifed URL resource model for all constituents.
- * The code to cache to disk is commented out - maybe a property to choose which method?
- *
- * @param constituent class name
- * @param b the class definition as a byte[]
- * @throws ClassNotFoundException when class couldn't be loaded
- */
- public void addConstituent(String constituent, byte[] b) throws ClassNotFoundException {
- try {
- File path, file;
- if (constituent.lastIndexOf('.') != -1) {
- path = new File("byteclass/"
- + constituent
- .substring(0, constituent.lastIndexOf('.') + 1)
- .replace('.', File.separatorChar));
-
- file = new File(path, constituent.substring(constituent.lastIndexOf('.') + 1) + ".class");
- } else {
- path = new File("byteclass/");
-
- file = new File(path, constituent + ".class");
- }
-
- addConstituent(new URL(null, file.toURI().toURL().toExternalForm(), new BytesURLStreamHandler(b)));
- } catch (java.io.IOException e) {
- throw new ClassNotFoundException("Couldn't load byte stream.", e);
- }
- }
-
- public ClassRealm locateSourceRealm(String classname) {
- return adapter.locateSourceRealm(classname);
- }
-
- public ClassLoader getClassLoader() {
- return adapter.getClassLoader();
- }
-
- public ClassRealm createChildRealm(String id) throws DuplicateRealmException {
- return adapter.createChildRealm(id);
- }
-
- // ----------------------------------------------------------------------
- // ClassLoader API
- // ----------------------------------------------------------------------
-
- public Class loadClass(String name) throws ClassNotFoundException {
- return adapter.loadClass(name);
- }
-
- public URL getResource(String name) {
- return adapter.getResource(name);
- }
-
- public InputStream getResourceAsStream(String name) {
- return adapter.getResourceAsStream(name);
- }
-
- public Enumeration findResources(String name) throws IOException {
- return adapter.findResources(name);
- }
-
- public void display() {
- adapter.display();
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/DuplicateRealmException.java b/src/main/java/org/codehaus/classworlds/DuplicateRealmException.java
deleted file mode 100644
index cc8df3f9..00000000
--- a/src/main/java/org/codehaus/classworlds/DuplicateRealmException.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
-
-Copyright 2002 (C) The Werken Company. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
- statements and notices. Redistributions must also contain a
- copy of this document.
-
-2. Redistributions in binary form must reproduce the
- above copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
-3. The name "classworlds" must not be used to endorse or promote
- products derived from this Software without prior written
- permission of The Werken Company. For written permission,
- please contact bob@werken.com.
-
-4. Products derived from this Software may not be called "classworlds"
- nor may "classworlds" appear in their names without prior written
- permission of The Werken Company. "classworlds" is a registered
- trademark of The Werken Company.
-
-5. Due credit should be given to The Werken Company.
- (http://classworlds.werken.com/).
-
-THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-/**
- * Indicates an attempt to add a ClassRealm to a
- * ClassWorld with a duplicate id.
- *
- * @author bob mcwhirter
- */
-@Deprecated
-public class DuplicateRealmException extends ClassWorldException {
- // ------------------------------------------------------------
- // Instance members
- // ------------------------------------------------------------
-
- /**
- * The realm id.
- */
- private final String id;
-
- // ------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------
-
- /**
- * Construct.
- *
- * @param world The world.
- * @param id The realm id.
- */
- public DuplicateRealmException(ClassWorld world, String id) {
- super(world, id);
- this.id = id;
- }
-
- // ------------------------------------------------------------
- // Instance methods
- // ------------------------------------------------------------
-
- /**
- * Retrieve the duplicate realm id.
- *
- * @return The id.
- */
- public String getId() {
- return this.id;
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/Launcher.java b/src/main/java/org/codehaus/classworlds/Launcher.java
deleted file mode 100644
index 261f8791..00000000
--- a/src/main/java/org/codehaus/classworlds/Launcher.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
- * Copyright 2001-2010 Codehaus Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * A compatibility wrapper for org.codehaus.plexus.classworlds.launcher.Launcher
- * provided for legacy code
- *
- * @author Andrew Williams
- */
-@Deprecated
-public class Launcher extends org.codehaus.plexus.classworlds.launcher.Launcher {
- public Launcher() {}
-
- // ------------------------------------------------------------
- // Class methods
- // ------------------------------------------------------------
-
- /**
- * Launch the launcher from the command line.
- * Will exit using System.exit with an exit code of 0 for success, 100 if there was an unknown exception,
- * or some other code for an application error.
- *
- * @param args The application command-line arguments.
- */
- public static void main(String[] args) {
- org.codehaus.plexus.classworlds.launcher.Launcher.main(args);
- }
-
- /**
- * Launch the launcher.
- *
- * @param args The application command-line arguments.
- * @return an integer exit code
- * @throws Exception If an error occurs.
- */
- public static int mainWithExitCode(String[] args) throws Exception {
- return org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(args);
- }
-}
diff --git a/src/main/java/org/codehaus/classworlds/NoSuchRealmException.java b/src/main/java/org/codehaus/classworlds/NoSuchRealmException.java
deleted file mode 100644
index 4e388ed4..00000000
--- a/src/main/java/org/codehaus/classworlds/NoSuchRealmException.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.codehaus.classworlds;
-
-/*
-
-Copyright 2002 (C) The Werken Company. All Rights Reserved.
-
-Redistribution and use of this software and associated documentation
-("Software"), with or without modification, are permitted provided
-that the following conditions are met:
-
-1. Redistributions of source code must retain copyright
- statements and notices. Redistributions must also contain a
- copy of this document.
-
-2. Redistributions in binary form must reproduce the
- above copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
-3. The name "classworlds" must not be used to endorse or promote
- products derived from this Software without prior written
- permission of The Werken Company. For written permission,
- please contact bob@werken.com.
-
-4. Products derived from this Software may not be called "classworlds"
- nor may "classworlds" appear in their names without prior written
- permission of The Werken Company. "classworlds" is a registered
- trademark of The Werken Company.
-
-5. Due credit should be given to The Werken Company.
- (http://classworlds.werken.com/).
-
-THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-/**
- * Indicates an attempt to retrieve a ClassRealm from a
- * ClassWorld with an invalid id.
- *
- * @author bob mcwhirter
- */
-@Deprecated
-public class NoSuchRealmException extends ClassWorldException {
- // ------------------------------------------------------------
- // Instance members
- // ------------------------------------------------------------
-
- /**
- * The realm id.
- */
- private final String id;
-
- // ------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------
-
- /**
- * Construct.
- *
- * @param world The world.
- * @param id The realm id.
- */
- public NoSuchRealmException(ClassWorld world, String id) {
- super(world, id);
- this.id = id;
- }
-
- // ------------------------------------------------------------
- // Instance methods
- // ------------------------------------------------------------
-
- /**
- * Retrieve the invalid realm id.
- *
- * @return The id.
- */
- public String getId() {
- return this.id;
- }
-}
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index a4a2e607..a7ff21bf 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -18,7 +18,7 @@
much headache and confusion for certain types of application
developers. Projects which involve dynamic loading of components
or otherwise represent a 'container' can benefit from the classloading
- control provided by Classworlds.
+ control provided by Classworlds.
@@ -47,7 +47,7 @@
- This model allows for fine-grained control of which
+ This model allows for fine-grained control of which
classloader loads any particular class. This form of
partial isolation can reduce the myriad strange errors
that are produced by loading classes from multiple
@@ -61,12 +61,6 @@
from a configuration file and the launching of the application's main
method from the correct class loaded through the correct classloader.
- And for seamless transition from older Classworlds up to 1.1, - Plexus Classworlds provides - a compatibility layer. -