From: <ls...@us...> - 2008-12-18 19:25:12
|
Revision: 4795 http://jnode.svn.sourceforge.net/jnode/?rev=4795&view=rev Author: lsantha Date: 2008-12-18 19:25:07 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Removed unused classes. Modified Paths: -------------- trunk/core/descriptors/org.classpath.core.xml Removed Paths: ------------- trunk/core/src/classpath/gnu/gnu/classpath/ListenerData.java trunk/core/src/classpath/gnu/gnu/classpath/NotImplementedException.java trunk/core/src/classpath/gnu/gnu/classpath/Pair.java trunk/core/src/classpath/gnu/gnu/classpath/Pointer32.java trunk/core/src/classpath/gnu/gnu/classpath/Pointer64.java trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeInputStream.java trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeOutputStream.java trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeReader.java trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeWriter.java trunk/core/src/classpath/gnu/gnu/java/io/ASN1ParsingException.java trunk/core/src/classpath/gnu/gnu/java/io/ClassLoaderObjectInputStream.java trunk/core/src/classpath/gnu/gnu/java/io/ObjectIdentityMap2Int.java trunk/core/src/classpath/vm/gnu/java/lang/management/ trunk/core/src/classpath/vm/gnu/java/security/action/GetBooleanAction.java trunk/core/src/classpath/vm/gnu/java/security/action/GetIntegerAction.java trunk/core/src/classpath/vm/java/lang/management/ trunk/core/src/classpath/vm/java/lang/reflect/VMProxy.java trunk/core/src/classpath/vm/java/util/ Modified: trunk/core/descriptors/org.classpath.core.xml =================================================================== --- trunk/core/descriptors/org.classpath.core.xml 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/descriptors/org.classpath.core.xml 2008-12-18 19:25:07 UTC (rev 4795) @@ -72,7 +72,6 @@ <export name="gnu.classpath.SystemProperties"/> <export name="gnu.classpath.VMSystemProperties"/> <export name="gnu.classpath.VMStackWalker"/> - <export name="gnu.classpath.NotImplementedException"/> <export name="gnu.classpath.ServiceFactory"/> <export name="gnu.classpath.ServiceFactory$ServiceIterator"/> <export name="gnu.classpath.ServiceProviderLoadingAction"/> Deleted: trunk/core/src/classpath/gnu/gnu/classpath/ListenerData.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/ListenerData.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/ListenerData.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,136 +0,0 @@ -/* ListenerData.java - Class to contain data about management bean listeners - Copyright (C) 2006 Free Software Foundation - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.classpath; - -import javax.management.NotificationFilter; -import javax.management.NotificationListener; - -/** - * Container for data on management listeners. Wraps - * a {@link javax.management.NotificationListener}, - * {@link javax.management.NotificationFilter} and - * passback object in one class. - * - * @author Andrew John Hughes (gnu...@me...) - * @since 1.5 - */ -public class ListenerData -{ - /** - * The listener itself. - */ - private NotificationListener listener; - - /** - * A filter to apply to incoming events. - */ - private NotificationFilter filter; - - /** - * An object to pass back to the listener on an - * event occurring. - */ - private Object passback; - - /** - * Constructs a new {@link ListenerData} with the specified - * listener, filter and passback object. - * - * @param listener the listener itself. - * @param filter the filter for incoming events. - * @param passback the object to passback on an incoming event. - */ - public ListenerData(NotificationListener listener, - NotificationFilter filter, Object passback) - { - this.listener = listener; - this.filter = filter; - this.passback = passback; - } - - /** - * Returns the listener. - * - * @return the listener. - */ - public NotificationListener getListener() - { - return listener; - } - - /** - * Returns the filter. - * - * @return the filter. - */ - public NotificationFilter getFilter() - { - return filter; - } - - /** - * Returns the passback object. - * - * @return the passback object. - */ - public Object getPassback() - { - return passback; - } - - /** - * Returns true if the supplied object is an instance of - * {@link ListenerData} and has the same listener, filter - * and passback object. - * - * @param obj the object to check. - * @return true if <code>obj</code> is equal to this. - */ - public boolean equals(Object obj) - { - if (obj instanceof ListenerData) - { - ListenerData data = (ListenerData) obj; - return (data.getListener() == listener && - data.getFilter() == filter && - data.getPassback() == passback); - } - return false; - } - -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/NotImplementedException.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/NotImplementedException.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/NotImplementedException.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,61 +0,0 @@ -/* NotImplementedException.java -- Marker for stub methods - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.classpath; - -/** - * This class is used as a marker to indicate that a given method - * is merely a stub, requiring implementation. For historical - * reasons, GNU Classpath includes a number of stub methods. We - * don't wish to remove them, but we do want to make them easily - * discoverable. JAPI will notice methods declared as throwing - * this exception and mark them appropriately. - */ -public class NotImplementedException - extends RuntimeException -{ - private static final long serialVersionUID = 5112972057211125814L; - - /** - * This class is not instantiable. It should only be used - * in a method 'throws' clause -- not actually ever thrown. - */ - private NotImplementedException() - { - } -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/Pair.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/Pair.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/Pair.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,126 +0,0 @@ -/* Pair.java -- A heterogenous pair of objects. - Copyright (C) 2006 - Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.classpath; - -/** - * A container for a pair of heterogenous objects. - * - * @author Andrew John Hughes (gnu...@me...) - */ -public class Pair<A,B> -{ - - /** - * The left-hand side of the pair. - */ - private A left; - - /** - * The right-hand side of the pair. - */ - private B right; - - /** - * Constructs a new pair using the given left and - * right values. - * - * @param left the left-hand side of the pair. - * @param right the right-hand side of the pair. - */ - public Pair(A left, B right) - { - this.left = left; - this.right = right; - } - - /** - * Returns the left-hand side of the pair. - * - * @return the left-hand value. - */ - public A getLeft() - { - return left; - } - - /** - * Returns the right-hand side of the pair. - * - * @return the right-hand value. - */ - public B getRight() - { - return right; - } - - /** - * Returns true if the specified object is also a - * pair with equivalent left and right values. - * - * @param obj the object to compare. - * @return true if the two are equal. - */ - public boolean equals(Object obj) - { - if (obj instanceof Pair) - { - Pair<A,B> p = (Pair<A,B>) obj; - A lp = p.getLeft(); - B rp = p.getRight(); - return (lp == null ? left == null : lp.equals(left)) && - (rp == null ? right == null : rp.equals(right)); - } - return false; - } - - /** - * Returns a hashcode for the pair, created by the - * summation of the hashcodes of the left and right - * hand values. - * - * @return a hashcode for the pair. - */ - public int hashCode() - { - return (left == null ? 0 : left.hashCode()) - + (right == null ? 0 : right.hashCode()); - } - -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/Pointer32.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/Pointer32.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/Pointer32.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,52 +0,0 @@ -/* Pointer32.java -- 32 bit Pointer - Copyright (C) 2004 Free Software Foundation - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.classpath; - -/** - * A type used to indicate special data used by native code that should not - * be marked by the garbage collector. - */ -public final class Pointer32 extends Pointer -{ - final int data; - - public Pointer32(int data) - { - this.data = data; - } -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/Pointer64.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/Pointer64.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/Pointer64.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,52 +0,0 @@ -/* Pointer64.java -- 64 bit Pointer - Copyright (C) 2004 Free Software Foundation - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.classpath; - -/** - * A type used to indicate special data used by native code that should not - * be marked by the garbage collector. - */ -public final class Pointer64 extends Pointer -{ - final long data; - - public Pointer64(long data) - { - this.data = data; - } -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeInputStream.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeInputStream.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeInputStream.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,98 +0,0 @@ -/* TeeInputStream.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is a part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under terms -of your choice, provided that you also meet, for each linked independent -module, the terms and conditions of the license of that module. An -independent module is a module which is not derived from or based on -this library. If you modify this library, you may extend this exception -to your version of the library, but you are not obligated to do so. If -you do not wish to do so, delete this exception statement from your -version. */ - -package gnu.classpath.debug; - -import java.io.*; - -/** - * An input stream that copies all its input to a byte sink. - * - * @author Chris Burdess - */ -public class TeeInputStream - extends InputStream -{ - - private final InputStream in; - private final OutputStream out; - - /** - * Constructs a tee input stream. - * @param in the underlying input stream - * @param out the output sink - */ - public TeeInputStream(InputStream in, OutputStream out) - { - this.in = in; - this.out = out; - } - - public int read() - throws IOException - { - int ret = in.read(); - out.write(ret); - out.flush(); - return ret; - } - - public int read(byte[] b, int off, int len) - throws IOException - { - int ret = in.read(b, off, len); - if (ret != -1) - { - out.write(b, off, ret); - out.flush(); - } - return ret; - } - - public void close() - throws IOException - { - in.close(); - out.close(); - } - - public final boolean markSupported() - { - return false; - } - -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeOutputStream.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeOutputStream.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeOutputStream.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,93 +0,0 @@ -/* TeeOutputStream.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is a part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under terms -of your choice, provided that you also meet, for each linked independent -module, the terms and conditions of the license of that module. An -independent module is a module which is not derived from or based on -this library. If you modify this library, you may extend this exception -to your version of the library, but you are not obligated to do so. If -you do not wish to do so, delete this exception statement from your -version. */ - -package gnu.classpath.debug; - -import java.io.*; - -/** - * An output stream that copies all its output to an additional byte sink. - * - * @author Chris Burdess - */ -public class TeeOutputStream - extends OutputStream -{ - - private final OutputStream out; - private final OutputStream sink; - - /** - * Constructs a tee output stream. - * @param out the underlying output stream - * @param sink the output sink - */ - public TeeOutputStream(OutputStream out, OutputStream sink) - { - this.out = out; - this.sink = sink; - } - - public void write(int c) - throws IOException - { - out.write(c); - sink.write(c); - } - - public void write(byte[] b, int off, int len) - throws IOException - { - out.write(b, off, len); - sink.write(b, off, len); - } - - public void flush() - throws IOException - { - out.flush(); - sink.flush(); - } - - public void close() - throws IOException - { - out.close(); - sink.close(); - } - -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeReader.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeReader.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeReader.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,98 +0,0 @@ -/* TeeReader.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is a part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under terms -of your choice, provided that you also meet, for each linked independent -module, the terms and conditions of the license of that module. An -independent module is a module which is not derived from or based on -this library. If you modify this library, you may extend this exception -to your version of the library, but you are not obligated to do so. If -you do not wish to do so, delete this exception statement from your -version. */ - -package gnu.classpath.debug; - -import java.io.*; - -/** - * A reader that copies all characters read to an output sink. - * - * @author Chris Burdess - */ -public class TeeReader - extends Reader -{ - - private final Reader in; - private final Writer out; - - /** - * Constructs a tee reader. - * @param in the input - * @param out the output sink - */ - public TeeReader(Reader in, Writer out) - { - this.in = in; - this.out = out; - } - - public int read() - throws IOException - { - int ret = in.read(); - out.write(ret); - out.flush(); - return ret; - } - - public int read(char[] b, int off, int len) - throws IOException - { - int ret = in.read(b, off, len); - if (ret != -1) - { - out.write(b, off, ret); - out.flush(); - } - return ret; - } - - public void close() - throws IOException - { - in.close(); - out.close(); - } - - public final boolean markSupported() - { - return false; - } - -} Deleted: trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeWriter.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeWriter.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/classpath/debug/TeeWriter.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,93 +0,0 @@ -/* TeeWriter.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is a part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under terms -of your choice, provided that you also meet, for each linked independent -module, the terms and conditions of the license of that module. An -independent module is a module which is not derived from or based on -this library. If you modify this library, you may extend this exception -to your version of the library, but you are not obligated to do so. If -you do not wish to do so, delete this exception statement from your -version. */ - -package gnu.classpath.debug; - -import java.io.*; - -/** - * A writer that copies all its output to an additional character sink. - * - * @author Chris Burdess - */ -public class TeeWriter - extends Writer -{ - - private final Writer out; - private final Writer sink; - - /** - * Constructs a tee writer. - * @param out the underlying writer - * @param sink the output sink - */ - public TeeWriter(Writer out, Writer sink) - { - this.out = out; - this.sink = sink; - } - - public void write(int c) - throws IOException - { - out.write(c); - sink.write(c); - } - - public void write(char[] b, int off, int len) - throws IOException - { - out.write(b, off, len); - sink.write(b, off, len); - } - - public void flush() - throws IOException - { - out.flush(); - sink.flush(); - } - - public void close() - throws IOException - { - out.close(); - sink.close(); - } - -} Deleted: trunk/core/src/classpath/gnu/gnu/java/io/ASN1ParsingException.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/java/io/ASN1ParsingException.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/java/io/ASN1ParsingException.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,56 +0,0 @@ -/* ASN1ParsingException.java -- ASN.1 parsing exception. - Copyright (C) 2003 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.io; - -/** - * Signals a malformed ASN.1 sequence. - */ -public class ASN1ParsingException extends java.io.IOException -{ - - public ASN1ParsingException() - { - super(); - } - - public ASN1ParsingException(String msg) - { - super(msg); - } -} Deleted: trunk/core/src/classpath/gnu/gnu/java/io/ClassLoaderObjectInputStream.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/java/io/ClassLoaderObjectInputStream.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/java/io/ClassLoaderObjectInputStream.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,73 +0,0 @@ -/* gnu.java.io.ClassLoaderObjectInputStream - Copyright (C) 1998 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.io; - -import java.io.IOException; -import java.io.InputStream; -import java.io.ObjectInputStream; -import java.io.StreamCorruptedException; - -/** - * ClassLoaderObjectInputStream is ObjectInputStream, with - * the ability to use a specific ClassLoader. - * - * @author Geoff Berry - * @version 1.1.0, 29 Jul 1998 - */ - -public class ClassLoaderObjectInputStream extends ObjectInputStream { - ClassLoader myClassLoader; - - /** Create the new ClassLoaderObjectInputStream. - * @param in the InputStream to read the Objects from. - * @param myClassLoader the ClassLoader to load classes - * with. - */ - public ClassLoaderObjectInputStream(InputStream in, ClassLoader myClassLoader) throws IOException,StreamCorruptedException { - super(in); - this.myClassLoader = myClassLoader; - } - - /** Overriden method to use the loadClass() method from - * the ClassLoader. - */ - public Class resolveClass(String name) throws IOException, ClassNotFoundException { - return myClassLoader.loadClass(name); - } -} Deleted: trunk/core/src/classpath/gnu/gnu/java/io/ObjectIdentityMap2Int.java =================================================================== --- trunk/core/src/classpath/gnu/gnu/java/io/ObjectIdentityMap2Int.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/gnu/gnu/java/io/ObjectIdentityMap2Int.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,292 +0,0 @@ -/* ObjectIdentityMapToInt.java -- Helper class for faster serialization - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.io; - -/** - * This class provides a map from Object to non-negative int values. - * Objects are considered equal only if their references are equal. - * - * This can be used to equip objects with an integer id. This class - * is implemented to use as little memory as possible, particularly - * not to create hashtable buckets and Integer instances for each - * mapping. - * - * @author Fridtjof Siebert (si...@ai...) - */ -public class ObjectIdentityMap2Int -{ - - - /** - * Prime numbers used as size of array. We need the size to be a - * prime number since the delta used for conflict resulution must - * not have any common divisors with the length. - */ - private static final int[] PRIMES = { - 0x1f, - 0x3d, - 0x7f, - 0xfb, - 0x1fd, - 0x3fd, - 0x7f7, - 0xffd, - 0x1fff, - 0x3ffd, - 0x7fed, - 0xfff1, - 0x1ffff, - 0x3fffb, - 0x7ffff, - 0xffffd, - 0x1ffff7, - 0x3ffffd, - 0x7ffff1, - 0xfffffd, - 0x1ffffd9, - 0x3fffffb, - 0x7ffffd9, - 0xfffffc7, - 0x1ffffffd, - 0x3fffffdd, - 0x7fffffff}; - - - /** - * Object to be used instead of "null" - */ - private static final Object NIL = new Object(); - - - /** - * The objects in this map: - * - * invariant - * objectTable.size == PRIMES[cap] - */ - private Object[] objectTable; - - - /** - * The corresponding integer ids. - * - * invariant - * intTable.size == PRIMES[cap] - */ - private int[] intTable; - - - /** - * The number of entries in this map. - * - * invariant - * size < limit - */ - private int size = 0; - - - /** - * The index in primes of the size of the tables. - */ - private int cap = 0; - - - /** - * The limit for size at which the table size is increased. - * - * invariant - * limit = PRIMES[cap] / 4 * 3; - */ - private int limit = 0; - - - /** - * Constructs an empty <code>ObjectIdentityMap2Int</code>. - */ - public ObjectIdentityMap2Int() - { - alloc(0); - } - - - /** - * Helper function to alloc the object and int array for the given - * capacity. Set limit, reset size to 0. - * - * No elements will be stored in the newly allocated arrays. - * - * @param c the capacity: this is an index in PRIMES, PRIMES[c] - * gives the size of the arrays. - * - * @throws InternalError if c >= PRIMES.length (in this case, a - * normal Hashtable would throw an OutOfMemoryError or a - * NegativeArraySizeException since the array size exceeds the range - * of positive integers). - */ - private void alloc(int c) - { - if (c >= PRIMES.length) - throw new InternalError("Hash table size overflow"); - - cap = c; - int len = PRIMES[c]; - objectTable = new Object[len]; - intTable = new int[len]; - limit = len / 4 * 3; - - size = 0; - } - - - /** - * Add a mapping to this Map. - * - * ensures - * (get(o) == i); - * - * @param o object reference or null that is to be mapped. - * - * @param i the integer id to be associated with o - * - * @throws IllegalArgumentException if i<0 - * - * @throws InternalError if hash tables has grown to more then - * 0x7fffffff entries (ie., size >= 0x7fffffff*3/4). - */ - public void put(Object o, int i) - { - if (i < 0) - throw new IllegalArgumentException("int argument must be postive: "+i); - - o = (o == null) ? NIL : o; - int s = slot(o); - Object[] ot = objectTable; - intTable[s] = i; - if (objectTable[s] == null) - { - objectTable[s] = o; - size++; - if (size >= limit) - { - rehash(); - } - } - } - - - /** - * Helper function to find the index of a free or existing slot for - * object o - * - * ensure - * ((objectTable[result] != null) IMPLIES (objectTable[result] == o)); - * - * @param o an object, must not be null. - * - * @return an index of o - */ - private int slot(Object o) - { - Object[] ot = objectTable; - int hc = System.identityHashCode(o); - int len = ot.length; - int result = hc % len; - result = result < 0 ? -result : result; - int delta = 16 - (hc & 15); - Object existing = ot[result]; - while ((existing != null) && (existing != o)) - { - result += delta; - if (result >= len) - result -= len; - existing = ot[result]; - } - return result; - } - - - /** - * Helper function for put() to increaes the capacity of this table - * to the next size (approx. double the size). Keep the mapping and - * the size unchanged. - * - * ensure - * (cap == \old cap+1); - */ - private void rehash() - { - Object[] ot = objectTable; - int [] it = intTable; - alloc(cap + 1); - - for (int i = 0; i < ot.length; i++) - put(ot[i], it[i]); - } - - - /** - * Obtain an element from this map - * - * @param o an object or null - * - * @return the corresponding integer id for o or -1 if o has not - * been put into this map. - */ - public int get(Object o) - { - o = (o == null) ? NIL : o; - int s = slot(o); - return objectTable[s] == null ? -1 : intTable[s]; - } - - /** - * Clear this map - * - * ensures - * ((size == 0) && \forall Object o: get(o) == -1) - */ - public void clear() - { - Object[] ot = objectTable; - size = 0; - for (int i = 0; i < ot.length; i++) - ot[i] = null; - } - -} Deleted: trunk/core/src/classpath/vm/gnu/java/security/action/GetBooleanAction.java =================================================================== --- trunk/core/src/classpath/vm/gnu/java/security/action/GetBooleanAction.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/vm/gnu/java/security/action/GetBooleanAction.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,46 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package gnu.java.security.action; - -import java.security.PrivilegedAction; - -/** - * Utility class for getting Boolean properties in a privileged action. - * - * @see Boolean#getBoolean(String) - * @author Ewout Prangsma (ep...@us...) - */ -public class GetBooleanAction implements PrivilegedAction<Boolean> { - - private final String key; - - public GetBooleanAction(String key) { - this.key = key; - } - - /** - * @see java.security.PrivilegedAction#run() - */ - public Boolean run() { - return Boolean.valueOf(Boolean.getBoolean(key)); - } -} Deleted: trunk/core/src/classpath/vm/gnu/java/security/action/GetIntegerAction.java =================================================================== --- trunk/core/src/classpath/vm/gnu/java/security/action/GetIntegerAction.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/vm/gnu/java/security/action/GetIntegerAction.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,57 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package gnu.java.security.action; - -import java.security.PrivilegedAction; - - -/** - * Utility class for getting Integer properties in a privileged action. - * - * @see Integer#getInteger(String, Integer) - * @author Ewout Prangsma (ep...@us...) - */ -public class GetIntegerAction implements PrivilegedAction<Integer> { - - private final String key; - private final Integer defaultValue; - - public GetIntegerAction(String key) { - this(key, null); - } - - public GetIntegerAction(String key, int defaultValue) { - this(key, new Integer(defaultValue)); - } - - public GetIntegerAction(String key, Integer defaultValue) { - this.key = key; - this.defaultValue = defaultValue; - } - - /** - * @see java.security.PrivilegedAction#run() - */ - public Integer run() { - return Integer.getInteger(key, defaultValue); - } -} Deleted: trunk/core/src/classpath/vm/java/lang/reflect/VMProxy.java =================================================================== --- trunk/core/src/classpath/vm/java/lang/reflect/VMProxy.java 2008-12-18 18:34:56 UTC (rev 4794) +++ trunk/core/src/classpath/vm/java/lang/reflect/VMProxy.java 2008-12-18 19:25:07 UTC (rev 4795) @@ -1,143 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package java.lang.reflect; - -import gnu.classpath.Configuration; - -//import java.lang.reflect.Proxy.ProxyData; -import java.lang.reflect.Proxy; - -final class VMProxy { - /** - * Set to true if the VM provides a native method to implement - * Proxy.getProxyClass completely, including argument verification. If this - * is true, HAVE_NATIVE_GET_PROXY_DATA and HAVE_NATIVE_GENERATE_PROXY_CLASS - * should be false. - * - * @see java.lang.reflect.Proxy - */ - static boolean HAVE_NATIVE_GET_PROXY_CLASS = false; - - /** - * Set to true if the VM provides a native method to implement the first - * part of Proxy.getProxyClass: generation of the array of methods to - * convert, and verification of the arguments. If this is true, - * HAVE_NATIVE_GET_PROXY_CLASS should be false. - * - * @see java.lang.reflect.Proxy - */ - static boolean HAVE_NATIVE_GET_PROXY_DATA = false; - - /** - * Set to true if the VM provides a native method to implement the second - * part of Proxy.getProxyClass: conversion of an array of methods into an - * actual proxy class. If this is true, HAVE_NATIVE_GET_PROXY_CLASS should - * be false. - * - * @see java.lang.reflect.Proxy - */ - static boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = false; - - /** - * Optional native method to replace (and speed up) the pure Java - * implementation of getProxyClass. Only needed if - * VMProxy.HAVE_NATIVE_GET_PROXY_CLASS is true, this does the work of both - * getProxyData and generateProxyClass with no intermediate form in Java. - * The native code may safely assume that this class must be created, and - * does not already exist. - * - * @param loader - * the class loader to define the proxy class in; null implies - * the bootstrap class loader - * @param interfaces - * the interfaces the class will extend - * @return the generated proxy class - * @throws IllegalArgumentException - * if the constraints for getProxyClass were violated, except - * for problems with null - * @throws NullPointerException - * if `interfaces' is null or contains a null entry, or if - * handler is null - * @see Configuration#HAVE_NATIVE_GET_PROXY_CLASS - * @see #getProxyClass(ClassLoader, Class[]) - * @see #getProxyData(ClassLoader, Class[]) - * @see #generateProxyClass(ProxyData) - */ - static Class getProxyClass(ClassLoader loader, Class[] interfaces) { - return null; - } - - /** - * Optional native method to replace (and speed up) the pure Java - * implementation of getProxyData. Only needed if - * Configuration.HAVE_NATIVE_GET_PROXY_DATA is true. The native code may - * safely assume that a new ProxyData object must be created which does not - * duplicate any existing ones. - * - * @param loader - * the class loader to define the proxy class in; null implies - * the bootstrap class loader - * @param interfaces - * the interfaces the class will extend - * @return all data that is required to make this proxy class - * @throws IllegalArgumentException - * if the constraints for getProxyClass were violated, except - * for problems with null - * @throws NullPointerException - * if `interfaces' is null or contains a null entry, or if - * handler is null - * @see Configuration.HAVE_NATIVE_GET_PROXY_DATA - * @see #getProxyClass(ClassLoader, Class[]) - * @see #getProxyClass(ClassLoader, Class[]) - * @see ProxyType#getProxyData() - */ - //static Proxy.ProxyData getProxyData(ClassLoader loader, Class[] interfaces) { - static Proxy getProxyData(ClassLoader loader, Class[] interfaces) { - return null; - } - - /** - * Optional native method to replace (and speed up) the pure Java - * implementation of generateProxyClass. Only needed if - * Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS is true. The native code - * may safely assume that a new Class must be created, and that the - * ProxyData object does not describe any existing class. - * - * @param loader - * the class loader to define the proxy class in; null implies - * the bootstrap class loader - * @param data - * the struct of information to convert to a Class. This has - * already been verified for all problems except exceeding VM - * limitations - * @return the newly generated class - * @throws IllegalArgumentException - * if VM limitations are exceeded - * @see #getProxyClass(ClassLoader, Class[]) - * @see #getProxyClass(ClassLoader, Class[]) - * @see ProxyData#generateProxyClass(ClassLoader) - */ - //static Class generateProxyClass(ClassLoader loader, Proxy.ProxyData data) { - static Class generateProxyClass(ClassLoader loader, Proxy data) { - return null; - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |