src/share/classes/org/omg/CORBA/_IDLTypeStub.java

changeset 1
55540e827aef
child 158
91006f157c46
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/classes/org/omg/CORBA/_IDLTypeStub.java	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,153 @@
     1.4 +/*
     1.5 + * Copyright 1999-2001 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Sun designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Sun in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.26 + * have any questions.
    1.27 + */
    1.28 +package org.omg.CORBA;
    1.29 +
    1.30 +
    1.31 +/**
    1.32 +* The Stub for <tt>IDLType</tt>.  For more information on
    1.33 +* Stub files, see <a href="doc-files/generatedfiles.html#stub">
    1.34 +* "Generated Files: Stubs"</a>.<P>
    1.35 +* org/omg/CORBA/_IDLTypeStub.java
    1.36 +* Generated by the IDL-to-Java compiler (portable), version "3.0"
    1.37 +* from ir.idl.
    1.38 +* 03 June 1999 11:33:44 o'clock GMT+00:00
    1.39 +*/
    1.40 +
    1.41 +public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.IDLType
    1.42 +{
    1.43 +  /**
    1.44 +   * Constructs a default <code>_IDLTypeStub</code> object.
    1.45 +   * NOTE:  If the default constructor is used, the
    1.46 +   *        object is useless until the method <code>_set_delegate</code>
    1.47 +   *        has been called.
    1.48 +   */
    1.49 +  // NOTE: This constructor is not required according to the spec. Only JCK expects it now.
    1.50 +  public _IDLTypeStub ()
    1.51 +  {
    1.52 +    super ();
    1.53 +  }
    1.54 +
    1.55 +  /**
    1.56 +   * Constructs an <code>_IDLTypeStub</code> object initialized
    1.57 +   * with the given <code>Delegate</code> object.
    1.58 +   *
    1.59 +   * @param delegate a Delegate object
    1.60 +   */
    1.61 +  // NOTE: This constructor is not required according to the spec. We keep it as a convenience method.
    1.62 +  public _IDLTypeStub (org.omg.CORBA.portable.Delegate delegate)
    1.63 +  {
    1.64 +    super ();
    1.65 +    _set_delegate (delegate);
    1.66 +  }
    1.67 +
    1.68 +  public org.omg.CORBA.TypeCode type ()
    1.69 +  {
    1.70 +    org.omg.CORBA.portable.InputStream _in = null;
    1.71 +    try {
    1.72 +       org.omg.CORBA.portable.OutputStream _out = _request ("_get_type", true);
    1.73 +       _in = _invoke (_out);
    1.74 +       org.omg.CORBA.TypeCode __result = _in.read_TypeCode ();
    1.75 +       return __result;
    1.76 +    } catch (org.omg.CORBA.portable.ApplicationException _ex) {
    1.77 +       _in = _ex.getInputStream ();
    1.78 +       String _id = _ex.getId ();
    1.79 +       throw new org.omg.CORBA.MARSHAL (_id);
    1.80 +    } catch (org.omg.CORBA.portable.RemarshalException _rm) {
    1.81 +       return type ();
    1.82 +    } finally {
    1.83 +        _releaseReply (_in);
    1.84 +    }
    1.85 +  } // type
    1.86 +
    1.87 +
    1.88 +  // read interface
    1.89 +  public org.omg.CORBA.DefinitionKind def_kind ()
    1.90 +  {
    1.91 +    org.omg.CORBA.portable.InputStream _in = null;
    1.92 +    try {
    1.93 +       org.omg.CORBA.portable.OutputStream _out = _request ("_get_def_kind", true);
    1.94 +       _in = _invoke (_out);
    1.95 +       org.omg.CORBA.DefinitionKind __result = org.omg.CORBA.DefinitionKindHelper.read (_in);
    1.96 +       return __result;
    1.97 +    } catch (org.omg.CORBA.portable.ApplicationException _ex) {
    1.98 +       _in = _ex.getInputStream ();
    1.99 +       String _id = _ex.getId ();
   1.100 +       throw new org.omg.CORBA.MARSHAL (_id);
   1.101 +    } catch (org.omg.CORBA.portable.RemarshalException _rm) {
   1.102 +       return def_kind ();
   1.103 +    } finally {
   1.104 +        _releaseReply (_in);
   1.105 +    }
   1.106 +  } // def_kind
   1.107 +
   1.108 +
   1.109 +  // write interface
   1.110 +  public void destroy ()
   1.111 +  {
   1.112 +    org.omg.CORBA.portable.InputStream _in = null;
   1.113 +    try {
   1.114 +       org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true);
   1.115 +       _in = _invoke (_out);
   1.116 +    } catch (org.omg.CORBA.portable.ApplicationException _ex) {
   1.117 +       _in = _ex.getInputStream ();
   1.118 +       String _id = _ex.getId ();
   1.119 +       throw new org.omg.CORBA.MARSHAL (_id);
   1.120 +    } catch (org.omg.CORBA.portable.RemarshalException _rm) {
   1.121 +       destroy ();
   1.122 +    } finally {
   1.123 +        _releaseReply (_in);
   1.124 +    }
   1.125 +  } // destroy
   1.126 +
   1.127 +  // Type-specific CORBA::Object operations
   1.128 +  private static String[] __ids = {
   1.129 +    "IDL:omg.org/CORBA/IDLType:1.0",
   1.130 +    "IDL:omg.org/CORBA/IRObject:1.0"};
   1.131 +
   1.132 +  public String[] _ids ()
   1.133 +  {
   1.134 +    return (String[])__ids.clone ();
   1.135 +  }
   1.136 +
   1.137 +  private void readObject (java.io.ObjectInputStream s)
   1.138 +  {
   1.139 +     try
   1.140 +     {
   1.141 +       String str = s.readUTF ();
   1.142 +       org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
   1.143 +       org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
   1.144 +       _set_delegate (delegate);
   1.145 +     } catch (java.io.IOException e) {}
   1.146 +  }
   1.147 +
   1.148 +  private void writeObject (java.io.ObjectOutputStream s)
   1.149 +  {
   1.150 +     try
   1.151 +     {
   1.152 +       String str = org.omg.CORBA.ORB.init ().object_to_string (this);
   1.153 +       s.writeUTF (str);
   1.154 +     } catch (java.io.IOException e) {}
   1.155 +  }
   1.156 +} // class _IDLTypeStub

mercurial