From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../NamingContextPackage/AlreadyBound.java | 75 +++++++++++ .../NamingContextPackage/AlreadyBoundHelper.java | 126 ++++++++++++++++++ .../NamingContextPackage/AlreadyBoundHolder.java | 97 ++++++++++++++ .../NamingContextPackage/CannotProceed.java | 102 +++++++++++++++ .../NamingContextPackage/CannotProceedHelper.java | 144 +++++++++++++++++++++ .../NamingContextPackage/CannotProceedHolder.java | 97 ++++++++++++++ .../NamingContextPackage/InvalidName.java | 75 +++++++++++ .../NamingContextPackage/InvalidNameHelper.java | 126 ++++++++++++++++++ .../NamingContextPackage/InvalidNameHolder.java | 97 ++++++++++++++ .../CosNaming/NamingContextPackage/NotEmpty.java | 74 +++++++++++ .../NamingContextPackage/NotEmptyHelper.java | 126 ++++++++++++++++++ .../NamingContextPackage/NotEmptyHolder.java | 97 ++++++++++++++ .../CosNaming/NamingContextPackage/NotFound.java | 101 +++++++++++++++ .../NamingContextPackage/NotFoundHelper.java | 142 ++++++++++++++++++++ .../NamingContextPackage/NotFoundHolder.java | 97 ++++++++++++++ .../NamingContextPackage/NotFoundReason.java | 134 +++++++++++++++++++ .../NamingContextPackage/NotFoundReasonHelper.java | 128 ++++++++++++++++++ .../NamingContextPackage/NotFoundReasonHolder.java | 100 ++++++++++++++ .../CosNaming/NamingContextPackage/package.html | 46 +++++++ 19 files changed, 1984 insertions(+) create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java create mode 100644 libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html (limited to 'libjava/classpath/org/omg/CosNaming/NamingContextPackage') diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java new file mode 100644 index 000000000..de1546840 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBound.java @@ -0,0 +1,75 @@ +/* AlreadyBound.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.UserException; +import org.omg.CORBA.portable.IDLEntity; + +/** + * The exception is thrown in response to bind the same object + * into the same context repeatedly under the different name. + * The object can have only one name in the context. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class AlreadyBound + extends UserException + implements IDLEntity +{ + /** + * Use serialVersionUID (v1.4) for interoperability. + */ + private static final long serialVersionUID = -5456929050527586560L; + + /** + * Creates the expection with no details. + */ + public AlreadyBound() + { + } + + /** + * Creates the exception, explaining the reason. + * @param why + */ + public AlreadyBound(String why) + { + super(why); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java new file mode 100644 index 000000000..1eaf50d12 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHelper.java @@ -0,0 +1,126 @@ +/* AlreadyBoundHelper.java -- + Copyright (C) 2005, 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 org.omg.CosNaming.NamingContextPackage; + +import gnu.CORBA.Minor; +import gnu.CORBA.OrbRestricted; + +import org.omg.CORBA.Any; +import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; + +/** + * The helper operations for the {@link AlreadyBound} user exception. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public abstract class AlreadyBoundHelper +{ + /** + * The {@link AlreadyBound} repository id. + */ + private static String _id = + "IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"; + + /** + * Extract the exception from the given {@link Any}. + */ + public static AlreadyBound extract(Any a) + { + try + { + return ((AlreadyBoundHolder) a.extract_Streamable()).value; + } + catch (ClassCastException ex) + { + BAD_OPERATION bad = new BAD_OPERATION(); + bad.initCause(ex); + bad.minor = Minor.Any; + throw bad; + } + } + + /** + * Return the exception repository id. + */ + public static String id() + { + return _id; + } + + /** + * Insert the exception into the given {@link Any}. + */ + public static void insert(Any a, AlreadyBound that) + { + a.insert_Streamable(new AlreadyBoundHolder(that)); + } + + /** + * Read the exception from the given CDR stream. + */ + public static AlreadyBound read(InputStream istream) + { + AlreadyBound value = new AlreadyBound(); + + // Read and discard the repository ID. + istream.read_string(); + return value; + } + + /** + * Create the type code for this exception. + */ + public static TypeCode type() + { + return + OrbRestricted.Singleton.create_struct_tc(id(), "AlreadyBound", new StructMember[ 0 ]); + } + + /** + * Write the exception to the CDR output stream. + */ + public static void write(OutputStream ostream, AlreadyBound value) + { + ostream.write_string(id()); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java new file mode 100644 index 000000000..853700fed --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/AlreadyBoundHolder.java @@ -0,0 +1,97 @@ +/* AlreadyBoundHolder.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * The holder for class {@link AlreadyBound} exception. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class AlreadyBoundHolder + implements Streamable +{ + /** + * The stored value. + */ + public AlreadyBound value; + + /** + * Create the holder with unitialised value. + */ + public AlreadyBoundHolder() + { + } + + /** + * Create the holder, storing the given value. + */ + public AlreadyBoundHolder(AlreadyBound initialValue) + { + value = initialValue; + } + + /** + * Fill in the stored value, reading it from the given CDR stream. + */ + public void _read(InputStream in) + { + value = AlreadyBoundHelper.read(in); + } + + /** + * Get the type code of the {@link NotEmpty} exception. + */ + public TypeCode _type() + { + return AlreadyBoundHelper.type(); + } + + /** + * Write the stored value to the given CDR stream. + */ + public void _write(OutputStream out) + { + AlreadyBoundHelper.write(out, value); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java new file mode 100644 index 000000000..8239c621c --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceed.java @@ -0,0 +1,102 @@ +/* CannotProceed.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.UserException; +import org.omg.CORBA.portable.IDLEntity; +import org.omg.CosNaming.NameComponent; +import org.omg.CosNaming.NamingContext; + +/** + * The exception is raised when the naming service has + * given up for some reason. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class CannotProceed + extends UserException + implements IDLEntity +{ + /** + * Use serialVersionUID (v1.4) for interoperability. + */ + private static final long serialVersionUID = -8627405252527310782L; + + /** + * The relevant naming contex. + */ + public NamingContext cxt; + + /** + * Contains the remainder of the non working name. + */ + public NameComponent[] rest_of_name; + + /** + * Creates the unitialised exception. + */ + public CannotProceed() + { + } + + /** + * Creates an exception with the fields, intialised to the + * given values. + */ + public CannotProceed(NamingContext _cxt, NameComponent[] _rest_of_name) + { + cxt = _cxt; + rest_of_name = _rest_of_name; + } + + /** + * Create an exception with the initialised fields and explaining + * message. + * + * @since 1.4 + */ + public CannotProceed(String why, NamingContext _cxt, + NameComponent[] _rest_of_name + ) + { + super(why); + cxt = _cxt; + rest_of_name = _rest_of_name; + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java new file mode 100644 index 000000000..34fc6ae98 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java @@ -0,0 +1,144 @@ +/* CannotProceedHelper.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import gnu.CORBA.Minor; +import gnu.CORBA.OrbRestricted; + +import org.omg.CORBA.Any; +import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.ORB; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CosNaming.NameComponentHelper; +import org.omg.CosNaming.NameHelper; +import org.omg.CosNaming.NamingContextHelper; + +/** + * The helper operations for {@link CannotProceed}. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public abstract class CannotProceedHelper +{ + /** + * The {@link CannotProceed} repository id. + */ + private static String _id = + "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"; + + /** + * Extract the exception from the given {@link Any}. + */ + public static CannotProceed extract(Any a) + { + try + { + return ((CannotProceedHolder) a.extract_Streamable()).value; + } + catch (ClassCastException ex) + { + BAD_OPERATION bad = new BAD_OPERATION(); + bad.initCause(ex); + bad.minor = Minor.Any; + throw bad; + } + } + + /** + * Return the exception repository id. + */ + public static String id() + { + return _id; + } + + /** + * Insert the exception into the given {@link Any}. + */ + public static void insert(Any a, CannotProceed that) + { + a.insert_Streamable(new CannotProceedHolder(that)); + } + + /** + * Read the exception from the given CDR stream. + */ + public static CannotProceed read(InputStream istream) + { + CannotProceed value = new CannotProceed(); + + // read and discard the repository ID + istream.read_string(); + value.cxt = NamingContextHelper.read(istream); + value.rest_of_name = NameHelper.read(istream); + return value; + } + + /** + * Create the type code for this exception. + */ + public static TypeCode type() + { + ORB orb = OrbRestricted.Singleton; + + StructMember[] members = new StructMember[ 2 ]; + TypeCode member; + member = NamingContextHelper.type(); + members [ 0 ] = new StructMember("cxt", member, null); + member = NameComponentHelper.type(); + member = orb.create_sequence_tc(0, member); + member = orb.create_alias_tc(NameHelper.id(), "Name", member); + members [ 1 ] = new StructMember("rest_of_name", member, null); + return orb.create_struct_tc(id(), "CannotProceed", members); + } + + /** + * Write the exception to the CDR output stream. + */ + public static void write(OutputStream ostream, CannotProceed value) + { + // write the repository ID + ostream.write_string(id()); + NamingContextHelper.write(ostream, value.cxt); + NameHelper.write(ostream, value.rest_of_name); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java new file mode 100644 index 000000000..48a4fad06 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/CannotProceedHolder.java @@ -0,0 +1,97 @@ +/* CannotProceedHolder.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * The holder for exception {@link CannotProceed}. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class CannotProceedHolder + implements Streamable +{ + /** + * The stored value. + */ + public CannotProceed value; + + /** + * Create the holder with unitialised value. + */ + public CannotProceedHolder() + { + } + + /** + * Create the holder, storing the given value. + */ + public CannotProceedHolder(CannotProceed initialValue) + { + value = initialValue; + } + + /** + * Fill in the stored value, reading it from the given CDR stream. + */ + public void _read(InputStream i) + { + value = CannotProceedHelper.read(i); + } + + /** + * Get the type code of the {@link NotEmpty} exception. + */ + public TypeCode _type() + { + return CannotProceedHelper.type(); + } + + /** + * Write the stored value to the given CDR stream. + */ + public void _write(OutputStream o) + { + CannotProceedHelper.write(o, value); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java new file mode 100644 index 000000000..7ca488ac5 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidName.java @@ -0,0 +1,75 @@ +/* InvalidName.java -- + Copyright (C) 2005, 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.UserException; +import org.omg.CORBA.portable.IDLEntity; + +/** + * The exception is thrown if the name has the zero length or is otherwise + * invalid. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class InvalidName + extends UserException + implements IDLEntity +{ + /** + * Use serialVersionUID (v1.4) for interoperability. + */ + private static final long serialVersionUID = 786404864997961704L; + + /** + * The default constructor. + */ + public InvalidName() + { + } + + /** + * Creates an exception with explanation, why the name is invalid. + * + * @param why the string, explaining why the name is invalid. + */ + public InvalidName(String why) + { + super(why); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java new file mode 100644 index 000000000..f1fb608d8 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java @@ -0,0 +1,126 @@ +/* InvalidNameHelper.java -- + Copyright (C) 2005, 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 org.omg.CosNaming.NamingContextPackage; + +import gnu.CORBA.Minor; +import gnu.CORBA.OrbRestricted; + +import org.omg.CORBA.Any; +import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; + +/** + * The helper operations for the {@link InvalidName} + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public abstract class InvalidNameHelper +{ + /** + * The {@link InvalidName} repository id. + */ + private static String _id = + "IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"; + + /** + * Extract the exception from the given {@link Any}. + */ + public static InvalidName extract(Any a) + { + try + { + return ((InvalidNameHolder) a.extract_Streamable()).value; + } + catch (ClassCastException ex) + { + BAD_OPERATION bad = new BAD_OPERATION(); + bad.initCause(ex); + bad.minor = Minor.Any; + throw bad; + } + } + + /** + * Return the exception repository id. + */ + public static String id() + { + return _id; + } + + /** + * Insert the exception into the given {@link Any}. + */ + public static void insert(Any a, InvalidName that) + { + a.insert_Streamable(new InvalidNameHolder(that)); + } + + /** + * Read the exception from the given CDR stream. + */ + public static InvalidName read(InputStream istream) + { + InvalidName value = new InvalidName(); + + // Read and discard the repository ID. + istream.read_string(); + return value; + } + + /** + * Create the type code for this exception. + */ + public static TypeCode type() + { + return OrbRestricted.Singleton.create_struct_tc(id(), + "InvalidName", new StructMember[0]); + } + + /** + * Write the exception to the CDR output stream. + */ + public static void write(OutputStream ostream, InvalidName value) + { + ostream.write_string(id()); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java new file mode 100644 index 000000000..180a09363 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/InvalidNameHolder.java @@ -0,0 +1,97 @@ +/* InvalidNameHolder.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * The holder for exception {@link InvalidName}. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class InvalidNameHolder + implements Streamable +{ + /** + * The stored value. + */ + public InvalidName value; + + /** + * Create the holder with unitialised value. + */ + public InvalidNameHolder() + { + } + + /** + * Create the holder, storing the given value. + */ + public InvalidNameHolder(InvalidName initialValue) + { + value = initialValue; + } + + /** + * Fill in the stored value, reading it from the given CDR stream. + */ + public void _read(InputStream in) + { + value = InvalidNameHelper.read(in); + } + + /** + * Get the type code of the {@link NotEmpty} exception. + */ + public TypeCode _type() + { + return InvalidNameHelper.type(); + } + + /** + * Write the stored value to the given CDR stream. + */ + public void _write(OutputStream out) + { + InvalidNameHelper.write(out, value); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java new file mode 100644 index 000000000..c80cfcc7a --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmpty.java @@ -0,0 +1,74 @@ +/* NotEmpty.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.UserException; +import org.omg.CORBA.portable.IDLEntity; + +/** + * This exception is thrown in response to the attemt to destroy + * the non tempty context. Only the empty context can be destroyed. + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class NotEmpty + extends UserException + implements IDLEntity +{ + /** + * Use serialVersionUID (v1.4) for interoperability. + */ + private static final long serialVersionUID = 7120362687417045881L; + + /** + * Create an exception with no message. + */ + public NotEmpty() + { + } + + /** + * Create an exception with explaining message. + * + * @since 1.4 + */ + public NotEmpty(String why) + { + super(why); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java new file mode 100644 index 000000000..c235205cd --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java @@ -0,0 +1,126 @@ +/* NotEmptyHelper.java -- + Copyright (C) 2005, 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 org.omg.CosNaming.NamingContextPackage; + +import gnu.CORBA.Minor; +import gnu.CORBA.OrbRestricted; + +import org.omg.CORBA.Any; +import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; + +/** + * The helper operations for the {@link NotEmpty}. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public abstract class NotEmptyHelper +{ + /** + * The {@link NotEmpty} repository id. + */ + private static String _id = + "IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0"; + + /** + * Extract the exception from the given {@link Any}. + */ + public static NotEmpty extract(Any a) + { + try + { + return ((NotEmptyHolder) a.extract_Streamable()).value; + } + catch (ClassCastException ex) + { + BAD_OPERATION bad = new BAD_OPERATION(); + bad.initCause(ex); + bad.minor = Minor.Any; + throw bad; + } + } + + /** + * Return the exception repository id. + */ + public static String id() + { + return _id; + } + + /** + * Insert the exception into the given {@link Any}. + */ + public static void insert(Any a, NotEmpty that) + { + a.insert_Streamable(new NotEmptyHolder(that)); + } + + /** + * Read the exception from the given CDR stream. + */ + public static NotEmpty read(InputStream istream) + { + NotEmpty value = new NotEmpty(); + + // Read and discard the repository ID. + istream.read_string(); + return value; + } + + /** + * Create the type code for this exception. + */ + public static TypeCode type() + { + return OrbRestricted.Singleton.create_struct_tc(id(), + "NotEmpty", new StructMember[0]); + } + + /** + * Write the exception to the CDR output stream. + */ + public static void write(OutputStream ostream, NotEmpty value) + { + ostream.write_string(id()); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java new file mode 100644 index 000000000..63a7f1bba --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotEmptyHolder.java @@ -0,0 +1,97 @@ +/* NotEmptyHolder.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * The holder for exception {@link NotEmpty}. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class NotEmptyHolder + implements Streamable +{ + /** + * The stored value. + */ + public NotEmpty value; + + /** + * Create the holder with unitialised value. + */ + public NotEmptyHolder() + { + } + + /** + * Create the holder, storing the given value. + */ + public NotEmptyHolder(NotEmpty initialValue) + { + value = initialValue; + } + + /** + * Fill in the stored value, reading it from the given CDR stream. + */ + public void _read(InputStream i) + { + value = NotEmptyHelper.read(i); + } + + /** + * Get the type code of the {@link NotEmpty} exception. + */ + public TypeCode _type() + { + return NotEmptyHelper.type(); + } + + /** + * Write the stored value to the given CDR stream. + */ + public void _write(OutputStream o) + { + NotEmptyHelper.write(o, value); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java new file mode 100644 index 000000000..4cbe7097d --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFound.java @@ -0,0 +1,101 @@ +/* NotFound.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.UserException; +import org.omg.CORBA.portable.IDLEntity; +import org.omg.CosNaming.NameComponent; + +/** +* The exception is thrown when the binding being searched does not exist +* or has the wrong type +* +* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) +*/ +public final class NotFound + extends UserException + implements IDLEntity +{ + /** + * Use serialVersionUID (v1.4) for interoperability. + */ + private static final long serialVersionUID = -7539098836265502514L; + + /** + * The reason, explaining, why the binding cannot be found. + * This might be either the missing node or the wrong binding type. + */ + public NotFoundReason why; + + /** + * Contains the remainder of the non working name. + */ + public NameComponent[] rest_of_name; + + /** + * Creates the exception with unitialised fields. + */ + public NotFound() + { + } + + /** + * Creates the exception, intialising the fields to the given values. + */ + public NotFound(NotFoundReason _why, NameComponent[] _rest_of_name) + { + why = _why; + rest_of_name = _rest_of_name; + } + + /** + * Creates the exception, intialising the fields to the given values and + * also providing the explaining string. + * + * @since 1.4 + */ + public NotFound(String explanation, NotFoundReason _why, + NameComponent[] _rest_of_name + ) + { + super(explanation); + why = _why; + rest_of_name = _rest_of_name; + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java new file mode 100644 index 000000000..034534a28 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java @@ -0,0 +1,142 @@ +/* NotFoundHelper.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import gnu.CORBA.Minor; +import gnu.CORBA.OrbRestricted; + +import org.omg.CORBA.Any; +import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.ORB; +import org.omg.CORBA.StructMember; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CosNaming.NameComponentHelper; +import org.omg.CosNaming.NameHelper; + +/** + * The helper operations for {@link NotFound}. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public abstract class NotFoundHelper +{ + /** + * The {@link NotFound} repository id. + */ + private static String _id = + "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"; + + /** + * Extract the exception from the given {@link Any}. + */ + public static NotFound extract(Any a) + { + try + { + return ((NotFoundHolder) a.extract_Streamable()).value; + } + catch (ClassCastException ex) + { + BAD_OPERATION bad = new BAD_OPERATION(); + bad.initCause(ex); + bad.minor = Minor.Any; + throw bad; + } + } + + /** + * Return the exception repository id. + */ + public static String id() + { + return _id; + } + + /** + * Insert the exception into the given {@link Any}. + */ + public static void insert(Any a, NotFound that) + { + a.insert_Streamable(new NotFoundHolder(that)); + } + + /** + * Read the exception from the given CDR stream. + */ + public static NotFound read(InputStream istream) + { + NotFound value = new NotFound(); + + // Read and discard the repository ID. + istream.read_string(); + value.why = NotFoundReasonHelper.read(istream); + value.rest_of_name = NameHelper.read(istream); + return value; + } + + /** + * Create the type code for this exception. + */ + public static TypeCode type() + { + ORB orb = OrbRestricted.Singleton; + + StructMember[] members = new StructMember[ 2 ]; + TypeCode member = null; + member = NotFoundReasonHelper.type(); + members [ 0 ] = new StructMember("why", member, null); + member = NameComponentHelper.type(); + member = orb.create_sequence_tc(0, member); + member = orb.create_alias_tc(NameHelper.id(), "Name", member); + members [ 1 ] = new StructMember("rest_of_name", member, null); + return orb.create_struct_tc(id(), "NotFound", members); + } + + /** + * Write the exception to the CDR output stream. + */ + public static void write(OutputStream ostream, NotFound value) + { + ostream.write_string(id()); + NotFoundReasonHelper.write(ostream, value.why); + NameHelper.write(ostream, value.rest_of_name); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java new file mode 100644 index 000000000..c9ec7b02f --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundHolder.java @@ -0,0 +1,97 @@ +/* NotFoundHolder.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * The holder for the {@link NotFound} exception. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public final class NotFoundHolder + implements Streamable +{ + /** + * The stored value. + */ + public NotFound value; + + /** + * Create the holder with unitialised value. + */ + public NotFoundHolder() + { + } + + /** + * Create the holder, storing the given value. + */ + public NotFoundHolder(NotFound initialValue) + { + value = initialValue; + } + + /** + * Fill in the stored value, reading it from the given CDR stream. + */ + public void _read(InputStream in) + { + value = NotFoundHelper.read(in); + } + + /** + * Get the type code of the {@link NotFound} exception. + */ + public TypeCode _type() + { + return NotFoundHelper.type(); + } + + /** + * Write the stored value to the given CDR stream. + */ + public void _write(OutputStream out) + { + NotFoundHelper.write(out, value); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java new file mode 100644 index 000000000..4bb5bdbf3 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java @@ -0,0 +1,134 @@ +/* NotFoundReason.java -- + Copyright (C) 2005 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.BAD_PARAM; +import org.omg.CORBA.portable.IDLEntity; + +/** + * Represents the reason (explanation), why the binding cannot be found. + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public class NotFoundReason + implements IDLEntity +{ + /** + * Use serialVersionUID (v1.4) for interoperability. + */ + private static final long serialVersionUID = -5689237060527596081L; + + /** + * The code for reason, when the node is missing. + */ + public static final int _missing_node = 0; + + /** + * The code for reason, when the binding type is object when + * it should be a context. + */ + public static final int _not_context = 1; + + /** + * The code for reason, when the binding type is context when + * it should be an object. + */ + public static final int _not_object = 2; + + /** + * The reason, when the node is missing. + */ + public static final NotFoundReason missing_node = + new NotFoundReason(_missing_node); + + /** + * The reason, when the binding type is object when it should be + * a context. + */ + public static final NotFoundReason not_context = + new NotFoundReason(_not_context); + + /** + * The reason, when the binding type is context when it should be + * and object. + */ + public static final NotFoundReason not_object = + new NotFoundReason(_not_object); + + /** + * The reason code for this instance. + */ + private int value; + + protected NotFoundReason(int a_value) + { + value = a_value; + } + + /** + * Get the reason object from the reason code. + * + * @throws BAD_PARAM for unsupported code. + */ + public static NotFoundReason from_int(int value) + { + switch (value) + { + case _missing_node : + return missing_node; + + case _not_context : + return not_context; + + case _not_object : + return not_object; + + default : + throw new BAD_PARAM("Unsupported not found reason: " + value); + } + } + + /** + * Get the reason code for this reason of not finding. + */ + public int value() + { + return value; + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java new file mode 100644 index 000000000..2648ae4a9 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java @@ -0,0 +1,128 @@ +/* NotFoundReasonHelper.java -- + Copyright (C) 2005, 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 org.omg.CosNaming.NamingContextPackage; + +import gnu.CORBA.Minor; +import gnu.CORBA.OrbRestricted; + +import org.omg.CORBA.Any; +import org.omg.CORBA.BAD_OPERATION; +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; + +/** + * The helper operations for {@link NotFoundReason} + * + * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) + */ +public abstract class NotFoundReasonHelper +{ + /** + * The {@link AlreadyBound} repository id. + */ + private static String _id = + "IDL:omg.org/CosNaming/NamingContext/NotFoundReason:1.0"; + + /** + * Extract the exception from the given {@link Any}. + */ + public static NotFoundReason extract(Any a) + { + try + { + return ((NotFoundReasonHolder) a.extract_Streamable()).value; + } + catch (ClassCastException ex) + { + BAD_OPERATION bad = new BAD_OPERATION(); + bad.initCause(ex); + bad.minor = Minor.Any; + throw bad; + } + } + + /** + * Return the exception repository id. + */ + public static String id() + { + return _id; + } + + /** + * Insert the exception into the given {@link Any}. + */ + public static void insert(Any a, NotFoundReason that) + { + a.insert_Streamable(new NotFoundReasonHolder(that)); + } + + /** + * Read the exception from the given CDR stream. + */ + public static NotFoundReason read(InputStream istream) + { + return NotFoundReason.from_int(istream.read_long()); + } + + /** + * Create the type code for this exception. + */ + public static TypeCode type() + { + return + OrbRestricted.Singleton.create_enum_tc(id(), "NotFoundReason", + new String[] + { + "missing_node", + "not_context", + "not_object" + } + ); + } + + /** + * Write the exception to the CDR output stream. + */ + public static void write(OutputStream ostream, NotFoundReason value) + { + ostream.write_long(value.value()); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java new file mode 100644 index 000000000..b4958499e --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java @@ -0,0 +1,100 @@ +/* NotFoundReasonHolder.java -- + Copyright (C) 2005, 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 org.omg.CosNaming.NamingContextPackage; + +import org.omg.CORBA.TypeCode; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** +* The holder for class {@link NotFoundReason}. +* +* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org) +*/ +public final class NotFoundReasonHolder + implements Streamable +{ + /** + * The stored value. + */ + public NotFoundReason value; + + /** + * Create the holder with unitialized value. + */ + public NotFoundReasonHolder() + { + } + + /** + * Create the holder, storing the given intial value. + */ + public NotFoundReasonHolder(NotFoundReason initialValue) + { + value = initialValue; + } + + /** + * Read the holder from the CDR input stream. + */ + public void _read(InputStream in) + { + value = NotFoundReasonHelper.read(in); + } + + /** + * Get the type code of {@link NotFoundReason}. + * + * @return the typecode of enumeration, allowed value names being + * "missing_node", "not_context" and "not_object" + */ + public TypeCode _type() + { + return NotFoundReasonHelper.type(); + } + + /** + * Write the holder to the CDR output stream. + */ + public void _write(OutputStream out) + { + NotFoundReasonHelper.write(out, value); + } +} diff --git a/libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html new file mode 100644 index 000000000..37c56e255 --- /dev/null +++ b/libjava/classpath/org/omg/CosNaming/NamingContextPackage/package.html @@ -0,0 +1,46 @@ + + + + +GNU Classpath - org.omg.CosNaming.NamingContextExtPackage + + +

Provides exceptions and several other satelitte classes, needed by the naming service.

+ + + -- cgit v1.2.3