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.ValueDefPackage;
  26 
  27 
  28 /**
  29 * com/sun/org/omg/CORBA/ValueDefPackage/FullValueDescriptionHelper.java
  30 * Generated by the IDL-to-Java compiler (portable), version "3.0"
  31 * from ir.idl
  32 * Thursday, May 6, 1999 1:51:52 AM PDT
  33 */
  34 
  35 public final class FullValueDescriptionHelper
  36 {
  37     private static String  _id = "IDL:omg.org/CORBA/ValueDef/FullValueDescription:1.0";
  38 
  39     public FullValueDescriptionHelper()
  40     {
  41     }
  42 
  43     public static void insert (org.omg.CORBA.Any a, com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription that)
  44     {
  45         org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  46         a.type (type ());
  47         write (out, that);
  48         a.read_value (out.create_input_stream (), type ());
  49     }
  50 
  51     public static com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription extract (org.omg.CORBA.Any a)
  52     {
  53         return read (a.create_input_stream ());
  54     }
  55 
  56     private static org.omg.CORBA.TypeCode __typeCode = null;
  57     private static boolean __active = false;
  58     synchronized public static org.omg.CORBA.TypeCode type ()
  59     {
  60         if (__typeCode == null)
  61             {
  62                 synchronized (org.omg.CORBA.TypeCode.class)
  63                     {
  64                         if (__typeCode == null)
  65                             {
  66                                 if (__active)
  67                                     {
  68                                         return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  69                                     }
  70                                 __active = true;
  71                                 org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [15];
  72                                 org.omg.CORBA.TypeCode _tcOf_members0 = null;
  73                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
  74                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.IdentifierHelper.id (), "Identifier", _tcOf_members0);
  75                                 _members0[0] = new org.omg.CORBA.StructMember (
  76                                                                                "name",
  77                                                                                _tcOf_members0,
  78                                                                                null);
  79                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
  80                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0);
  81                                 _members0[1] = new org.omg.CORBA.StructMember (
  82                                                                                "id",
  83                                                                                _tcOf_members0,
  84                                                                                null);
  85                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
  86                                 _members0[2] = new org.omg.CORBA.StructMember (
  87                                                                                "is_abstract",
  88                                                                                _tcOf_members0,
  89                                                                                null);
  90                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
  91                                 _members0[3] = new org.omg.CORBA.StructMember (
  92                                                                                "is_custom",
  93                                                                                _tcOf_members0,
  94                                                                                null);
  95                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
  96                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0);
  97                                 _members0[4] = new org.omg.CORBA.StructMember (
  98                                                                                "defined_in",
  99                                                                                _tcOf_members0,
 100                                                                                null);
 101                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
 102                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.VersionSpecHelper.id (), "VersionSpec", _tcOf_members0);
 103                                 _members0[5] = new org.omg.CORBA.StructMember (
 104                                                                                "version",
 105                                                                                _tcOf_members0,
 106                                                                                null);
 107                                 _tcOf_members0 = com.sun.org.omg.CORBA.OperationDescriptionHelper.type ();
 108                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
 109                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.OpDescriptionSeqHelper.id (), "OpDescriptionSeq", _tcOf_members0);
 110                                 _members0[6] = new org.omg.CORBA.StructMember (
 111                                                                                "operations",
 112                                                                                _tcOf_members0,
 113                                                                                null);
 114                                 _tcOf_members0 = com.sun.org.omg.CORBA.AttributeDescriptionHelper.type ();
 115                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
 116                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.AttrDescriptionSeqHelper.id (), "AttrDescriptionSeq", _tcOf_members0);
 117                                 _members0[7] = new org.omg.CORBA.StructMember (
 118                                                                                "attributes",
 119                                                                                _tcOf_members0,
 120                                                                                null);
 121                                 _tcOf_members0 = com.sun.org.omg.CORBA.ValueMemberHelper.type ();
 122                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
 123                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.ValueMemberSeqHelper.id (), "ValueMemberSeq", _tcOf_members0);
 124                                 _members0[8] = new org.omg.CORBA.StructMember (
 125                                                                                "members",
 126                                                                                _tcOf_members0,
 127                                                                                null);
 128                                 _tcOf_members0 = com.sun.org.omg.CORBA.InitializerHelper.type ();
 129                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
 130                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.InitializerSeqHelper.id (), "InitializerSeq", _tcOf_members0);
 131                                 _members0[9] = new org.omg.CORBA.StructMember (
 132                                                                                "initializers",
 133                                                                                _tcOf_members0,
 134                                                                                null);
 135                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
 136                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0);
 137                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
 138                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdSeqHelper.id (), "RepositoryIdSeq", _tcOf_members0);
 139                                 _members0[10] = new org.omg.CORBA.StructMember (
 140                                                                                 "supported_interfaces",
 141                                                                                 _tcOf_members0,
 142                                                                                 null);
 143                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
 144                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0);
 145                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
 146                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdSeqHelper.id (), "RepositoryIdSeq", _tcOf_members0);
 147                                 _members0[11] = new org.omg.CORBA.StructMember (
 148                                                                                 "abstract_base_values",
 149                                                                                 _tcOf_members0,
 150                                                                                 null);
 151                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
 152                                 _members0[12] = new org.omg.CORBA.StructMember (
 153                                                                                 "is_truncatable",
 154                                                                                 _tcOf_members0,
 155                                                                                 null);
 156                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
 157                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0);
 158                                 _members0[13] = new org.omg.CORBA.StructMember (
 159                                                                                 "base_value",
 160                                                                                 _tcOf_members0,
 161                                                                                 null);
 162                                 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_TypeCode);
 163                                 _members0[14] = new org.omg.CORBA.StructMember (
 164                                                                                 "type",
 165                                                                                 _tcOf_members0,
 166                                                                                 null);
 167                                 __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescriptionHelper.id (), "FullValueDescription", _members0);
 168                                 __active = false;
 169                             }
 170                     }
 171             }
 172         return __typeCode;
 173     }
 174 
 175     public static String id ()
 176     {
 177         return _id;
 178     }
 179 
 180     public static com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription read (org.omg.CORBA.portable.InputStream istream)
 181     {
 182         com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription value = new com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription ();
 183         value.name = istream.read_string ();
 184         value.id = istream.read_string ();
 185         value.is_abstract = istream.read_boolean ();
 186         value.is_custom = istream.read_boolean ();
 187         value.defined_in = istream.read_string ();
 188         value.version = istream.read_string ();
 189         value.operations = com.sun.org.omg.CORBA.OpDescriptionSeqHelper.read (istream);
 190         value.attributes = com.sun.org.omg.CORBA.AttrDescriptionSeqHelper.read (istream);
 191         value.members = com.sun.org.omg.CORBA.ValueMemberSeqHelper.read (istream);
 192         value.initializers = com.sun.org.omg.CORBA.InitializerSeqHelper.read (istream);
 193         value.supported_interfaces = com.sun.org.omg.CORBA.RepositoryIdSeqHelper.read (istream);
 194         value.abstract_base_values = com.sun.org.omg.CORBA.RepositoryIdSeqHelper.read (istream);
 195         value.is_truncatable = istream.read_boolean ();
 196         value.base_value = istream.read_string ();
 197         value.type = istream.read_TypeCode ();
 198         return value;
 199     }
 200 
 201     public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription value)
 202     {
 203         ostream.write_string (value.name);
 204         ostream.write_string (value.id);
 205         ostream.write_boolean (value.is_abstract);
 206         ostream.write_boolean (value.is_custom);
 207         ostream.write_string (value.defined_in);
 208         ostream.write_string (value.version);
 209         com.sun.org.omg.CORBA.OpDescriptionSeqHelper.write (ostream, value.operations);
 210         com.sun.org.omg.CORBA.AttrDescriptionSeqHelper.write (ostream, value.attributes);
 211         com.sun.org.omg.CORBA.ValueMemberSeqHelper.write (ostream, value.members);
 212         com.sun.org.omg.CORBA.InitializerSeqHelper.write (ostream, value.initializers);
 213         com.sun.org.omg.CORBA.RepositoryIdSeqHelper.write (ostream, value.supported_interfaces);
 214         com.sun.org.omg.CORBA.RepositoryIdSeqHelper.write (ostream, value.abstract_base_values);
 215         ostream.write_boolean (value.is_truncatable);
 216         ostream.write_string (value.base_value);
 217         ostream.write_TypeCode (value.type);
 218     }
 219 
 220 }