ParameterModeHelper.java revision 608:7e06bf1dcb09
1169718Skan/* 2169718Skan * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. 3169718Skan * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4169718Skan * 5169718Skan * This code is free software; you can redistribute it and/or modify it 6169718Skan * under the terms of the GNU General Public License version 2 only, as 7169718Skan * published by the Free Software Foundation. Oracle designates this 8169718Skan * particular file as subject to the "Classpath" exception as provided 9169718Skan * by Oracle in the LICENSE file that accompanied this code. 10169718Skan * 11169718Skan * This code is distributed in the hope that it will be useful, but WITHOUT 12169718Skan * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13169718Skan * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14169718Skan * version 2 for more details (a copy is included in the LICENSE file that 15169718Skan * accompanied this code). 16169718Skan * 17169718Skan * You should have received a copy of the GNU General Public License version 18169718Skan * 2 along with this work; if not, write to the Free Software Foundation, 19169718Skan * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20169718Skan * 21169718Skan * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22169718Skan * or visit www.oracle.com if you need additional information or have any 23169718Skan * questions. 24169718Skan */ 25169718Skanpackage com.sun.org.omg.CORBA; 26169718Skan 27169718Skan 28169718Skan/** 29169718Skan* com/sun/org/omg/CORBA/ParameterModeHelper.java 30169718Skan* Generated by the IDL-to-Java compiler (portable), version "3.0" 31169718Skan* from ir.idl 32169718Skan* Thursday, May 6, 1999 1:51:50 AM PDT 33169718Skan*/ 34169718Skan 35169718Skanpublic final class ParameterModeHelper 36169718Skan{ 37169718Skan private static String _id = "IDL:omg.org/CORBA/ParameterMode:1.0"; 38169718Skan 39169718Skan public ParameterModeHelper() 40169718Skan { 41169718Skan } 42169718Skan 43169718Skan public static void insert (org.omg.CORBA.Any a, com.sun.org.omg.CORBA.ParameterMode that) 44169718Skan { 45169718Skan org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 46169718Skan a.type (type ()); 47169718Skan write (out, that); 48169718Skan a.read_value (out.create_input_stream (), type ()); 49169718Skan } 50169718Skan 51169718Skan public static com.sun.org.omg.CORBA.ParameterMode extract (org.omg.CORBA.Any a) 52169718Skan { 53169718Skan return read (a.create_input_stream ()); 54169718Skan } 55169718Skan 56169718Skan private static org.omg.CORBA.TypeCode __typeCode = null; 57169718Skan synchronized public static org.omg.CORBA.TypeCode type () 58169718Skan { 59169718Skan if (__typeCode == null) 60169718Skan { 61169718Skan __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (com.sun.org.omg.CORBA.ParameterModeHelper.id (), "ParameterMode", new String[] { "PARAM_IN", "PARAM_OUT", "PARAM_INOUT"} ); 62169718Skan } 63169718Skan return __typeCode; 64169718Skan } 65169718Skan 66169718Skan public static String id () 67169718Skan { 68169718Skan return _id; 69169718Skan } 70169718Skan 71169718Skan public static com.sun.org.omg.CORBA.ParameterMode read (org.omg.CORBA.portable.InputStream istream) 72169718Skan { 73169718Skan return com.sun.org.omg.CORBA.ParameterMode.from_int (istream.read_long ()); 74169718Skan } 75169718Skan 76169718Skan public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.org.omg.CORBA.ParameterMode value) 77169718Skan { 78169718Skan ostream.write_long (value.value ()); 79169718Skan } 80169718Skan 81169718Skan} 82169718Skan