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