package test.interop.bug360;
/**
 * Generated from IDL enum "Enum4xxxxxxxxxxxxx".
 *
 * @author JacORB IDL compiler V @project.version@
 * @version generated at 25-Feb-2014 13:44:20
 */

public abstract class Enum4xxxxxxxxxxxxxHelper
{
	private volatile static org.omg.CORBA.TypeCode _type;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			synchronized(Enum4xxxxxxxxxxxxxHelper.class)
			{
				if (_type == null)
				{
					_type = org.omg.CORBA.ORB.init().create_enum_tc(test.interop.bug360.Enum4xxxxxxxxxxxxxHelper.id(),"Enum4xxxxxxxxxxxxx",new String[]{"E4Axxxxxxxxxxxxxxxxxxx","E4Bxxxxxxx","E4Cxxxxxxxxxxx","E4Dxxxxxxxx","E4Exxxxxxxxxxxxxx"});
				}
			}
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final test.interop.bug360.Enum4xxxxxxxxxxxxx s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static test.interop.bug360.Enum4xxxxxxxxxxxxx extract (final org.omg.CORBA.Any any)
	{
		org.omg.CORBA.portable.InputStream in = any.create_input_stream();
		try
		{
			return read (in);
		}
		finally
		{
			try
			{
				in.close();
			}
			catch (java.io.IOException e)
			{
			throw new RuntimeException("Unexpected exception " + e.toString() );
			}
		}
	}

	public static String id()
	{
		return "IDL:test/interop/bug360/Enum4xxxxxxxxxxxxx:1.0";
	}
	public static Enum4xxxxxxxxxxxxx read (final org.omg.CORBA.portable.InputStream in)
	{
		return Enum4xxxxxxxxxxxxx.from_int(in.read_long());
	}

	public static void write (final org.omg.CORBA.portable.OutputStream out, final Enum4xxxxxxxxxxxxx s)
	{
		out.write_long(s.value());
	}
}
