001    package org.omg.GIOP;
002    /**
003     * Generated from IDL enum "ReplyStatusType_1_2".
004     *
005     * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
006     * @version generated at Sep 22, 2012 10:58:01 AM
007     */
008    
009    public final class ReplyStatusType_1_2
010            implements org.omg.CORBA.portable.IDLEntity
011    {
012            private int value = -1;
013            public static final int _NO_EXCEPTION = 0;
014            public static final ReplyStatusType_1_2 NO_EXCEPTION = new ReplyStatusType_1_2(_NO_EXCEPTION);
015            public static final int _USER_EXCEPTION = 1;
016            public static final ReplyStatusType_1_2 USER_EXCEPTION = new ReplyStatusType_1_2(_USER_EXCEPTION);
017            public static final int _SYSTEM_EXCEPTION = 2;
018            public static final ReplyStatusType_1_2 SYSTEM_EXCEPTION = new ReplyStatusType_1_2(_SYSTEM_EXCEPTION);
019            public static final int _LOCATION_FORWARD = 3;
020            public static final ReplyStatusType_1_2 LOCATION_FORWARD = new ReplyStatusType_1_2(_LOCATION_FORWARD);
021            public static final int _LOCATION_FORWARD_PERM = 4;
022            public static final ReplyStatusType_1_2 LOCATION_FORWARD_PERM = new ReplyStatusType_1_2(_LOCATION_FORWARD_PERM);
023            public static final int _NEEDS_ADDRESSING_MODE = 5;
024            public static final ReplyStatusType_1_2 NEEDS_ADDRESSING_MODE = new ReplyStatusType_1_2(_NEEDS_ADDRESSING_MODE);
025            public int value()
026            {
027                    return value;
028            }
029            public static ReplyStatusType_1_2 from_int(int value)
030            {
031                    switch (value) {
032                            case _NO_EXCEPTION: return NO_EXCEPTION;
033                            case _USER_EXCEPTION: return USER_EXCEPTION;
034                            case _SYSTEM_EXCEPTION: return SYSTEM_EXCEPTION;
035                            case _LOCATION_FORWARD: return LOCATION_FORWARD;
036                            case _LOCATION_FORWARD_PERM: return LOCATION_FORWARD_PERM;
037                            case _NEEDS_ADDRESSING_MODE: return NEEDS_ADDRESSING_MODE;
038                            default: throw new org.omg.CORBA.BAD_PARAM();
039                    }
040            }
041            public String toString()
042            {
043                    switch (value) {
044                            case _NO_EXCEPTION: return "NO_EXCEPTION";
045                            case _USER_EXCEPTION: return "USER_EXCEPTION";
046                            case _SYSTEM_EXCEPTION: return "SYSTEM_EXCEPTION";
047                            case _LOCATION_FORWARD: return "LOCATION_FORWARD";
048                            case _LOCATION_FORWARD_PERM: return "LOCATION_FORWARD_PERM";
049                            case _NEEDS_ADDRESSING_MODE: return "NEEDS_ADDRESSING_MODE";
050                            default: throw new org.omg.CORBA.BAD_PARAM();
051                    }
052            }
053            protected ReplyStatusType_1_2(int i)
054            {
055                    value = i;
056            }
057            java.lang.Object readResolve()
058            throws java.io.ObjectStreamException
059            {
060                    return from_int(value());
061            }
062    }