1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/org/omg/CORBA/ValueMemberHelper.java Wed Apr 27 01:21:28 2016 +0800 1.3 @@ -0,0 +1,149 @@ 1.4 +/* 1.5 + * Copyright (c) 1999, 2001, Oracle and/or its affiliates. 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. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 +package org.omg.CORBA; 1.29 + 1.30 + 1.31 +/** 1.32 +* The Helper for <tt>ValueMember</tt>. For more information on 1.33 +* Helper files, see <a href="doc-files/generatedfiles.html#helper"> 1.34 +* "Generated Files: Helper Files"</a>.<P> 1.35 +* org/omg/CORBA/ValueMemberHelper.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 +abstract public class ValueMemberHelper 1.42 +{ 1.43 + private static String _id = "IDL:omg.org/CORBA/ValueMember:1.0"; 1.44 + 1.45 + public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.ValueMember that) 1.46 + { 1.47 + org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 1.48 + a.type (type ()); 1.49 + write (out, that); 1.50 + a.read_value (out.create_input_stream (), type ()); 1.51 + } 1.52 + 1.53 + public static org.omg.CORBA.ValueMember extract (org.omg.CORBA.Any a) 1.54 + { 1.55 + return read (a.create_input_stream ()); 1.56 + } 1.57 + 1.58 + private static org.omg.CORBA.TypeCode __typeCode = null; 1.59 + private static boolean __active = false; 1.60 + synchronized public static org.omg.CORBA.TypeCode type () 1.61 + { 1.62 + if (__typeCode == null) 1.63 + { 1.64 + synchronized (org.omg.CORBA.TypeCode.class) 1.65 + { 1.66 + if (__typeCode == null) 1.67 + { 1.68 + if (__active) 1.69 + { 1.70 + return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); 1.71 + } 1.72 + __active = true; 1.73 + org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [7]; 1.74 + org.omg.CORBA.TypeCode _tcOf_members0 = null; 1.75 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 1.76 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.IdentifierHelper.id (), "Identifier", _tcOf_members0); 1.77 + _members0[0] = new org.omg.CORBA.StructMember ( 1.78 + "name", 1.79 + _tcOf_members0, 1.80 + null); 1.81 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 1.82 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0); 1.83 + _members0[1] = new org.omg.CORBA.StructMember ( 1.84 + "id", 1.85 + _tcOf_members0, 1.86 + null); 1.87 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 1.88 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0); 1.89 + _members0[2] = new org.omg.CORBA.StructMember ( 1.90 + "defined_in", 1.91 + _tcOf_members0, 1.92 + null); 1.93 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 1.94 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.VersionSpecHelper.id (), "VersionSpec", _tcOf_members0); 1.95 + _members0[3] = new org.omg.CORBA.StructMember ( 1.96 + "version", 1.97 + _tcOf_members0, 1.98 + null); 1.99 + _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_TypeCode); 1.100 + _members0[4] = new org.omg.CORBA.StructMember ( 1.101 + "type", 1.102 + _tcOf_members0, 1.103 + null); 1.104 + _tcOf_members0 = org.omg.CORBA.IDLTypeHelper.type (); 1.105 + _members0[5] = new org.omg.CORBA.StructMember ( 1.106 + "type_def", 1.107 + _tcOf_members0, 1.108 + null); 1.109 + _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short); 1.110 + _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.VisibilityHelper.id (), "Visibility", _tcOf_members0); 1.111 + _members0[6] = new org.omg.CORBA.StructMember ( 1.112 + "access", 1.113 + _tcOf_members0, 1.114 + null); 1.115 + __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.CORBA.ValueMemberHelper.id (), "ValueMember", _members0); 1.116 + __active = false; 1.117 + } 1.118 + } 1.119 + } 1.120 + return __typeCode; 1.121 + } 1.122 + 1.123 + public static String id () 1.124 + { 1.125 + return _id; 1.126 + } 1.127 + 1.128 + public static org.omg.CORBA.ValueMember read (org.omg.CORBA.portable.InputStream istream) 1.129 + { 1.130 + org.omg.CORBA.ValueMember value = new org.omg.CORBA.ValueMember (); 1.131 + value.name = istream.read_string (); 1.132 + value.id = istream.read_string (); 1.133 + value.defined_in = istream.read_string (); 1.134 + value.version = istream.read_string (); 1.135 + value.type = istream.read_TypeCode (); 1.136 + value.type_def = org.omg.CORBA.IDLTypeHelper.read (istream); 1.137 + value.access = istream.read_short (); 1.138 + return value; 1.139 + } 1.140 + 1.141 + public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.ValueMember value) 1.142 + { 1.143 + ostream.write_string (value.name); 1.144 + ostream.write_string (value.id); 1.145 + ostream.write_string (value.defined_in); 1.146 + ostream.write_string (value.version); 1.147 + ostream.write_TypeCode (value.type); 1.148 + org.omg.CORBA.IDLTypeHelper.write (ostream, value.type_def); 1.149 + ostream.write_short (value.access); 1.150 + } 1.151 + 1.152 +}