duke@1: /* ohair@158: * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@158: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@158: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@158: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@158: * or visit www.oracle.com if you need additional information or have any ohair@158: * questions. duke@1: */ duke@1: package org.omg.CORBA; duke@1: duke@1: duke@1: /** duke@1: * The Stub for IDLType. For more information on duke@1: * Stub files, see duke@1: * "Generated Files: Stubs".
duke@1: * org/omg/CORBA/_IDLTypeStub.java
duke@1: * Generated by the IDL-to-Java compiler (portable), version "3.0"
duke@1: * from ir.idl.
duke@1: * 03 June 1999 11:33:44 o'clock GMT+00:00
duke@1: */
duke@1:
duke@1: public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.IDLType
duke@1: {
duke@1: /**
duke@1: * Constructs a default _IDLTypeStub
object.
duke@1: * NOTE: If the default constructor is used, the
duke@1: * object is useless until the method _set_delegate
duke@1: * has been called.
duke@1: */
duke@1: // NOTE: This constructor is not required according to the spec. Only JCK expects it now.
duke@1: public _IDLTypeStub ()
duke@1: {
duke@1: super ();
duke@1: }
duke@1:
duke@1: /**
duke@1: * Constructs an _IDLTypeStub
object initialized
duke@1: * with the given Delegate
object.
duke@1: *
duke@1: * @param delegate a Delegate object
duke@1: */
duke@1: // NOTE: This constructor is not required according to the spec. We keep it as a convenience method.
duke@1: public _IDLTypeStub (org.omg.CORBA.portable.Delegate delegate)
duke@1: {
duke@1: super ();
duke@1: _set_delegate (delegate);
duke@1: }
duke@1:
duke@1: public org.omg.CORBA.TypeCode type ()
duke@1: {
duke@1: org.omg.CORBA.portable.InputStream _in = null;
duke@1: try {
duke@1: org.omg.CORBA.portable.OutputStream _out = _request ("_get_type", true);
duke@1: _in = _invoke (_out);
duke@1: org.omg.CORBA.TypeCode __result = _in.read_TypeCode ();
duke@1: return __result;
duke@1: } catch (org.omg.CORBA.portable.ApplicationException _ex) {
duke@1: _in = _ex.getInputStream ();
duke@1: String _id = _ex.getId ();
duke@1: throw new org.omg.CORBA.MARSHAL (_id);
duke@1: } catch (org.omg.CORBA.portable.RemarshalException _rm) {
duke@1: return type ();
duke@1: } finally {
duke@1: _releaseReply (_in);
duke@1: }
duke@1: } // type
duke@1:
duke@1:
duke@1: // read interface
duke@1: public org.omg.CORBA.DefinitionKind def_kind ()
duke@1: {
duke@1: org.omg.CORBA.portable.InputStream _in = null;
duke@1: try {
duke@1: org.omg.CORBA.portable.OutputStream _out = _request ("_get_def_kind", true);
duke@1: _in = _invoke (_out);
duke@1: org.omg.CORBA.DefinitionKind __result = org.omg.CORBA.DefinitionKindHelper.read (_in);
duke@1: return __result;
duke@1: } catch (org.omg.CORBA.portable.ApplicationException _ex) {
duke@1: _in = _ex.getInputStream ();
duke@1: String _id = _ex.getId ();
duke@1: throw new org.omg.CORBA.MARSHAL (_id);
duke@1: } catch (org.omg.CORBA.portable.RemarshalException _rm) {
duke@1: return def_kind ();
duke@1: } finally {
duke@1: _releaseReply (_in);
duke@1: }
duke@1: } // def_kind
duke@1:
duke@1:
duke@1: // write interface
duke@1: public void destroy ()
duke@1: {
duke@1: org.omg.CORBA.portable.InputStream _in = null;
duke@1: try {
duke@1: org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true);
duke@1: _in = _invoke (_out);
duke@1: } catch (org.omg.CORBA.portable.ApplicationException _ex) {
duke@1: _in = _ex.getInputStream ();
duke@1: String _id = _ex.getId ();
duke@1: throw new org.omg.CORBA.MARSHAL (_id);
duke@1: } catch (org.omg.CORBA.portable.RemarshalException _rm) {
duke@1: destroy ();
duke@1: } finally {
duke@1: _releaseReply (_in);
duke@1: }
duke@1: } // destroy
duke@1:
duke@1: // Type-specific CORBA::Object operations
duke@1: private static String[] __ids = {
duke@1: "IDL:omg.org/CORBA/IDLType:1.0",
duke@1: "IDL:omg.org/CORBA/IRObject:1.0"};
duke@1:
duke@1: public String[] _ids ()
duke@1: {
duke@1: return (String[])__ids.clone ();
duke@1: }
duke@1:
duke@1: private void readObject (java.io.ObjectInputStream s)
duke@1: {
duke@1: try
duke@1: {
duke@1: String str = s.readUTF ();
duke@1: org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
duke@1: org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
duke@1: _set_delegate (delegate);
duke@1: } catch (java.io.IOException e) {}
duke@1: }
duke@1:
duke@1: private void writeObject (java.io.ObjectOutputStream s)
duke@1: {
duke@1: try
duke@1: {
duke@1: String str = org.omg.CORBA.ORB.init ().object_to_string (this);
duke@1: s.writeUTF (str);
duke@1: } catch (java.io.IOException e) {}
duke@1: }
duke@1: } // class _IDLTypeStub