1 /*
   2  * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package com.sun.org.omg.CORBA;
  26 
  27 
  28 /**
  29 * com/sun/org/omg/CORBA/_IDLTypeStub.java
  30 * Generated by the IDL-to-Java compiler (portable), version "3.0"
  31 * from ir.idl
  32 * Thursday, May 6, 1999 1:51:45 AM PDT
  33 */
  34 
  35 // This file has been manually _CHANGED_
  36 
  37 // _CHANGED_
  38 //public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.org.omg.CORBA.IDLType
  39 public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.IDLType
  40 {
  41     // Constructors
  42     // NOTE:  If the default constructor is used, the
  43     //        object is useless until _set_delegate (...)
  44     //        is called.
  45     public _IDLTypeStub ()
  46     {
  47         super ();
  48     }
  49 
  50     public _IDLTypeStub (org.omg.CORBA.portable.Delegate delegate)
  51     {
  52         super ();
  53         _set_delegate (delegate);
  54     }
  55 
  56     public org.omg.CORBA.TypeCode type ()
  57     {
  58         org.omg.CORBA.portable.InputStream _in = null;
  59         try {
  60             org.omg.CORBA.portable.OutputStream _out = _request ("_get_type", true);
  61             _in = _invoke (_out);
  62             org.omg.CORBA.TypeCode __result = _in.read_TypeCode ();
  63             return __result;
  64         } catch (org.omg.CORBA.portable.ApplicationException _ex) {
  65             _in = _ex.getInputStream ();
  66             String _id = _ex.getId ();
  67             throw new org.omg.CORBA.MARSHAL (_id);
  68         } catch (org.omg.CORBA.portable.RemarshalException _rm) {
  69             return type ();
  70         } finally {
  71             _releaseReply (_in);
  72         }
  73     } // type
  74 
  75 
  76     // read interface
  77     // _CHANGED_
  78     //public com.sun.org.omg.CORBA.DefinitionKind def_kind ()
  79     public org.omg.CORBA.DefinitionKind def_kind ()
  80     {
  81         org.omg.CORBA.portable.InputStream _in = null;
  82         try {
  83             org.omg.CORBA.portable.OutputStream _out = _request ("_get_def_kind", true);
  84             _in = _invoke (_out);
  85             // _CHANGED_
  86             //com.sun.org.omg.CORBA.DefinitionKind __result = com.sun.org.omg.CORBA.DefinitionKindHelper.read (_in);
  87             org.omg.CORBA.DefinitionKind __result = com.sun.org.omg.CORBA.DefinitionKindHelper.read (_in);
  88             return __result;
  89         } catch (org.omg.CORBA.portable.ApplicationException _ex) {
  90             _in = _ex.getInputStream ();
  91             String _id = _ex.getId ();
  92             throw new org.omg.CORBA.MARSHAL (_id);
  93         } catch (org.omg.CORBA.portable.RemarshalException _rm) {
  94             return def_kind ();
  95         } finally {
  96             _releaseReply (_in);
  97         }
  98     } // def_kind
  99 
 100 
 101     // write interface
 102     public void destroy ()
 103     {
 104         org.omg.CORBA.portable.InputStream _in = null;
 105         try {
 106             org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true);
 107             _in = _invoke (_out);
 108         } catch (org.omg.CORBA.portable.ApplicationException _ex) {
 109             _in = _ex.getInputStream ();
 110             String _id = _ex.getId ();
 111             throw new org.omg.CORBA.MARSHAL (_id);
 112         } catch (org.omg.CORBA.portable.RemarshalException _rm) {
 113             destroy ();
 114         } finally {
 115             _releaseReply (_in);
 116         }
 117     } // destroy
 118 
 119     // Type-specific CORBA::Object operations
 120     private static String[] __ids = {
 121         "IDL:omg.org/CORBA/IDLType:1.0",
 122         "IDL:omg.org/CORBA/IRObject:1.0"};
 123 
 124     public String[] _ids ()
 125     {
 126         return (String[])__ids.clone ();
 127     }
 128 
 129     private void readObject (java.io.ObjectInputStream s)
 130     {
 131         try
 132             {
 133                 String str = s.readUTF ();
 134                 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
 135                 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
 136                 _set_delegate (delegate);
 137             } catch (java.io.IOException e) {}
 138     }
 139 
 140     private void writeObject (java.io.ObjectOutputStream s)
 141     {
 142         try
 143             {
 144                 String str = org.omg.CORBA.ORB.init ().object_to_string (this);
 145                 s.writeUTF (str);
 146             } catch (java.io.IOException e) {}
 147     }
 148 } // class _IDLTypeStub