duke@1: /*
ohair@158: * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1: *
duke@1: * This code is free software; you can redistribute it and/or modify it
duke@1: * under the terms of the GNU General Public License version 2 only, as
ohair@158: * published by the Free Software Foundation. Oracle designates this
duke@1: * particular file as subject to the "Classpath" exception as provided
ohair@158: * by Oracle in the LICENSE file that accompanied this code.
duke@1: *
duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1: * version 2 for more details (a copy is included in the LICENSE file that
duke@1: * accompanied this code).
duke@1: *
duke@1: * You should have received a copy of the GNU General Public License version
duke@1: * 2 along with this work; if not, write to the Free Software Foundation,
duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1: *
ohair@158: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@158: * or visit www.oracle.com if you need additional information or have any
ohair@158: * questions.
duke@1: */
duke@1:
duke@1: /*
duke@1: * File: ./org/omg/CORBA/DefinitionKind.java
duke@1: * From: ./ir.idl
duke@1: * Date: Fri Aug 28 16:03:31 1998
duke@1: * By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
duke@1: */
duke@1:
duke@1: package org.omg.CORBA;
duke@1:
duke@1: /**
duke@1: * The class that provides the constants used to identify the type of an
duke@1: * Interface Repository object. This class contains two kinds of constants,
duke@1: * those that are an int
and those that are an instance of the class
duke@1: * DefinitionKind
. This class provides the method
duke@1: * from_int
, which given one
duke@1: * of the int
constants, creates the corresponding
duke@1: * DefinitionKind
instance. It also provides the method
duke@1: * value
, which returns the int
constant that
duke@1: * is the value for a DefinitionKind
instance.
duke@1: *
duke@1: * @see IRObject
duke@1: */
duke@1:
duke@1: public class DefinitionKind implements org.omg.CORBA.portable.IDLEntity {
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object
duke@1: * does not have a definition kind.
duke@1: */
duke@1: public static final int _dk_none = 0,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that the type of an Interface Repository object
duke@1: * may be any type.
duke@1: */
duke@1: _dk_all = 1,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * attribute.
duke@1: */
duke@1: _dk_Attribute = 2,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * constant.
duke@1: */
duke@1: _dk_Constant = 3,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * exception.
duke@1: */
duke@1:
duke@1: _dk_Exception = 4,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * interface.
duke@1: */
duke@1:
duke@1: _dk_Interface = 5,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * module.
duke@1: */
duke@1:
duke@1: _dk_Module = 6,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * operation.
duke@1: */
duke@1:
duke@1: _dk_Operation = 7,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Typedef.
duke@1: */
duke@1:
duke@1: _dk_Typedef = 8,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * Alias.
duke@1: */
duke@1:
duke@1: _dk_Alias = 9,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Struct.
duke@1: */
duke@1:
duke@1: _dk_Struct = 10,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Union.
duke@1: */
duke@1:
duke@1: _dk_Union = 11,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * Enum.
duke@1: */
duke@1:
duke@1: _dk_Enum = 12,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Primitive.
duke@1: */
duke@1:
duke@1: _dk_Primitive = 13,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * String.
duke@1: */
duke@1:
duke@1: _dk_String = 14,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Sequence.
duke@1: */
duke@1:
duke@1: _dk_Sequence = 15,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is an
duke@1: * Array.
duke@1: */
duke@1:
duke@1: _dk_Array = 16,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Repository.
duke@1: */
duke@1:
duke@1: _dk_Repository = 17,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Wstring.
duke@1: */
duke@1:
duke@1: _dk_Wstring = 18,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is of type
duke@1: * Fixed.
duke@1: */
duke@1:
duke@1: _dk_Fixed = 19,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * Value.
duke@1: */
duke@1:
duke@1: _dk_Value = 20,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * ValueBox.
duke@1: */
duke@1:
duke@1: _dk_ValueBox = 21,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is a
duke@1: * ValueMember.
duke@1: */
duke@1:
duke@1: _dk_ValueMember = 22,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object is of type
duke@1: * Native.
duke@1: */
duke@1:
duke@1: _dk_Native = 23,
duke@1:
duke@1: /**
duke@1: * The constant that indicates that an Interface Repository object
duke@1: * is representing an abstract interface.
duke@1: */
duke@1: _dk_AbstractInterface = 24;
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object has no definition kind.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_none = new DefinitionKind(_dk_none);
duke@1:
duke@1: /**
duke@1: * The wildcard DefinitionKind
constant, useful
duke@1: * in all occasions where any
duke@1: * DefinitionKind
is appropriate. The Container's
duke@1: * contents
method
duke@1: * makes use of this constant to return all contained definitions of any kind.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_all = new DefinitionKind(_dk_all);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Attribute.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Attribute = new DefinitionKind(_dk_Attribute);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a constant.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Constant = new DefinitionKind(_dk_Constant);
duke@1:
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Exception.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Exception = new DefinitionKind(_dk_Exception);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Interface.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Interface = new DefinitionKind(_dk_Interface);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Module.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Module = new DefinitionKind(_dk_Module);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Operation.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Operation = new DefinitionKind(_dk_Operation);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Typedef.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Typedef = new DefinitionKind(_dk_Typedef);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Alias.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Alias = new DefinitionKind(_dk_Alias);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Struct.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Struct = new DefinitionKind(_dk_Struct);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Union.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Union = new DefinitionKind(_dk_Union);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Enum.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Enum = new DefinitionKind(_dk_Enum);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Primitive.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Primitive = new DefinitionKind(_dk_Primitive);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a String.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_String = new DefinitionKind(_dk_String);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Sequence.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Sequence = new DefinitionKind(_dk_Sequence);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is an Array.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Array = new DefinitionKind(_dk_Array);
duke@1:
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Repository.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Repository = new DefinitionKind(_dk_Repository);
duke@1:
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Wstring.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Wstring = new DefinitionKind(_dk_Wstring);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Fixed value.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Fixed = new DefinitionKind(_dk_Fixed);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Value.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Value = new DefinitionKind(_dk_Value);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a ValueBox.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_ValueBox = new DefinitionKind(_dk_ValueBox);
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a ValueMember.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_ValueMember = new DefinitionKind(_dk_ValueMember);
duke@1:
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object is a Native value.
duke@1: */
duke@1:
duke@1: public static final DefinitionKind dk_Native = new DefinitionKind(_dk_Native);
duke@1:
duke@1:
duke@1: /**
duke@1: * The static instance of DefinitionKind
indicating that an
duke@1: * Interface Repository object represents an abstract interface.
duke@1: */
duke@1: public static final DefinitionKind dk_AbstractInterface = new DefinitionKind(_dk_AbstractInterface);
duke@1:
duke@1:
duke@1: /**
duke@1: * Returns the int
constant identifying the type of an IR object.
duke@1: * @return the int
constant from the class
duke@1: * DefinitionKind
that is the value of this
duke@1: * DefinitionKind
instance
duke@1: */
duke@1:
duke@1: public int value() {
duke@1: return _value;
duke@1: }
duke@1:
duke@1:
duke@1: /**
duke@1: * Creates a DefinitionKind
instance corresponding to the given code
duke@1: .
duke@1: * @param i one of the int
constants from the class
duke@1: * DefinitionKind
duke@1: * @return the DefinitionKind
instance corresponding
duke@1: * to the given code
duke@1: * @throws org.omg.CORBA.BAD_PARAM if the given parameter is not
duke@1: one
duke@1: * of the int
constants from the class
duke@1: * DefinitionKind
duke@1: */
duke@1:
duke@1: public static DefinitionKind from_int(int i) {
duke@1: switch (i) {
duke@1: case _dk_none:
duke@1: return dk_none;
duke@1: case _dk_all:
duke@1: return dk_all;
duke@1: case _dk_Attribute:
duke@1: return dk_Attribute;
duke@1: case _dk_Constant:
duke@1: return dk_Constant;
duke@1: case _dk_Exception:
duke@1: return dk_Exception;
duke@1: case _dk_Interface:
duke@1: return dk_Interface;
duke@1: case _dk_Module:
duke@1: return dk_Module;
duke@1: case _dk_Operation:
duke@1: return dk_Operation;
duke@1: case _dk_Typedef:
duke@1: return dk_Typedef;
duke@1: case _dk_Alias:
duke@1: return dk_Alias;
duke@1: case _dk_Struct:
duke@1: return dk_Struct;
duke@1: case _dk_Union:
duke@1: return dk_Union;
duke@1: case _dk_Enum:
duke@1: return dk_Enum;
duke@1: case _dk_Primitive:
duke@1: return dk_Primitive;
duke@1: case _dk_String:
duke@1: return dk_String;
duke@1: case _dk_Sequence:
duke@1: return dk_Sequence;
duke@1: case _dk_Array:
duke@1: return dk_Array;
duke@1: case _dk_Repository:
duke@1: return dk_Repository;
duke@1: case _dk_Wstring:
duke@1: return dk_Wstring;
duke@1: case _dk_Fixed:
duke@1: return dk_Fixed;
duke@1: case _dk_Value:
duke@1: return dk_Value;
duke@1: case _dk_ValueBox:
duke@1: return dk_ValueBox;
duke@1: case _dk_ValueMember:
duke@1: return dk_ValueMember;
duke@1: case _dk_Native:
duke@1: return dk_Native;
duke@1: default:
duke@1: throw new org.omg.CORBA.BAD_PARAM();
duke@1: }
duke@1: }
duke@1:
duke@1: /**
duke@1: * Constructs a DefinitionKind
object with its _value
duke@1: * field initialized with the given value.
duke@1: * @param _value one of the int
constants defined in the
duke@1: * class DefinitionKind
duke@1: */
duke@1:
duke@1: protected DefinitionKind(int _value){
duke@1: this._value = _value;
duke@1: }
duke@1:
duke@1: /**
duke@1: * The field that holds a value for a DefinitionKind
object.
duke@1: * @serial
duke@1: */
duke@1:
duke@1: private int _value;
duke@1: }