From 04584c32ab98eb03c4d5306697133ebfc77707da Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Wed, 23 Mar 2005 21:00:01 +0000 Subject: 2005-03-23 Andrew John Hughes Merged HEAD --> generics for 2005-03-13 to 2005-03-23. 2005-03-23 Andrew John Hughes * gnu/xml/dom/html2/DomHTMLParser.java Changed 'enum' references to become 'enumeration'. 2005-03-22 Archie Cobbs * configure.ac: Generate scripts/classpath.spec. * scripts/classpath.spec.in: New file. 2005-03-21 Audrius Meskauskas * gnu/xml/dom/html2/DomHTMLParser.java: New file. * gnu/classpath/examples/html/Demo.java: New example. 2005-03-21 Sven de Marothy * gnu/classpath/SystemProperties.java, Add missing aliases for "UnicodeBigUnmarked" and UnicodeLittleUnmarked". 2005-03-21 Mark Wielaard * doc/www.gnu.org/events/escape_fosdem05.wml: Add link to kaffe presentation. 2005-03-19 Archie Cobbs * vm/reference/java/lang/VMClassLoader.java: handle ZIP files on the boot loader class path in getResources() 2005-03-19 Audrius Meskauskas * org/omg/CORBA/AnySeqHolder.java, org/omg/CORBA/AnySeqHelper.java, org/omg/CORBA/CompletionStatusHelper.java: New files. 2005-03-18 Mark Wielaard * doc/www/downloads/downloads.wml: Add 0.14. * doc/www/announce/20050226.wml: New file. 2005-03-18 Sven de Marothy * java/util/zip/GZIPInputStream.java: (GZIPInputStream): Read header in constructor. 2005-03-18 Audrius Meskauskas * ChangeLog.usermap: New file (replacing). 2005-03-18 Audrius Meskauskas * javax/swing/text/html/parser/Entity.java (getType): New method. * javax/swing/text/html/parser/DocumentParser.java: Inherit from javax.swing.text.html.parser.Parser. 2005-03-18 Robert Schuster * native/jni/java-nio/gnu_java_nio_VMSelector.c: Added important return statement after throwing exception. 2005-03-18 Robert Schuster * native/jni/java-nio/gnu_java_nio_VMSelector.c: Implemented Java_gnu_java_nio_VMSelector_select. * configure.ac: Added check for sys/select.h and strerro_r(). 2005-03-17 Mark Wielaard * doc/www.gnu.org/newsitems.txt: Add 0.14 release announcement and link for the dead of the gui branch. 2005-03-17 Chris Burdess * gnu/xml/dom/html2/DomHTMLDocument.java: Fixed element creation and check for HTML/XHTML namespace. 2005-03-16 Tom Tromey * gnu/java/lang/MainThread.java (MainThread): Load main class using system class loader. 2005-03-16 Archie Cobbs * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: use global native reference to wrap persistent jclass variable. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c: use DeleteLocalRef() to avoid exhausting local native references. 2005-03-16 Mark Wielaard * doc/vmintegration.texinfo: Change input start to \input. 2005-03-16 Robert Schuster * doc/vmintegration.texinfo: Added explanation of gnu.classpath.boot.library.path property. 2005-03-16 Robert Schuster * java/lang/Runtime.java: Added support for gnu.classpath.boot.library.path system property. 2005-03-14 Chris Burdess * gnu/xml/dom/DomImpl.java, gnu/xml/dom/html2/DomHTMLAnchorElement.java, gnu/xml/dom/html2/DomHTMLDocument.java, gnu/xml/dom/html2/DomHTMLElement.java, gnu/xml/dom/html2/DomHTMLFormElement.java, gnu/xml/dom/html2/DomHTMLFrameElement.java, gnu/xml/dom/html2/DomHTMLIFrameElement.java, gnu/xml/dom/html2/DomHTMLImpl.java, gnu/xml/dom/html2/DomHTMLInputElement.java, gnu/xml/dom/html2/DomHTMLObjectElement.java, gnu/xml/dom/html2/DomHTMLOptionElement.java, gnu/xml/dom/html2/DomHTMLSelectElement.java, gnu/xml/dom/html2/DomHTMLTableCellElement.java, gnu/xml/dom/html2/DomHTMLTableElement.java, gnu/xml/dom/html2/DomHTMLTableRowElement.java, gnu/xml/dom/html2/DomHTMLTableSectionElement.java, gnu/xml/dom/html2/DomHTMLTextAreaElement.java: JAXP integration, UI events, and tree utility functions. 2005-03-14 Patrik Reali * doc/www.gnu.org/newsitems.txt: news on gui branch and calientra * doc/www.gnu.org/docs/docs.wml: link to the wiki added * doc/www.gnu.org/faq/faq.wml: entry on tainted developers 2005-03-14 Audrius Meskauskas * javax/swing/text/html/parser/Parser.java, javax/swing/text/html/parser/Entity.java: Inheriting from DTDConstants. * javax/swing/text/html/parser/AttributeList.java (getValues): Changed return type. * javax/swing/text/html/parser/DocumentParser (parse): Adding the callback parameter that receives the parsing events. 2005-03-13 Mark Wielaard * configure.ac: Set version to 0.14+cvs. 2005-03-13 Audrius Meskauskas * org/omg/CORBA/BAD_CONTEXT.java, org/omg/CORBA/BAD_INV_ORDER.java, org/omg/CORBA/BAD_OPERATION.java, org/omg/CORBA/BAD_TYPECODE.java, org/omg/CORBA/COMM_FAILURE.java, org/omg/CORBA/DATA_CONVERSION.java, org/omg/CORBA/FREE_MEM.java, org/omg/CORBA/IMP_LIMIT.java, org/omg/CORBA/INITIALIZE.java, org/omg/CORBA/INTERNAL.java, org/omg/CORBA/INTF_REPOS.java, org/omg/CORBA/INVALID_TRANSACTION.java, org/omg/CORBA/INV_FLAG.java, org/omg/CORBA/INV_IDENT.java, org/omg/CORBA/INV_OBJREF.java, org/omg/CORBA/INV_POLICY.java, org/omg/CORBA/NO_IMPLEMENT.java, org/omg/CORBA/NO_MEMORY.java, org/omg/CORBA/NO_PERMISSION.java, org/omg/CORBA/NO_RESPONSE.java, org/omg/CORBA/OBJECT_NOT_EXIST.java, org/omg/CORBA/OBJ_ADAPTER.java, org/omg/CORBA/PERSIST_STORE.java, org/omg/CORBA/TRANSACTION_REQUIRED.java, org/omg/CORBA/TRANSACTION_ROLLEDBACK.java, org/omg/CORBA/TRANSIENT.java: making constructors public. 2005-03-13 Audrius Meskauskas * org/omg/CORBA/StringSeqHolder.java, org/omg/CORBA/WStringSeqHolder.java: replacing replacing CR CR LF by CR LF. * org/omg/CORBA/BAD_PARAM.java: making constructors public. 2005-03-13 Michael Koch * org/omg/CORBA/ARG_IN.java: Removed redundant modifiers. * org/omg/CORBA/ARG_INOUT.java: Likewise. * org/omg/CORBA/ARG_OUT.java: Likewise. * org/omg/CORBA/Any.java: Fixed HTML tags. * org/omg/CORBA/Principal.java: Likewise. * org/omg/CORBA/BAD_PARAM.java: Reordered modifiers. * org/omg/CORBA/FixedHolder.java: Reworked imports. * org/omg/CORBA/StringSeqHolder.java: Likewise. * org/omg/CORBA/TypeCode.java: Likewise. * org/omg/CORBA/TypeCodePackage/BadKind.java: Likewise. * org/omg/CORBA/TypeCodePackage/Bounds.java: Likewise. * org/omg/CORBA/WStringSeqHolder.java: Likewise. * org/omg/CORBA/portable/OutputStream.java: Likewise. 2005-03-13 Michael Koch * gnu/java/net/protocol/https/Handler.java: Reworked import statements. 2005-03-13 Michael Koch * gnu/javax/swing/text/html/parser/HTML_401F.java, gnu/javax/swing/text/html/parser/gnuDTD.java, gnu/javax/swing/text/html/parser/models/node.java: Reworked import statements. 2005-03-13 Michael Koch * gnu/xml/aelfred2/XmlParser.java: Fixed typo. And from the previous merge... 2005-03-13 Andrew John Hughes * gnu/javax/swing/text/html/parser/htmlAttributeSet.java: (getAttributeNames()): Replaced 'enum' with 'enumeration'. * gnu/javax/swing/text/html/parser/htmlValidator.java: (validateParameters(TagElement,htmlAttributeSet)): Replaced 'enum' with 'enumeration'. (validateAttribute(TagElement,htmlAttributeSet, Enumeration,Enumeration)): Likewise. --- org/omg/CORBA/ARG_IN.java | 2 +- org/omg/CORBA/ARG_INOUT.java | 2 +- org/omg/CORBA/ARG_OUT.java | 2 +- org/omg/CORBA/Any.java | 4 +- org/omg/CORBA/AnySeqHelper.java | 147 ++++++++++++++++ org/omg/CORBA/AnySeqHolder.java | 128 ++++++++++++++ org/omg/CORBA/BAD_CONTEXT.java | 4 +- org/omg/CORBA/BAD_INV_ORDER.java | 4 +- org/omg/CORBA/BAD_OPERATION.java | 4 +- org/omg/CORBA/BAD_PARAM.java | 6 +- org/omg/CORBA/BAD_TYPECODE.java | 4 +- org/omg/CORBA/COMM_FAILURE.java | 4 +- org/omg/CORBA/CompletionStatusHelper.java | 116 +++++++++++++ org/omg/CORBA/DATA_CONVERSION.java | 4 +- org/omg/CORBA/FREE_MEM.java | 4 +- org/omg/CORBA/FixedHolder.java | 4 +- org/omg/CORBA/IMP_LIMIT.java | 4 +- org/omg/CORBA/INITIALIZE.java | 4 +- org/omg/CORBA/INTERNAL.java | 4 +- org/omg/CORBA/INTF_REPOS.java | 4 +- org/omg/CORBA/INVALID_TRANSACTION.java | 4 +- org/omg/CORBA/INV_FLAG.java | 4 +- org/omg/CORBA/INV_IDENT.java | 4 +- org/omg/CORBA/INV_OBJREF.java | 4 +- org/omg/CORBA/INV_POLICY.java | 4 +- org/omg/CORBA/NO_IMPLEMENT.java | 4 +- org/omg/CORBA/NO_MEMORY.java | 4 +- org/omg/CORBA/NO_PERMISSION.java | 4 +- org/omg/CORBA/NO_RESPONSE.java | 4 +- org/omg/CORBA/OBJECT_NOT_EXIST.java | 4 +- org/omg/CORBA/OBJ_ADAPTER.java | 4 +- org/omg/CORBA/PERSIST_STORE.java | 4 +- org/omg/CORBA/Principal.java | 2 +- org/omg/CORBA/StringSeqHolder.java | 262 ++++++++++++++--------------- org/omg/CORBA/TRANSACTION_REQUIRED.java | 4 +- org/omg/CORBA/TRANSACTION_ROLLEDBACK.java | 4 +- org/omg/CORBA/TRANSIENT.java | 4 +- org/omg/CORBA/TypeCode.java | 6 +- org/omg/CORBA/TypeCodePackage/BadKind.java | 4 +- org/omg/CORBA/TypeCodePackage/Bounds.java | 4 +- org/omg/CORBA/WStringSeqHolder.java | 262 ++++++++++++++--------------- org/omg/CORBA/portable/OutputStream.java | 4 +- 42 files changed, 725 insertions(+), 334 deletions(-) create mode 100644 org/omg/CORBA/AnySeqHelper.java create mode 100644 org/omg/CORBA/AnySeqHolder.java create mode 100644 org/omg/CORBA/CompletionStatusHelper.java (limited to 'org') diff --git a/org/omg/CORBA/ARG_IN.java b/org/omg/CORBA/ARG_IN.java index aed995c51..d0ca77e6e 100644 --- a/org/omg/CORBA/ARG_IN.java +++ b/org/omg/CORBA/ARG_IN.java @@ -51,5 +51,5 @@ public interface ARG_IN * The flag, specifying that the parameter is used to pass and not to * return the data. */ - static final int value = 1; + int value = 1; } diff --git a/org/omg/CORBA/ARG_INOUT.java b/org/omg/CORBA/ARG_INOUT.java index 2f06909bc..2103e4fb8 100644 --- a/org/omg/CORBA/ARG_INOUT.java +++ b/org/omg/CORBA/ARG_INOUT.java @@ -53,5 +53,5 @@ public interface ARG_INOUT * The constant, specifying that the parameter is used both * to pass and to return the data. */ - static final int value = 3; + int value = 3; } diff --git a/org/omg/CORBA/ARG_OUT.java b/org/omg/CORBA/ARG_OUT.java index 06fca771c..3518dadc4 100644 --- a/org/omg/CORBA/ARG_OUT.java +++ b/org/omg/CORBA/ARG_OUT.java @@ -51,5 +51,5 @@ public interface ARG_OUT * The flag, indicating that the parameter is used to return, and * not to pass the data. */ - static final int value = 2; + int value = 2; } diff --git a/org/omg/CORBA/Any.java b/org/omg/CORBA/Any.java index a4f5e8526..7187ae4ed 100644 --- a/org/omg/CORBA/Any.java +++ b/org/omg/CORBA/Any.java @@ -125,7 +125,7 @@ public abstract class Any throws BAD_OPERATION; /** - * Extract another code>Any from this Any. + * Extract another Any from this Any. * * @throws BAD_OPERATION if this instance contains value other * than any or the value has not been set. @@ -435,7 +435,7 @@ public abstract class Any /** * Writes out the value (without the typecode of the value), stored in - * this Any. + * this Any. * * @param output the CORBA stream to write into. * diff --git a/org/omg/CORBA/AnySeqHelper.java b/org/omg/CORBA/AnySeqHelper.java new file mode 100644 index 000000000..8a8fdf1bf --- /dev/null +++ b/org/omg/CORBA/AnySeqHelper.java @@ -0,0 +1,147 @@ +/* AnySeqHelper.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., 59 Temple Place, Suite 330, Boston, MA +02111-1307 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.CORBA; + +import gnu.CORBA.primitiveArrayTypeCode; + +import org.omg.CORBA.TypeCodePackage.BadKind; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; + +/** + * Provides static helper methods for working with + * the array of the type {@link Any} (not with the "any array"). + * + * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) + */ +public abstract class AnySeqHelper +{ + /** + * Extract the array of {@link Any}'s from the + * given {@link Any}. This implementation expects the + * {@link Any} to hold the instance of {@link AnySeqHolder} + * that is returned by {@link Any#extract_Streamable() }. + * + * @param a an Any to extract the array from. + * + * @return the extracted array. + * + * @throws ClassCastException if the Any contains something other than the + * the {@link AnySeqHolder}. + */ + public static Any[] extract(Any a) + { + AnySeqHolder h = (AnySeqHolder) a.extract_Streamable(); + return h.value; + } + + /** + * Returns the agreed Id, delegating functionality to + * the {@link #type()}.id(). + */ + public static String id() + { + try + { + return type().id(); + } + catch (BadKind ex) + { + // Should never happen under correct work. + throw new Error("Please report this bug.", ex); + } + } + + /** + * Insert into the given {@link Any}[] into the + * given {@link Any}. This implementation first creates + * a {@link AnySeqHolder} and then calls + * {@link Any#insert_Streamable(Streamable)}. + * + * @param into the target Any. + * @param that the array to insert. + */ + public static void insert(Any into, Any[] that) + { + AnySeqHolder holder = new AnySeqHolder(that); + into.insert_Streamable(holder); + } + + /** + * Reads the {@link Any}[] from the CORBA input stream. + * This implementation first creates an instance of + * {@link AnySeqHolder} and then delegates functionality + * to its _read() method. + * + * @param input the CORBA (not java.io) stream to read from. + * @return the value from the stream. + */ + public static Any[] read(InputStream input) + { + AnySeqHolder h = new AnySeqHolder(); + h._read(input); + return h.value; + } + + /** + * Creates and returns a new instance of the TypeCode, + * corresponding the array of {@link Any}'s. + * The length of the sequence is left with the initial + * value 0. + */ + public static TypeCode type() + { + return new primitiveArrayTypeCode(TCKind.tk_any); + } + + /** + * Writes the array of {@link Any}'s into the given stream. + * This implementation first creates an instance of + * {@link AnySeqHolder} and then delegates functionality + * to its _write() method. + * + * @param output the CORBA (not java.io) output stream to write. + * @param value the value that must be written. + */ + public static void write(OutputStream output, Any[] value) + { + AnySeqHolder h = new AnySeqHolder(value); + h._write(output); + } +} diff --git a/org/omg/CORBA/AnySeqHolder.java b/org/omg/CORBA/AnySeqHolder.java new file mode 100644 index 000000000..2bc9a3e9b --- /dev/null +++ b/org/omg/CORBA/AnySeqHolder.java @@ -0,0 +1,128 @@ +/* AnySeqHolder.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., 59 Temple Place, Suite 330, Boston, MA +02111-1307 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.CORBA; + +import gnu.CORBA.primitiveArrayTypeCode; + +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * A sequence holder for CORBA AnySeq that is mapped into + * java Any[]. + * + * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) + */ +public final class AnySeqHolder + implements Streamable +{ + /** + * The Any[] (CORBA AnySeq) value, + * held by this AnySeqHolder. + */ + public Any[] value; + + /** + * The type code for this holder. Each holder has a different instance. + */ + private final primitiveArrayTypeCode typecode = + new primitiveArrayTypeCode(TCKind.tk_any); + + /** + * Constructs an instance of AnySeqHolder, + * initializing {@link #value} to null. + */ + public AnySeqHolder() + { + } + + /** + * Constructs an instance of AnySeqHolder, + * initializing {@link #value} to the given array + */ + public AnySeqHolder(Any [] a_value) + { + value = a_value; + } + + /** + * Fill in the {@link value } field by reading the required data + * from the given stream. This method first reads the array size + * (as CORBA longand then all Any's. + * + * @param input the input stream to read from. + */ + public void _read(InputStream input) + { + value = new Any[ input.read_long() ]; + for (int i = 0; i < value.length; i++) + { + value [ i ] = input.read_any(); + } + typecode.setLength(value.length); + } + + /** + * Returns the TypeCode, corresponding the CORBA type that is stored + * using this holder. + */ + public TypeCode _type() + { + return typecode; + } + + /** + * Write the {@link value } field to the given stream. + * This method first writes the array size + * (as CORBA long and then all Any's. + * + * @param output the output stream to write into. + */ + public void _write(OutputStream output) + { + output.write_long(value.length); + + for (int i = 0; i < value.length; i++) + { + output.write_any(value [ i ]); + } + } + +} diff --git a/org/omg/CORBA/BAD_CONTEXT.java b/org/omg/CORBA/BAD_CONTEXT.java index f99ea8351..1a1683235 100644 --- a/org/omg/CORBA/BAD_CONTEXT.java +++ b/org/omg/CORBA/BAD_CONTEXT.java @@ -79,7 +79,7 @@ public class BAD_CONTEXT * @param minor additional error code. * @param completed the method completion status. */ - BAD_CONTEXT(int minor, CompletionStatus completed) + public BAD_CONTEXT(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class BAD_CONTEXT * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - BAD_CONTEXT(String reason, int minor, CompletionStatus completed) + public BAD_CONTEXT(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/BAD_INV_ORDER.java b/org/omg/CORBA/BAD_INV_ORDER.java index 002c9be0d..392ecc466 100644 --- a/org/omg/CORBA/BAD_INV_ORDER.java +++ b/org/omg/CORBA/BAD_INV_ORDER.java @@ -78,7 +78,7 @@ public class BAD_INV_ORDER * @param minor additional error code. * @param completed the method completion status. */ - BAD_INV_ORDER(int minor, CompletionStatus completed) + public BAD_INV_ORDER(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class BAD_INV_ORDER * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - BAD_INV_ORDER(String reason, int minor, CompletionStatus completed) + public BAD_INV_ORDER(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/BAD_OPERATION.java b/org/omg/CORBA/BAD_OPERATION.java index 04475d58e..41f49ea8c 100755 --- a/org/omg/CORBA/BAD_OPERATION.java +++ b/org/omg/CORBA/BAD_OPERATION.java @@ -79,7 +79,7 @@ public class BAD_OPERATION * @param minor additional error code. * @param completed the method completion status. */ - BAD_OPERATION(int minor, CompletionStatus completed) + public BAD_OPERATION(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class BAD_OPERATION * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - BAD_OPERATION(String reason, int minor, CompletionStatus completed) + public BAD_OPERATION(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/BAD_PARAM.java b/org/omg/CORBA/BAD_PARAM.java index 32935f46f..ae9bdd01a 100644 --- a/org/omg/CORBA/BAD_PARAM.java +++ b/org/omg/CORBA/BAD_PARAM.java @@ -62,7 +62,7 @@ public class BAD_PARAM /** * Use serialVersionUID for interoperability. */ - private final static long serialVersionUID = 1917109334939470379L; + private static final long serialVersionUID = 1917109334939470379L; /** * Creates BAD_PARAM with the default minor code of 0 and a @@ -78,7 +78,7 @@ public class BAD_PARAM * @param minor additional error code. * @param completed the method completion status. */ - BAD_PARAM(int minor, CompletionStatus completed) + public BAD_PARAM(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class BAD_PARAM * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - BAD_PARAM(String reason, int minor, CompletionStatus completed) + public BAD_PARAM(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/BAD_TYPECODE.java b/org/omg/CORBA/BAD_TYPECODE.java index c46da3b57..a89d5ec23 100644 --- a/org/omg/CORBA/BAD_TYPECODE.java +++ b/org/omg/CORBA/BAD_TYPECODE.java @@ -79,7 +79,7 @@ public class BAD_TYPECODE * @param minor additional error code. * @param completed the method completion status. */ - BAD_TYPECODE(int minor, CompletionStatus completed) + public BAD_TYPECODE(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class BAD_TYPECODE * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - BAD_TYPECODE(String reason, int minor, CompletionStatus completed) + public BAD_TYPECODE(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/COMM_FAILURE.java b/org/omg/CORBA/COMM_FAILURE.java index fa945ba1c..b89d8d0f8 100644 --- a/org/omg/CORBA/COMM_FAILURE.java +++ b/org/omg/CORBA/COMM_FAILURE.java @@ -79,7 +79,7 @@ public class COMM_FAILURE * @param minor additional error code. * @param completed the method completion status. */ - COMM_FAILURE(int minor, CompletionStatus completed) + public COMM_FAILURE(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class COMM_FAILURE * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - COMM_FAILURE(String reason, int minor, CompletionStatus completed) + public COMM_FAILURE(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/CompletionStatusHelper.java b/org/omg/CORBA/CompletionStatusHelper.java new file mode 100644 index 000000000..599f0a6b1 --- /dev/null +++ b/org/omg/CORBA/CompletionStatusHelper.java @@ -0,0 +1,116 @@ +/* CompletionStatusHelper.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., 59 Temple Place, Suite 330, Boston, MA +02111-1307 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.CORBA; + +import gnu.CORBA.primitiveArrayTypeCode; + +import org.omg.CORBA.TypeCodePackage.BadKind; +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; + +/** + * Provides static helper methods for working with + * {@link CompletionStatus}. + * + * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) + */ +public abstract class CompletionStatusHelper +{ + /** + * Extract the {@link CompletionStatus} from the + * given {@link Any}. This implementation expects + * the integer (Corba long) value, stating the completion + * status. + * + * @param a an Any to extract the completion status from. + * + * @return completion status + */ + public static CompletionStatus extract(Any a) + { + return CompletionStatus.from_int(a.extract_long()); + } + + /** + * Returns the agreed Id. + * @return IDL:omg.org/CORBA/CompletionStatus:1.0, always. + */ + public static String id() + { + return "IDL:omg.org/CORBA/CompletionStatus:1.0"; + } + + /** + * Insert into the given {@link CompletionStatus} into the + * given {@link Any}. This implementation inserts it as an + * integer (CORBA long). + * + * @param into the target Any. + * @param that the {@link CompletionStatus} to insert. + */ + public static void insert(Any into, CompletionStatus that) + { + into.insert_long(that.value()); + } + + /** + * Reads the {@link CompletionStatus} from the CORBA input stream. + * This implementation reads an an integer (CORBA long). + * + * @param input the CORBA (not java.io) stream to read from. + * @return the value from the stream. + */ + public static CompletionStatus read(InputStream input) + { + return CompletionStatus.from_int(input.read_long()); + } + + /** + * Writes the {@link CompletionStatus} into the given stream. + * This implementation writes an int (CORBA long), corresponding + * the status of completion. + * + * @param output the CORBA (not java.io) output stream to write. + * @param status the value that must be written. + */ + public static void write(OutputStream output, CompletionStatus status) + { + output.write_long(status.value()); + } +} diff --git a/org/omg/CORBA/DATA_CONVERSION.java b/org/omg/CORBA/DATA_CONVERSION.java index b0eac5621..0d9f85d47 100644 --- a/org/omg/CORBA/DATA_CONVERSION.java +++ b/org/omg/CORBA/DATA_CONVERSION.java @@ -79,7 +79,7 @@ public class DATA_CONVERSION * @param minor additional error code. * @param completed the method completion status. */ - DATA_CONVERSION(int minor, CompletionStatus completed) + public DATA_CONVERSION(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class DATA_CONVERSION * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - DATA_CONVERSION(String reason, int minor, CompletionStatus completed) + public DATA_CONVERSION(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/FREE_MEM.java b/org/omg/CORBA/FREE_MEM.java index 55563907f..2514f6961 100644 --- a/org/omg/CORBA/FREE_MEM.java +++ b/org/omg/CORBA/FREE_MEM.java @@ -78,7 +78,7 @@ public class FREE_MEM * @param minor additional error code. * @param completed the method completion status. */ - FREE_MEM(int minor, CompletionStatus completed) + public FREE_MEM(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class FREE_MEM * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - FREE_MEM(String reason, int minor, CompletionStatus completed) + public FREE_MEM(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/FixedHolder.java b/org/omg/CORBA/FixedHolder.java index e92041d2b..6fbc4716f 100644 --- a/org/omg/CORBA/FixedHolder.java +++ b/org/omg/CORBA/FixedHolder.java @@ -40,12 +40,12 @@ package org.omg.CORBA; import gnu.CORBA.primitiveTypeCode; +import java.math.BigDecimal; + import org.omg.CORBA.portable.InputStream; import org.omg.CORBA.portable.OutputStream; import org.omg.CORBA.portable.Streamable; -import java.math.BigDecimal; - /** * A holder for CORBA fixed that is mapped into * java BigDecimal. diff --git a/org/omg/CORBA/IMP_LIMIT.java b/org/omg/CORBA/IMP_LIMIT.java index b3b956922..5513458e9 100644 --- a/org/omg/CORBA/IMP_LIMIT.java +++ b/org/omg/CORBA/IMP_LIMIT.java @@ -79,7 +79,7 @@ public class IMP_LIMIT * @param minor additional error code. * @param completed the method completion status. */ - IMP_LIMIT(int minor, CompletionStatus completed) + public IMP_LIMIT(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class IMP_LIMIT * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - IMP_LIMIT(String reason, int minor, CompletionStatus completed) + public IMP_LIMIT(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INITIALIZE.java b/org/omg/CORBA/INITIALIZE.java index 9ba0b3901..93fd621d7 100644 --- a/org/omg/CORBA/INITIALIZE.java +++ b/org/omg/CORBA/INITIALIZE.java @@ -78,7 +78,7 @@ public class INITIALIZE * @param minor additional error code. * @param completed the method completion status. */ - INITIALIZE(int minor, CompletionStatus completed) + public INITIALIZE(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INITIALIZE * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INITIALIZE(String reason, int minor, CompletionStatus completed) + public INITIALIZE(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INTERNAL.java b/org/omg/CORBA/INTERNAL.java index 56027e0db..4dd7a4827 100644 --- a/org/omg/CORBA/INTERNAL.java +++ b/org/omg/CORBA/INTERNAL.java @@ -78,7 +78,7 @@ public class INTERNAL * @param minor additional error code. * @param completed the method completion status. */ - INTERNAL(int minor, CompletionStatus completed) + public INTERNAL(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INTERNAL * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INTERNAL(String reason, int minor, CompletionStatus completed) + public INTERNAL(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INTF_REPOS.java b/org/omg/CORBA/INTF_REPOS.java index 4f3867980..6715099b8 100644 --- a/org/omg/CORBA/INTF_REPOS.java +++ b/org/omg/CORBA/INTF_REPOS.java @@ -78,7 +78,7 @@ public class INTF_REPOS * @param minor additional error code. * @param completed the method completion status. */ - INTF_REPOS(int minor, CompletionStatus completed) + public INTF_REPOS(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INTF_REPOS * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INTF_REPOS(String reason, int minor, CompletionStatus completed) + public INTF_REPOS(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INVALID_TRANSACTION.java b/org/omg/CORBA/INVALID_TRANSACTION.java index 2387d612a..fad8e3600 100644 --- a/org/omg/CORBA/INVALID_TRANSACTION.java +++ b/org/omg/CORBA/INVALID_TRANSACTION.java @@ -78,7 +78,7 @@ public class INVALID_TRANSACTION * @param minor additional error code. * @param completed the method completion status. */ - INVALID_TRANSACTION(int minor, CompletionStatus completed) + public INVALID_TRANSACTION(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INVALID_TRANSACTION * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INVALID_TRANSACTION(String reason, int minor, CompletionStatus completed) + public INVALID_TRANSACTION(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INV_FLAG.java b/org/omg/CORBA/INV_FLAG.java index a4804624a..32510a80d 100644 --- a/org/omg/CORBA/INV_FLAG.java +++ b/org/omg/CORBA/INV_FLAG.java @@ -78,7 +78,7 @@ public class INV_FLAG * @param minor additional error code. * @param completed the method completion status. */ - INV_FLAG(int minor, CompletionStatus completed) + public INV_FLAG(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INV_FLAG * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INV_FLAG(String reason, int minor, CompletionStatus completed) + public INV_FLAG(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INV_IDENT.java b/org/omg/CORBA/INV_IDENT.java index 487e50d11..733a1c543 100644 --- a/org/omg/CORBA/INV_IDENT.java +++ b/org/omg/CORBA/INV_IDENT.java @@ -78,7 +78,7 @@ public class INV_IDENT * @param minor additional error code. * @param completed the method completion status. */ - INV_IDENT(int minor, CompletionStatus completed) + public INV_IDENT(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INV_IDENT * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INV_IDENT(String reason, int minor, CompletionStatus completed) + public INV_IDENT(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INV_OBJREF.java b/org/omg/CORBA/INV_OBJREF.java index 146e80b2a..d43ff4be3 100644 --- a/org/omg/CORBA/INV_OBJREF.java +++ b/org/omg/CORBA/INV_OBJREF.java @@ -78,7 +78,7 @@ public class INV_OBJREF * @param minor additional error code. * @param completed the method completion status. */ - INV_OBJREF(int minor, CompletionStatus completed) + public INV_OBJREF(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class INV_OBJREF * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INV_OBJREF(String reason, int minor, CompletionStatus completed) + public INV_OBJREF(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/INV_POLICY.java b/org/omg/CORBA/INV_POLICY.java index 387f3f498..1e0ccca11 100644 --- a/org/omg/CORBA/INV_POLICY.java +++ b/org/omg/CORBA/INV_POLICY.java @@ -80,7 +80,7 @@ public class INV_POLICY * @param minor additional error code. * @param completed the method completion status. */ - INV_POLICY(int minor, CompletionStatus completed) + public INV_POLICY(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -91,7 +91,7 @@ public class INV_POLICY * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - INV_POLICY(String reason, int minor, CompletionStatus completed) + public INV_POLICY(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/NO_IMPLEMENT.java b/org/omg/CORBA/NO_IMPLEMENT.java index 6b7a9ab3b..bb426b958 100644 --- a/org/omg/CORBA/NO_IMPLEMENT.java +++ b/org/omg/CORBA/NO_IMPLEMENT.java @@ -79,7 +79,7 @@ public class NO_IMPLEMENT * @param minor additional error code. * @param completed the method completion status. */ - NO_IMPLEMENT(int minor, CompletionStatus completed) + public NO_IMPLEMENT(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class NO_IMPLEMENT * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - NO_IMPLEMENT(String reason, int minor, CompletionStatus completed) + public NO_IMPLEMENT(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/NO_MEMORY.java b/org/omg/CORBA/NO_MEMORY.java index bda5209b3..4ae0ace86 100644 --- a/org/omg/CORBA/NO_MEMORY.java +++ b/org/omg/CORBA/NO_MEMORY.java @@ -78,7 +78,7 @@ public class NO_MEMORY * @param minor additional error code. * @param completed the method completion status. */ - NO_MEMORY(int minor, CompletionStatus completed) + public NO_MEMORY(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class NO_MEMORY * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - NO_MEMORY(String reason, int minor, CompletionStatus completed) + public NO_MEMORY(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/NO_PERMISSION.java b/org/omg/CORBA/NO_PERMISSION.java index 4233d6619..c8b8d19db 100644 --- a/org/omg/CORBA/NO_PERMISSION.java +++ b/org/omg/CORBA/NO_PERMISSION.java @@ -78,7 +78,7 @@ public class NO_PERMISSION * @param minor additional error code. * @param completed the method completion status. */ - NO_PERMISSION(int minor, CompletionStatus completed) + public NO_PERMISSION(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class NO_PERMISSION * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - NO_PERMISSION(String reason, int minor, CompletionStatus completed) + public NO_PERMISSION(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/NO_RESPONSE.java b/org/omg/CORBA/NO_RESPONSE.java index 25b1ed20a..5a8613f4e 100644 --- a/org/omg/CORBA/NO_RESPONSE.java +++ b/org/omg/CORBA/NO_RESPONSE.java @@ -79,7 +79,7 @@ public class NO_RESPONSE * @param minor additional error code. * @param completed the method completion status. */ - NO_RESPONSE(int minor, CompletionStatus completed) + public NO_RESPONSE(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class NO_RESPONSE * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - NO_RESPONSE(String reason, int minor, CompletionStatus completed) + public NO_RESPONSE(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/OBJECT_NOT_EXIST.java b/org/omg/CORBA/OBJECT_NOT_EXIST.java index 3466f7140..18c3932bf 100644 --- a/org/omg/CORBA/OBJECT_NOT_EXIST.java +++ b/org/omg/CORBA/OBJECT_NOT_EXIST.java @@ -77,7 +77,7 @@ public class OBJECT_NOT_EXIST * @param minor additional error code. * @param completed the method completion status. */ - OBJECT_NOT_EXIST(int minor, CompletionStatus completed) + public OBJECT_NOT_EXIST(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -88,7 +88,7 @@ public class OBJECT_NOT_EXIST * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - OBJECT_NOT_EXIST(String reason, int minor, CompletionStatus completed) + public OBJECT_NOT_EXIST(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/OBJ_ADAPTER.java b/org/omg/CORBA/OBJ_ADAPTER.java index c39efe8fb..26acb9026 100644 --- a/org/omg/CORBA/OBJ_ADAPTER.java +++ b/org/omg/CORBA/OBJ_ADAPTER.java @@ -78,7 +78,7 @@ public class OBJ_ADAPTER * @param minor additional error code. * @param completed the method completion status. */ - OBJ_ADAPTER(int minor, CompletionStatus completed) + public OBJ_ADAPTER(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class OBJ_ADAPTER * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - OBJ_ADAPTER(String reason, int minor, CompletionStatus completed) + public OBJ_ADAPTER(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/PERSIST_STORE.java b/org/omg/CORBA/PERSIST_STORE.java index ea31d1f71..c9b60561c 100644 --- a/org/omg/CORBA/PERSIST_STORE.java +++ b/org/omg/CORBA/PERSIST_STORE.java @@ -78,7 +78,7 @@ public class PERSIST_STORE * @param minor additional error code. * @param completed the method completion status. */ - PERSIST_STORE(int minor, CompletionStatus completed) + public PERSIST_STORE(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class PERSIST_STORE * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - PERSIST_STORE(String reason, int minor, CompletionStatus completed) + public PERSIST_STORE(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/Principal.java b/org/omg/CORBA/Principal.java index e75c6d80e..b5fed2653 100644 --- a/org/omg/CORBA/Principal.java +++ b/org/omg/CORBA/Principal.java @@ -40,7 +40,7 @@ package org.omg.CORBA; /** * This class was used to store the client identity in the past. - * The client identity is stored in the form of the byte + * The client identity is stored in the form of the byte * array. * * @deprecated by CORBA 2.2. diff --git a/org/omg/CORBA/StringSeqHolder.java b/org/omg/CORBA/StringSeqHolder.java index 0844ce80a..22514207c 100755 --- a/org/omg/CORBA/StringSeqHolder.java +++ b/org/omg/CORBA/StringSeqHolder.java @@ -1,131 +1,131 @@ -/* StringSeqHolder.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., 59 Temple Place, Suite 330, Boston, MA -02111-1307 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.CORBA; - -import gnu.CORBA.*; - -import org.omg.CORBA.portable.InputStream; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.Streamable; - -/** - * A sequence holder for CORBA string[] that is mapped into - * java String[]. - * - * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) - */ -public final class StringSeqHolder - implements Streamable -{ - /** - * The String[] (CORBA string[]) value, - * held by this StringSeqHolder. - */ - public String[] value; - - /** - * The type code for this holder. Each holder has a different instance. - */ - private final primitiveArrayTypeCode typecode = - new primitiveArrayTypeCode(TCKind.tk_char); - - /** - * Constructs an instance of StringSeqHolder, - * initializing {@link #value} to null. - */ - public StringSeqHolder() - { - } - - /** - * Constructs an instance of StringSeqHolder, - * initializing {@link #value} to the given String. - * - * @param initial_value a value that will be assigned to the - * {@link #value} field. - */ - public StringSeqHolder(String[] initial_value) - { - value = initial_value; - typecode.setLength(value.length); - } - - /** - * Fill in the {@link value } field by reading the required data - * from the given stream. This method first reads the array size - * (as CORBA longand then all strings. - * - * @param input the input stream to read from. - */ - public void _read(InputStream input) - { - value = new String[ input.read_long() ]; - for (int i = 0; i < value.length; i++) - { - value [ i ] = input.read_wstring(); - } - typecode.setLength(value.length); - } - - /** - * Returns the TypeCode, corresponding the CORBA type that is stored - * using this holder. - */ - public TypeCode _type() - { - return typecode; - } - - /** - * Write the {@link value } field to the given stream. - * This method first writes the array size - * (as CORBA long and then all strings. - * - * @param output the output stream to write into. - */ - public void _write(OutputStream output) - { - output.write_long(value.length); - - for (int i = 0; i < value.length; i++) - { - output.write_wstring(value [ i ]); - } - } -} +/* StringSeqHolder.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., 59 Temple Place, Suite 330, Boston, MA +02111-1307 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.CORBA; + +import gnu.CORBA.primitiveArrayTypeCode; + +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * A sequence holder for CORBA string[] that is mapped into + * java String[]. + * + * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) + */ +public final class StringSeqHolder + implements Streamable +{ + /** + * The String[] (CORBA string[]) value, + * held by this StringSeqHolder. + */ + public String[] value; + + /** + * The type code for this holder. Each holder has a different instance. + */ + private final primitiveArrayTypeCode typecode = + new primitiveArrayTypeCode(TCKind.tk_char); + + /** + * Constructs an instance of StringSeqHolder, + * initializing {@link #value} to null. + */ + public StringSeqHolder() + { + } + + /** + * Constructs an instance of StringSeqHolder, + * initializing {@link #value} to the given String. + * + * @param initial_value a value that will be assigned to the + * {@link #value} field. + */ + public StringSeqHolder(String[] initial_value) + { + value = initial_value; + typecode.setLength(value.length); + } + + /** + * Fill in the {@link value } field by reading the required data + * from the given stream. This method first reads the array size + * (as CORBA longand then all strings. + * + * @param input the input stream to read from. + */ + public void _read(InputStream input) + { + value = new String[ input.read_long() ]; + for (int i = 0; i < value.length; i++) + { + value [ i ] = input.read_wstring(); + } + typecode.setLength(value.length); + } + + /** + * Returns the TypeCode, corresponding the CORBA type that is stored + * using this holder. + */ + public TypeCode _type() + { + return typecode; + } + + /** + * Write the {@link value } field to the given stream. + * This method first writes the array size + * (as CORBA long and then all strings. + * + * @param output the output stream to write into. + */ + public void _write(OutputStream output) + { + output.write_long(value.length); + + for (int i = 0; i < value.length; i++) + { + output.write_wstring(value [ i ]); + } + } +} diff --git a/org/omg/CORBA/TRANSACTION_REQUIRED.java b/org/omg/CORBA/TRANSACTION_REQUIRED.java index 89ee2a989..1f6b23c85 100644 --- a/org/omg/CORBA/TRANSACTION_REQUIRED.java +++ b/org/omg/CORBA/TRANSACTION_REQUIRED.java @@ -78,7 +78,7 @@ public class TRANSACTION_REQUIRED * @param minor additional error code. * @param completed the method completion status. */ - TRANSACTION_REQUIRED(int minor, CompletionStatus completed) + public TRANSACTION_REQUIRED(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -89,7 +89,7 @@ public class TRANSACTION_REQUIRED * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - TRANSACTION_REQUIRED(String reason, int minor, CompletionStatus completed) + public TRANSACTION_REQUIRED(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java b/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java index f31fdc711..a9398eba1 100644 --- a/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java +++ b/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java @@ -79,7 +79,7 @@ public class TRANSACTION_ROLLEDBACK * @param minor additional error code. * @param completed the method completion status. */ - TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed) + public TRANSACTION_ROLLEDBACK(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -90,7 +90,7 @@ public class TRANSACTION_ROLLEDBACK * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - TRANSACTION_ROLLEDBACK(String reason, int minor, CompletionStatus completed) + public TRANSACTION_ROLLEDBACK(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/TRANSIENT.java b/org/omg/CORBA/TRANSIENT.java index eae22296e..61022b5ab 100644 --- a/org/omg/CORBA/TRANSIENT.java +++ b/org/omg/CORBA/TRANSIENT.java @@ -74,7 +74,7 @@ public class TRANSIENT * @param minor additional error code. * @param completed the method completion status. */ - TRANSIENT(int minor, CompletionStatus completed) + public TRANSIENT(int minor, CompletionStatus completed) { super("", minor, completed); } @@ -85,7 +85,7 @@ public class TRANSIENT * @param minor additional error code (the "minor"). * @param completed the method completion status. */ - TRANSIENT(String reason, int minor, CompletionStatus completed) + public TRANSIENT(String reason, int minor, CompletionStatus completed) { super(reason, minor, completed); } diff --git a/org/omg/CORBA/TypeCode.java b/org/omg/CORBA/TypeCode.java index 0b60b0498..59b49f17a 100644 --- a/org/omg/CORBA/TypeCode.java +++ b/org/omg/CORBA/TypeCode.java @@ -38,15 +38,15 @@ exception statement from your version. */ package org.omg.CORBA; -import org.omg.CORBA.portable.IDLEntity; +import java.io.Serializable; + import org.omg.CORBA.TypeCodePackage.BadKind; +import org.omg.CORBA.portable.IDLEntity; /** * An information about a CORBA data type. * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) */ -import java.io.Serializable; - public abstract class TypeCode implements IDLEntity, Serializable { diff --git a/org/omg/CORBA/TypeCodePackage/BadKind.java b/org/omg/CORBA/TypeCodePackage/BadKind.java index 9de829021..079114a4c 100644 --- a/org/omg/CORBA/TypeCodePackage/BadKind.java +++ b/org/omg/CORBA/TypeCodePackage/BadKind.java @@ -38,11 +38,11 @@ exception statement from your version. */ package org.omg.CORBA.TypeCodePackage; +import java.io.Serializable; + import org.omg.CORBA.IDLEntity; import org.omg.CORBA.UserException; -import java.io.Serializable; - /** * This exception is thrown when an inappropriate operation is invoked on * a {@link org.omg.CORBA.TypeCode} object. diff --git a/org/omg/CORBA/TypeCodePackage/Bounds.java b/org/omg/CORBA/TypeCodePackage/Bounds.java index 533597a6f..ef536c4f7 100644 --- a/org/omg/CORBA/TypeCodePackage/Bounds.java +++ b/org/omg/CORBA/TypeCodePackage/Bounds.java @@ -38,11 +38,11 @@ exception statement from your version. */ package org.omg.CORBA.TypeCodePackage; +import java.io.Serializable; + import org.omg.CORBA.IDLEntity; import org.omg.CORBA.UserException; -import java.io.Serializable; - /** * The {@link org.omg.CORBA.TypeCode#member_name(int) }, * {@link org.omg.CORBA.TypeCode#member_type(int) } and diff --git a/org/omg/CORBA/WStringSeqHolder.java b/org/omg/CORBA/WStringSeqHolder.java index b80977872..e83318440 100755 --- a/org/omg/CORBA/WStringSeqHolder.java +++ b/org/omg/CORBA/WStringSeqHolder.java @@ -1,131 +1,131 @@ -/* WStringSeqHolder.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., 59 Temple Place, Suite 330, Boston, MA -02111-1307 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.CORBA; - -import gnu.CORBA.*; - -import org.omg.CORBA.portable.InputStream; -import org.omg.CORBA.portable.OutputStream; -import org.omg.CORBA.portable.Streamable; - -/** - * A sequence holder for CORBA wstring[] that is mapped into - * java String[]. - * - * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) - */ -public final class WStringSeqHolder - implements Streamable -{ - /** - * The String[] (CORBA wstring[]) value, - * held by this WStringSeqHolder. - */ - public String[] value; - - /** - * The type code for this holder. Each holder has a different instance. - */ - private final primitiveArrayTypeCode typecode = - new primitiveArrayTypeCode(TCKind.tk_wchar); - - /** - * Constructs an instance of WStringSeqHolder, - * initializing {@link #value} to null. - */ - public WStringSeqHolder() - { - } - - /** - * Constructs an instance of WStringSeqHolder, - * initializing {@link #value} to the given String. - * - * @param initial_value a value that will be assigned to the - * {@link #value} field. - */ - public WStringSeqHolder(String[] initial_value) - { - value = initial_value; - typecode.setLength(value.length); - } - - /** - * Fill in the {@link value } field by reading the required data - * from the given stream. This method first reads the array size - * (as CORBA longand then all strings. - * - * @param input the input stream to read from. - */ - public void _read(InputStream input) - { - value = new String[ input.read_long() ]; - for (int i = 0; i < value.length; i++) - { - value [ i ] = input.read_wstring(); - } - typecode.setLength(value.length); - } - - /** - * Returns the TypeCode, corresponding the CORBA type that is stored - * using this holder. - */ - public TypeCode _type() - { - return typecode; - } - - /** - * Write the {@link value } field to the given stream. - * This method first writes the array size - * (as CORBA long and then all strings. - * - * @param output the output stream to write into. - */ - public void _write(OutputStream output) - { - output.write_long(value.length); - - for (int i = 0; i < value.length; i++) - { - output.write_wstring(value [ i ]); - } - } -} +/* WStringSeqHolder.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., 59 Temple Place, Suite 330, Boston, MA +02111-1307 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.CORBA; + +import gnu.CORBA.primitiveArrayTypeCode; + +import org.omg.CORBA.portable.InputStream; +import org.omg.CORBA.portable.OutputStream; +import org.omg.CORBA.portable.Streamable; + +/** + * A sequence holder for CORBA wstring[] that is mapped into + * java String[]. + * + * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) + */ +public final class WStringSeqHolder + implements Streamable +{ + /** + * The String[] (CORBA wstring[]) value, + * held by this WStringSeqHolder. + */ + public String[] value; + + /** + * The type code for this holder. Each holder has a different instance. + */ + private final primitiveArrayTypeCode typecode = + new primitiveArrayTypeCode(TCKind.tk_wchar); + + /** + * Constructs an instance of WStringSeqHolder, + * initializing {@link #value} to null. + */ + public WStringSeqHolder() + { + } + + /** + * Constructs an instance of WStringSeqHolder, + * initializing {@link #value} to the given String. + * + * @param initial_value a value that will be assigned to the + * {@link #value} field. + */ + public WStringSeqHolder(String[] initial_value) + { + value = initial_value; + typecode.setLength(value.length); + } + + /** + * Fill in the {@link value } field by reading the required data + * from the given stream. This method first reads the array size + * (as CORBA longand then all strings. + * + * @param input the input stream to read from. + */ + public void _read(InputStream input) + { + value = new String[ input.read_long() ]; + for (int i = 0; i < value.length; i++) + { + value [ i ] = input.read_wstring(); + } + typecode.setLength(value.length); + } + + /** + * Returns the TypeCode, corresponding the CORBA type that is stored + * using this holder. + */ + public TypeCode _type() + { + return typecode; + } + + /** + * Write the {@link value } field to the given stream. + * This method first writes the array size + * (as CORBA long and then all strings. + * + * @param output the output stream to write into. + */ + public void _write(OutputStream output) + { + output.write_long(value.length); + + for (int i = 0; i < value.length; i++) + { + output.write_wstring(value [ i ]); + } + } +} diff --git a/org/omg/CORBA/portable/OutputStream.java b/org/omg/CORBA/portable/OutputStream.java index 3a200bb02..fde1a7118 100644 --- a/org/omg/CORBA/portable/OutputStream.java +++ b/org/omg/CORBA/portable/OutputStream.java @@ -38,6 +38,8 @@ exception statement from your version. */ package org.omg.CORBA.portable; +import java.math.BigDecimal; + import org.omg.CORBA.Any; import org.omg.CORBA.Context; import org.omg.CORBA.ContextList; @@ -46,8 +48,6 @@ import org.omg.CORBA.ORB; import org.omg.CORBA.Principal; import org.omg.CORBA.TypeCode; -import java.math.BigDecimal; - /** * This class is used to write CORBA IDL data types. * -- cgit v1.2.1