_IDLTypeStub.java revision 608:7e06bf1dcb09
1160079Smjacob/* 2160079Smjacob * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved. 3160079Smjacob * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4160079Smjacob * 5160079Smjacob * This code is free software; you can redistribute it and/or modify it 6160079Smjacob * under the terms of the GNU General Public License version 2 only, as 7160079Smjacob * published by the Free Software Foundation. Oracle designates this 8160079Smjacob * particular file as subject to the "Classpath" exception as provided 9160079Smjacob * by Oracle in the LICENSE file that accompanied this code. 10160079Smjacob * 11160079Smjacob * This code is distributed in the hope that it will be useful, but WITHOUT 12160079Smjacob * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13160079Smjacob * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14160079Smjacob * version 2 for more details (a copy is included in the LICENSE file that 15160079Smjacob * accompanied this code). 16160079Smjacob * 17160079Smjacob * You should have received a copy of the GNU General Public License version 18160079Smjacob * 2 along with this work; if not, write to the Free Software Foundation, 19160079Smjacob * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20160079Smjacob * 21160079Smjacob * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22160079Smjacob * or visit www.oracle.com if you need additional information or have any 23160079Smjacob * questions. 24160079Smjacob */ 25160079Smjacobpackage com.sun.org.omg.CORBA; 26160079Smjacob 27160079Smjacob 28160079Smjacob/** 29160079Smjacob* com/sun/org/omg/CORBA/_IDLTypeStub.java 30291143Smav* Generated by the IDL-to-Java compiler (portable), version "3.0" 31291143Smav* from ir.idl 32291143Smav* Thursday, May 6, 1999 1:51:45 AM PDT 33160079Smjacob*/ 34160079Smjacob 35160079Smjacob// This file has been manually _CHANGED_ 36291143Smav 37160079Smjacob// _CHANGED_ 38160079Smjacob//public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.org.omg.CORBA.IDLType 39291143Smavpublic class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.IDLType 40217034Smjacob{ 41160079Smjacob // Constructors 42160079Smjacob // NOTE: If the default constructor is used, the 43160079Smjacob // object is useless until _set_delegate (...) 44291143Smav // is called. 45160079Smjacob public _IDLTypeStub () 46160079Smjacob { 47160079Smjacob super (); 48160079Smjacob } 49160079Smjacob 50160079Smjacob public _IDLTypeStub (org.omg.CORBA.portable.Delegate delegate) 51160079Smjacob { 52160079Smjacob super (); 53291143Smav _set_delegate (delegate); 54291143Smav } 55291143Smav 56291143Smav public org.omg.CORBA.TypeCode type () 57291143Smav { 58160079Smjacob org.omg.CORBA.portable.InputStream _in = null; 59160079Smjacob try { 60160079Smjacob org.omg.CORBA.portable.OutputStream _out = _request ("_get_type", true); 61160079Smjacob _in = _invoke (_out); 62160079Smjacob org.omg.CORBA.TypeCode __result = _in.read_TypeCode (); 63217034Smjacob return __result; 64217034Smjacob } catch (org.omg.CORBA.portable.ApplicationException _ex) { 65217034Smjacob _in = _ex.getInputStream (); 66160079Smjacob String _id = _ex.getId (); 67217034Smjacob throw new org.omg.CORBA.MARSHAL (_id); 68160079Smjacob } catch (org.omg.CORBA.portable.RemarshalException _rm) { 69160079Smjacob return type (); 70160079Smjacob } finally { 71291143Smav _releaseReply (_in); 72291143Smav } 73291143Smav } // type 74291143Smav 75291143Smav 76217034Smjacob // read interface 77217034Smjacob // _CHANGED_ 78217034Smjacob //public com.sun.org.omg.CORBA.DefinitionKind def_kind () 79291143Smav public org.omg.CORBA.DefinitionKind def_kind () 80217034Smjacob { 81217034Smjacob org.omg.CORBA.portable.InputStream _in = null; 82217034Smjacob try { 83291143Smav org.omg.CORBA.portable.OutputStream _out = _request ("_get_def_kind", true); 84291143Smav _in = _invoke (_out); 85291143Smav // _CHANGED_ 86291143Smav //com.sun.org.omg.CORBA.DefinitionKind __result = com.sun.org.omg.CORBA.DefinitionKindHelper.read (_in); 87291143Smav org.omg.CORBA.DefinitionKind __result = com.sun.org.omg.CORBA.DefinitionKindHelper.read (_in); 88291143Smav return __result; 89291143Smav } catch (org.omg.CORBA.portable.ApplicationException _ex) { 90291143Smav _in = _ex.getInputStream (); 91291143Smav String _id = _ex.getId (); 92291143Smav throw new org.omg.CORBA.MARSHAL (_id); 93291143Smav } catch (org.omg.CORBA.portable.RemarshalException _rm) { 94291143Smav return def_kind (); 95291143Smav } finally { 96291143Smav _releaseReply (_in); 97291143Smav } 98291143Smav } // def_kind 99291143Smav 100291143Smav 101291143Smav // write interface 102291143Smav public void destroy () 103291143Smav { 104291143Smav org.omg.CORBA.portable.InputStream _in = null; 105291143Smav try { 106291143Smav org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true); 107291143Smav _in = _invoke (_out); 108291143Smav } catch (org.omg.CORBA.portable.ApplicationException _ex) { 109291143Smav _in = _ex.getInputStream (); 110291143Smav String _id = _ex.getId (); 111291143Smav throw new org.omg.CORBA.MARSHAL (_id); 112291143Smav } catch (org.omg.CORBA.portable.RemarshalException _rm) { 113291143Smav destroy (); 114291143Smav } finally { 115291143Smav _releaseReply (_in); 116291143Smav } 117291143Smav } // destroy 118291143Smav 119291143Smav // Type-specific CORBA::Object operations 120291143Smav private static String[] __ids = { 121291143Smav "IDL:omg.org/CORBA/IDLType:1.0", 122291143Smav "IDL:omg.org/CORBA/IRObject:1.0"}; 123291143Smav 124291143Smav public String[] _ids () 125291143Smav { 126291143Smav return (String[])__ids.clone (); 127291143Smav } 128291143Smav 129291143Smav private void readObject (java.io.ObjectInputStream s) 130291143Smav { 131291143Smav try 132291143Smav { 133291143Smav String str = s.readUTF (); 134291143Smav org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str); 135291143Smav org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); 136291143Smav _set_delegate (delegate); 137291143Smav } catch (java.io.IOException e) {} 138291143Smav } 139291143Smav 140291143Smav private void writeObject (java.io.ObjectOutputStream s) 141291143Smav { 142291143Smav try 143291143Smav { 144291143Smav String str = org.omg.CORBA.ORB.init ().object_to_string (this); 145291143Smav s.writeUTF (str); 146291143Smav } catch (java.io.IOException e) {} 147291143Smav } 148291143Smav} // class _IDLTypeStub 149291143Smav