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

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

There is a newer version: 4.2.5
Show newest version
/*
 * 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
 */

package org.omg.CORBA;

/**
 * The mapping of a CORBA enum tagging
 * SET_OVERRIDE and ADD_OVERRIDE, which
 * indicate whether policies should replace the 
 * existing policies of an Object or be added to them.
 * 

* The method {@link org.omg.CORBA.Object#_set_policy_override(org.omg.CORBA.Policy[], org.omg.CORBA.SetOverrideType)} * takes either SetOverrideType.SET_OVERRIDE or * SetOverrideType.ADD_OVERRIDE as its second argument. * The method _set_policy_override * creates a new Object initialized with the * Policy objects supplied as the first argument. If the * second argument is ADD_OVERRIDE, the new policies * are added to those of the Object instance that is * calling the _set_policy_override method. If * SET_OVERRIDE is given instead, the existing policies * are replaced with the given ones. * * @author OMG * @version 1.20 07/27/07 * @since JDK1.2 */ // @SuppressWarnings({"serial"}) public class SetOverrideType implements org.omg.CORBA.portable.IDLEntity { /** * The int constant for the enum value SET_OVERRIDE. */ public static final int _SET_OVERRIDE = 0; /** * The int constant for the enum value ADD_OVERRIDE. */ public static final int _ADD_OVERRIDE = 1; /** * The SetOverrideType constant for the enum value SET_OVERRIDE. */ public static final SetOverrideType SET_OVERRIDE = new SetOverrideType(_SET_OVERRIDE); /** * The SetOverrideType constant for the enum value ADD_OVERRIDE. */ public static final SetOverrideType ADD_OVERRIDE = new SetOverrideType(_ADD_OVERRIDE); /** * Retrieves the value of this SetOverrideType instance. * * @return the int for this SetOverrideType instance. */ public int value() { return _value; } /** * Converts the given int to the corresponding * SetOverrideType instance. * * @param i the int to convert; must be either * SetOverrideType._SET_OVERRIDE or * SetOverrideType._ADD_OVERRIDE * @return the SetOverrideType instance whose value * matches the given int * @exception BAD_PARAM if the given int does not * match the value of * any SetOverrideType instance */ public static SetOverrideType from_int(int i) { switch (i) { case _SET_OVERRIDE: return SET_OVERRIDE; case _ADD_OVERRIDE: return ADD_OVERRIDE; default: throw new org.omg.CORBA.BAD_PARAM(); } } /** * Constructs a SetOverrideType instance from an * int. * @param _value must be either SET_OVERRIDE or * ADD_OVERRIDE */ protected SetOverrideType(int _value){ this._value = _value; } /** * The field containing the value for this SetOverrideType * object. * */ private int _value; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy