All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.omg.CORBA.DefinitionKind Maven / Gradle / Ivy

/*
 * Copyright (c) 1997, 2020 Oracle and/or its affiliates.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
 * v. 1.0 which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the Eclipse
 * Public License v. 2.0 are satisfied: GNU General Public License v2.0
 * w/Classpath exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause OR GPL-2.0 WITH
 * Classpath-exception-2.0
 */

/*
 * File: ./org/omg/CORBA/DefinitionKind.java
 * From: ./ir.idl
 * Date: Fri Aug 28 16:03:31 1998
 *   By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
 */

package org.omg.CORBA;

/**
* The class that provides the constants used to identify the type of an
* Interface Repository object.  This class contains two kinds of constants,
* those that are an int and those that are an instance of the class
* DefinitionKind.  This class provides the method
* from_int, which given one
* of the int constants, creates the corresponding
* DefinitionKind instance.  It also provides the method
* value, which returns the int constant that
* is the value for a DefinitionKind instance.
*
* @see IRObject
*/

// @SuppressWarnings({"serial"})
public class DefinitionKind implements org.omg.CORBA.portable.IDLEntity {

/**
 * The constant that indicates that an Interface Repository object
 * does not have a definition kind.
 */
        public static final int _dk_none = 0,

/**
 * The constant that indicates that the type of an Interface Repository object
 * may be any type.
 */
        _dk_all = 1,

/**
 * The constant that indicates that an Interface Repository object is an
 * attribute.
 */
        _dk_Attribute = 2,

/**
 * The constant that indicates that an Interface Repository object is a
 * constant.
 */
        _dk_Constant = 3,

/**
 * The constant that indicates that an Interface Repository object is an
 * exception.
 */

        _dk_Exception = 4,

/**
 * The constant that indicates that an Interface Repository object is an
 * interface.
 */

        _dk_Interface = 5,

/**
 * The constant that indicates that an Interface Repository object is a
 * module.
 */

        _dk_Module = 6,

/**
 * The constant that indicates that an Interface Repository object is an
 * operation.
 */

        _dk_Operation = 7,

/**
 * The constant that indicates that an Interface Repository object is a
 * Typedef.
 */

        _dk_Typedef = 8,

/**
 * The constant that indicates that an Interface Repository object is an
 * Alias.
 */

        _dk_Alias = 9,

/**
 * The constant that indicates that an Interface Repository object is a
 * Struct.
 */

        _dk_Struct = 10,

/**
 * The constant that indicates that an Interface Repository object is a
 * Union.
 */

        _dk_Union = 11,

/**
 * The constant that indicates that an Interface Repository object is an
 * Enum.
 */

        _dk_Enum = 12,

/**
 * The constant that indicates that an Interface Repository object is a
 * Primitive.
 */

        _dk_Primitive = 13,

/**
 * The constant that indicates that an Interface Repository object is a
 * String.
 */

        _dk_String = 14,

/**
 * The constant that indicates that an Interface Repository object is a
 * Sequence.
 */

        _dk_Sequence = 15,

/**
 * The constant that indicates that an Interface Repository object is an
 * Array.
 */

        _dk_Array = 16,

/**
 * The constant that indicates that an Interface Repository object is a
 * Repository.
 */

        _dk_Repository = 17,

/**
 * The constant that indicates that an Interface Repository object is a
 * Wstring.
 */

        _dk_Wstring = 18,

/**
 * The constant that indicates that an Interface Repository object is of type
 * Fixed.
 */

        _dk_Fixed = 19,

/**
 * The constant that indicates that an Interface Repository object is a
 * Value.
 */

        _dk_Value = 20,

/**
 * The constant that indicates that an Interface Repository object is a
 * ValueBox.
 */

        _dk_ValueBox = 21,

/**
 * The constant that indicates that an Interface Repository object is a
 * ValueMember.
 */

        _dk_ValueMember = 22,

/**
 * The constant that indicates that an Interface Repository object is of type
 * Native.
 */

        _dk_Native = 23,

/**
 * The constant that indicates that an Interface Repository object
 * is representing an abstract interface.
 */
        _dk_AbstractInterface = 24;

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object has no definition kind.
 */

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

     /**
         * The wildcard DefinitionKind constant, useful
         * in all occasions where any
     * DefinitionKind is appropriate. The Container's
         * contents method
     * makes use of this constant to return all contained definitions of any kind.
         */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Attribute.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a constant.
 */

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


/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Exception.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Interface.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Module.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Operation.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Typedef.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Alias.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Struct.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Union.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Enum.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Primitive.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a String.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Sequence.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is an Array.
 */

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


/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Repository.
 */

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


/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Wstring.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Fixed value.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Value.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a ValueBox.
 */

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

/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a ValueMember.
 */

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


/**
 * The static instance of DefinitionKind indicating that an
 * Interface Repository object is a Native value.
 */

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


/**
* The static instance of DefinitionKind indicating that an
* Interface Repository object represents an abstract interface.
*/
    public static final DefinitionKind dk_AbstractInterface = new DefinitionKind(_dk_AbstractInterface);


     /**
     * Returns the int constant identifying the type of an IR object.
     * @return the int constant from the class
         * DefinitionKind that is the value of this
         * DefinitionKind instance
     */

    public int value() {
        return _value;
    }


     /**
     * Creates a DefinitionKind instance corresponding to the given code
.
     * @param i one of the int constants from the class
         * DefinitionKind
         * @return the DefinitionKind instance corresponding
         *         to the given code
         * @throws org.omg.CORBA.BAD_PARAM if the given parameter is not
 one
         *         of the int constants from the class
         *         DefinitionKind
     */

    public static DefinitionKind from_int(int i) {
        switch (i) {
        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();
        }
    }

   /**
    * Constructs a DefinitionKind object with its _value
    * field initialized with the given value.
    * @param _value one of the int constants defined in the
    *                   class DefinitionKind
    */

    protected DefinitionKind(int _value){
        this._value = _value;
    }

     /**
      * The field that holds a value for a DefinitionKind object.
      * @serial
      */

    private int _value;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy