/***** Copyright (c) 1999-2000 Object Management Group. Unlimited rights to 
       duplicate and use this code are hereby granted provided that this 
       copyright notice is included.
*****/

/***** This class is generated by an IDL compiler and is ORB-vendor specific. 
       A "dummy" implementation is provided so that the "official" org.omg.*
       packages may be compiled.  In order to actually use a Java ORB,
       the ORB vendor's implementation will provide a "real"
       implementation of the class.

       In order to be conformant the class shall support the signatures
       specified here, but will have an orb-specific implementation.

       The class may support additional vendor specific functionality.
       It shall have at least the inheritance relationships specified
       here. Any additional (vendor specific) inheritance relationships may 
       only be with other classes and interfaces that are guaranteed to be 
       present in the JDK core.
*****/

package org.omg.CORBA;

public class DefinitionKind implements org.omg.CORBA.portable.IDLEntity {

    public static final int _dk_none = 0;
    public static final DefinitionKind dk_none = 
        new DefinitionKind(_dk_none);

    public static final int _dk_all = 1;
    public static final DefinitionKind dk_all = 
        new DefinitionKind(_dk_all);

    public static final int _dk_Attribute = 2;
    public static final DefinitionKind dk_Attribute =
        new DefinitionKind(_dk_Attribute);

    public static final int _dk_Constant = 3;
    public static final DefinitionKind dk_Constant =
        new DefinitionKind(_dk_Constant);

    public static final int _dk_Exception = 4;
    public static final DefinitionKind dk_Exception =
        new DefinitionKind(_dk_Exception);

    public static final int _dk_Interface = 5;
    public static final DefinitionKind dk_Interface =
        new DefinitionKind(_dk_Interface);

    public static final int _dk_Module = 6;
    public static final DefinitionKind dk_Module =
        new DefinitionKind(_dk_Module);

    public static final int _dk_Operation = 7;
    public static final DefinitionKind dk_Operation =
        new DefinitionKind(_dk_Operation);

    public static final int _dk_Typedef = 8;
    public static final DefinitionKind dk_Typedef =
        new DefinitionKind(_dk_Typedef);

    public static final int _dk_Alias = 9;
    public static final DefinitionKind dk_Alias =
        new DefinitionKind(_dk_Alias);

    public static final int _dk_Struct = 10;
    public static final DefinitionKind dk_Struct =
        new DefinitionKind(_dk_Struct);

    public static final int _dk_Union = 11;
    public static final DefinitionKind dk_Union =
        new DefinitionKind(_dk_Union);

    public static final int _dk_Enum = 12;
    public static final DefinitionKind dk_Enum =
        new DefinitionKind(_dk_Enum);

    public static final int _dk_Primitive = 13;
    public static final DefinitionKind dk_Primitive =
        new DefinitionKind(_dk_Primitive);

    public static final int _dk_String= 14;
    public static final DefinitionKind dk_String =
        new DefinitionKind(_dk_String);

    public static final int _dk_Sequence = 15;
    public static final DefinitionKind dk_Sequence =
        new DefinitionKind(_dk_Sequence);

    public static final int _dk_Array = 16;
    public static final DefinitionKind dk_Array =
        new DefinitionKind(_dk_Array);

    public static final int _dk_Repository = 17;
    public static final DefinitionKind dk_Repository =
        new DefinitionKind(_dk_Repository);

    public static final int _dk_Wstring = 18;
    public static final DefinitionKind dk_Wstring =
        new DefinitionKind(_dk_Wstring);

    public static final int _dk_Fixed = 19;
    public static final DefinitionKind dk_Fixed =
        new DefinitionKind(_dk_Fixed);

    public static final int _dk_Value = 20;
    public static final DefinitionKind dk_Value =
        new DefinitionKind(_dk_Value);

    public static final int _dk_ValueBox = 21;
    public static final DefinitionKind dk_ValueBox =
        new DefinitionKind(_dk_ValueBox);

    public static final int _dk_ValueMember = 22;
    public static final DefinitionKind dk_ValueMember =
        new DefinitionKind(_dk_ValueMember);

    public static final int _dk_Native = 23;
    public static final DefinitionKind dk_Native =
        new DefinitionKind(_dk_Native);

    public int value() { 
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }

    public static DefinitionKind from_int(int val) 
			 /* Issue 3669  throws org.omg.CORBA.BAD_PARAM */{
    switch (val) {
        case _dk_none:
            return dk_none;
        case _dk_all:
            return dk_all;
        case _dk_Attribute:
            return dk_Attribute;
        case _dk_Constant:
            return dk_Constant;
        case _dk_Exception:
            return dk_Exception;
        case _dk_Interface:
            return dk_Interface;
        case _dk_Module:
            return dk_Module;
        case _dk_Operation:
            return dk_Operation;
        case _dk_Typedef:
            return dk_Typedef;
        case _dk_Alias:
            return dk_Alias;
        case _dk_Struct:
            return dk_Struct;
        case _dk_Union:
            return dk_Union;
        case _dk_Enum:
            return dk_Enum;
        case _dk_Primitive:
            return dk_Primitive;
        case _dk_String:
            return dk_String;
        case _dk_Sequence:
            return dk_Sequence;
        case _dk_Array:
            return dk_Array;
        case _dk_Repository:
            return dk_Repository;
        case _dk_Wstring:
            return dk_Wstring;
        case _dk_Fixed:
            return dk_Fixed;
        case _dk_Value:
            return dk_Value;
        case _dk_ValueBox:
            return dk_ValueBox;
        case _dk_ValueMember:
            return dk_ValueMember;
        case _dk_Native:
            return dk_Native;
    default:
        throw new org.omg.CORBA.BAD_PARAM();
    }
    }

    protected DefinitionKind(int _value) {
        throw new org.omg.CORBA.NO_IMPLEMENT();
    }


    public java.lang.Object readResolve() throws java.io.ObjectStreamException
    {
	return from_int( value() ) ;
    }
}
