_IDLTypeStub.java revision 608:7e06bf1dcb09
1321964Ssjg/* 2236769Sobrien * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved. 3236769Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4236769Sobrien * 5236769Sobrien * This code is free software; you can redistribute it and/or modify it 6236769Sobrien * under the terms of the GNU General Public License version 2 only, as 7236769Sobrien * published by the Free Software Foundation. Oracle designates this 8236769Sobrien * particular file as subject to the "Classpath" exception as provided 9236769Sobrien * by Oracle in the LICENSE file that accompanied this code. 10236769Sobrien * 11236769Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT 12236769Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13236769Sobrien * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14236769Sobrien * version 2 for more details (a copy is included in the LICENSE file that 15236769Sobrien * accompanied this code). 16236769Sobrien * 17236769Sobrien * You should have received a copy of the GNU General Public License version 18236769Sobrien * 2 along with this work; if not, write to the Free Software Foundation, 19236769Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20236769Sobrien * 21236769Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22236769Sobrien * or visit www.oracle.com if you need additional information or have any 23236769Sobrien * questions. 24236769Sobrien */ 25236769Sobrienpackage com.sun.org.omg.CORBA; 26236769Sobrien 27236769Sobrien 28236769Sobrien/** 29236769Sobrien* com/sun/org/omg/CORBA/_IDLTypeStub.java 30236769Sobrien* Generated by the IDL-to-Java compiler (portable), version "3.0" 31236769Sobrien* from ir.idl 32236769Sobrien* Thursday, May 6, 1999 1:51:45 AM PDT 33236769Sobrien*/ 34236769Sobrien 35236769Sobrien// This file has been manually _CHANGED_ 36236769Sobrien 37236769Sobrien// _CHANGED_ 38236769Sobrien//public class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.org.omg.CORBA.IDLType 39236769Sobrienpublic class _IDLTypeStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.IDLType 40236769Sobrien{ 41236769Sobrien // Constructors 42236769Sobrien // NOTE: If the default constructor is used, the 43236769Sobrien // object is useless until _set_delegate (...) 44236769Sobrien // is called. 45236769Sobrien public _IDLTypeStub () 46236769Sobrien { 47236769Sobrien super (); 48236769Sobrien } 49236769Sobrien 50236769Sobrien public _IDLTypeStub (org.omg.CORBA.portable.Delegate delegate) 51236769Sobrien { 52236769Sobrien super (); 53236769Sobrien _set_delegate (delegate); 54236769Sobrien } 55236769Sobrien 56236769Sobrien public org.omg.CORBA.TypeCode type () 57236769Sobrien { 58236769Sobrien org.omg.CORBA.portable.InputStream _in = null; 59236769Sobrien try { 60236769Sobrien org.omg.CORBA.portable.OutputStream _out = _request ("_get_type", true); 61236769Sobrien _in = _invoke (_out); 62236769Sobrien org.omg.CORBA.TypeCode __result = _in.read_TypeCode (); 63236769Sobrien return __result; 64236769Sobrien } catch (org.omg.CORBA.portable.ApplicationException _ex) { 65236769Sobrien _in = _ex.getInputStream (); 66236769Sobrien String _id = _ex.getId (); 67236769Sobrien throw new org.omg.CORBA.MARSHAL (_id); 68236769Sobrien } catch (org.omg.CORBA.portable.RemarshalException _rm) { 69236769Sobrien return type (); 70236769Sobrien } finally { 71236769Sobrien _releaseReply (_in); 72236769Sobrien } 73321964Ssjg } // type 74236769Sobrien 75236769Sobrien 76236769Sobrien // read interface 77236769Sobrien // _CHANGED_ 78236769Sobrien //public com.sun.org.omg.CORBA.DefinitionKind def_kind () 79236769Sobrien public org.omg.CORBA.DefinitionKind def_kind () 80321964Ssjg { 81236769Sobrien org.omg.CORBA.portable.InputStream _in = null; 82236769Sobrien try { 83236769Sobrien org.omg.CORBA.portable.OutputStream _out = _request ("_get_def_kind", true); 84236769Sobrien _in = _invoke (_out); 85236769Sobrien // _CHANGED_ 86236769Sobrien //com.sun.org.omg.CORBA.DefinitionKind __result = com.sun.org.omg.CORBA.DefinitionKindHelper.read (_in); 87236769Sobrien org.omg.CORBA.DefinitionKind __result = com.sun.org.omg.CORBA.DefinitionKindHelper.read (_in); 88236769Sobrien return __result; 89236769Sobrien } catch (org.omg.CORBA.portable.ApplicationException _ex) { 90236769Sobrien _in = _ex.getInputStream (); 91236769Sobrien String _id = _ex.getId (); 92236769Sobrien throw new org.omg.CORBA.MARSHAL (_id); 93236769Sobrien } catch (org.omg.CORBA.portable.RemarshalException _rm) { 94236769Sobrien return def_kind (); 95236769Sobrien } finally { 96236769Sobrien _releaseReply (_in); 97236769Sobrien } 98236769Sobrien } // def_kind 99236769Sobrien 100236769Sobrien 101236769Sobrien // write interface 102236769Sobrien public void destroy () 103236769Sobrien { 104236769Sobrien org.omg.CORBA.portable.InputStream _in = null; 105236769Sobrien try { 106236769Sobrien org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true); 107236769Sobrien _in = _invoke (_out); 108236769Sobrien } catch (org.omg.CORBA.portable.ApplicationException _ex) { 109236769Sobrien _in = _ex.getInputStream (); 110236769Sobrien String _id = _ex.getId (); 111236769Sobrien throw new org.omg.CORBA.MARSHAL (_id); 112236769Sobrien } catch (org.omg.CORBA.portable.RemarshalException _rm) { 113236769Sobrien destroy (); 114292068Ssjg } finally { 115236769Sobrien _releaseReply (_in); 116236769Sobrien } 117236769Sobrien } // destroy 118236769Sobrien 119236769Sobrien // Type-specific CORBA::Object operations 120237578Sobrien private static String[] __ids = { 121321964Ssjg "IDL:omg.org/CORBA/IDLType:1.0", 122321964Ssjg "IDL:omg.org/CORBA/IRObject:1.0"}; 123236769Sobrien 124321964Ssjg public String[] _ids () 125321964Ssjg { 126321964Ssjg return (String[])__ids.clone (); 127321964Ssjg } 128321964Ssjg 129321964Ssjg private void readObject (java.io.ObjectInputStream s) 130321964Ssjg { 131321964Ssjg try 132321964Ssjg { 133321964Ssjg String str = s.readUTF (); 134321964Ssjg org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str); 135321964Ssjg org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); 136321964Ssjg _set_delegate (delegate); 137321964Ssjg } catch (java.io.IOException e) {} 138321964Ssjg } 139321964Ssjg 140321964Ssjg private void writeObject (java.io.ObjectOutputStream s) 141321964Ssjg { 142321964Ssjg try 143236769Sobrien { 144236769Sobrien String str = org.omg.CORBA.ORB.init ().object_to_string (this); 145236769Sobrien s.writeUTF (str); 146236769Sobrien } catch (java.io.IOException e) {} 147236769Sobrien } 148236769Sobrien} // class _IDLTypeStub 149236769Sobrien