public class _DynEnumStub extends ObjectImpl implements DynEnum
DynEnum objects support the manipulation of IDL enumerated values. The current position of a DynEnum is always -1.
public static final Class _opsClass
public _DynEnumStub()
public String get_as_string()
Returns the value of the DynEnum as an IDL identifier.
get_as_string
in interface DynEnumOperations
public void set_as_string(String value) throws InvalidValue
Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
set_as_string
in interface DynEnumOperations
InvalidValue
- If value contains a string that is not a valid IDL identifier for the corresponding enumerated typepublic int get_as_ulong()
Returns the value of the DynEnum as the enumerated value's ordinal value. Enumerators have ordinal values 0 to n-1, as they appear from left to right in the corresponding IDL definition.
get_as_ulong
in interface DynEnumOperations
public void set_as_ulong(int value) throws InvalidValue
Sets the value of the DynEnum as the enumerated value's ordinal value.
set_as_ulong
in interface DynEnumOperations
InvalidValue
- If value contains a value that is outside the range of ordinal values for the corresponding enumerated typepublic TypeCode type()
Returns the TypeCode associated with this DynAny object. A DynAny object is created with a TypeCode value assigned to it. This TypeCode value determines the type of the value handled through the DynAny object. Note that the TypeCode associated with a DynAny object is initialized at the time the DynAny is created and cannot be changed during lifetime of the DynAny object.
type
in interface DynAnyOperations
public void assign(DynAny dyn_any) throws TypeMismatch
Initializes the value associated with a DynAny object with the value associated with another DynAny object. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
assign
in interface DynAnyOperations
dyn_any
- TypeMismatch
- if the type of the passed DynAny is not equivalent to the type of target DynAnypublic void from_any(Any value) throws TypeMismatch, InvalidValue
Initializes the value associated with a DynAny object with the value contained in an any. The current position of the target DynAny is set to zero for values that have components and to -1 for values that do not have components.
from_any
in interface DynAnyOperations
TypeMismatch
- if the type of the passed Any is not equivalent to the type of target DynAnyInvalidValue
- if the passed Any does not contain a legal value (such as a null string)public Any to_any()
Creates an any value from a DynAny object. A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. The value associated with the DynAny object is copied into the any.
to_any
in interface DynAnyOperations
public boolean equal(DynAny dyn_any)
Compares two DynAny values for equality. Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys have equal values. The current position of the two DynAnys being compared has no effect on the result of equal.
equal
in interface DynAnyOperations
public void destroy()
Destroys a DynAny object. This operation frees any resources used to represent the data value associated with a DynAny object. It must be invoked on references obtained from one of the creation operations on the ORB interface or on a reference returned by DynAny.copy() to avoid resource leaks. Invoking destroy on component DynAny objects (for example, on objects returned by the current_component operation) does nothing. Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. That is, references to components of a destroyed DynAny become invalid. Invocations on such references raise OBJECT_NOT_EXIST. It is possible to manipulate a component of a DynAny beyond the life time of the DynAny from which the component was obtained by making a copy of the component with the copy operation before destroying the DynAny from which the component was obtained.
destroy
in interface DynAnyOperations
public DynAny copy()
Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
copy
in interface DynAnyOperations
public void insert_boolean(boolean value) throws TypeMismatch, InvalidValue
Inserts a boolean value into the DynAny.
insert_boolean
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_octet(byte value) throws TypeMismatch, InvalidValue
Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
insert_octet
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_char(char value) throws TypeMismatch, InvalidValue
Inserts a char value into the DynAny.
insert_char
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_short(short value) throws TypeMismatch, InvalidValue
Inserts a short value into the DynAny.
insert_short
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_ushort(short value) throws TypeMismatch, InvalidValue
Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
insert_ushort
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_long(int value) throws TypeMismatch, InvalidValue
Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
insert_long
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_ulong(int value) throws TypeMismatch, InvalidValue
Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
insert_ulong
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_float(float value) throws TypeMismatch, InvalidValue
Inserts a float value into the DynAny.
insert_float
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_double(double value) throws TypeMismatch, InvalidValue
Inserts a double value into the DynAny.
insert_double
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_string(String value) throws TypeMismatch, InvalidValue
Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
insert_string
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1InvalidValue
- if the string inserted is longer than the bound of a bounded stringTypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_reference(Object value) throws TypeMismatch, InvalidValue
Inserts a reference to a CORBA object into the DynAny.
insert_reference
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_typecode(TypeCode value) throws TypeMismatch, InvalidValue
Inserts a TypeCode object into the DynAny.
insert_typecode
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_longlong(long value) throws TypeMismatch, InvalidValue
Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
insert_longlong
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_ulonglong(long value) throws TypeMismatch, InvalidValue
Inserts a long value into the DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
insert_ulonglong
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_wchar(char value) throws TypeMismatch, InvalidValue
Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
insert_wchar
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_wstring(String value) throws TypeMismatch, InvalidValue
Inserts a string value into the DynAny. Both bounded and unbounded strings are inserted using this method.
insert_wstring
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1InvalidValue
- if the string inserted is longer than the bound of a bounded stringTypeMismatch
public void insert_any(Any value) throws TypeMismatch, InvalidValue
Inserts an Any value into the Any represented by this DynAny.
insert_any
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_dyn_any(DynAny value) throws TypeMismatch, InvalidValue
Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
insert_dyn_any
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic void insert_val(Serializable value) throws TypeMismatch, InvalidValue
Inserts a reference to a Serializable object into this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
insert_val
in interface DynAnyOperations
InvalidValue
- if this DynAny has components but has a current position of -1TypeMismatch
- if called on a DynAny whose current component itself has componentspublic boolean get_boolean() throws TypeMismatch, InvalidValue
Extracts the boolean value from this DynAny.
get_boolean
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public byte get_octet() throws TypeMismatch, InvalidValue
Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
get_octet
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public char get_char() throws TypeMismatch, InvalidValue
Extracts the char value from this DynAny.
get_char
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public short get_short() throws TypeMismatch, InvalidValue
Extracts the short value from this DynAny.
get_short
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public short get_ushort() throws TypeMismatch, InvalidValue
Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
get_ushort
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public int get_long() throws TypeMismatch, InvalidValue
Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
get_long
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public int get_ulong() throws TypeMismatch, InvalidValue
Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
get_ulong
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public float get_float() throws TypeMismatch, InvalidValue
Extracts the float value from this DynAny.
get_float
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public double get_double() throws TypeMismatch, InvalidValue
Extracts the double value from this DynAny.
get_double
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public String get_string() throws TypeMismatch, InvalidValue
Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
get_string
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public Object get_reference() throws TypeMismatch, InvalidValue
Extracts the reference to a CORBA Object from this DynAny.
get_reference
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public TypeCode get_typecode() throws TypeMismatch, InvalidValue
Extracts the TypeCode object from this DynAny.
get_typecode
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public long get_longlong() throws TypeMismatch, InvalidValue
Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
get_longlong
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public long get_ulonglong() throws TypeMismatch, InvalidValue
Extracts the long value from this DynAny. The IDL unsigned long long data type is mapped to the Java long data type.
get_ulonglong
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public char get_wchar() throws TypeMismatch, InvalidValue
Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
get_wchar
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public String get_wstring() throws TypeMismatch, InvalidValue
Extracts the string value from this DynAny. Both bounded and unbounded strings are extracted using this method.
get_wstring
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
public Any get_any() throws TypeMismatch, InvalidValue
Extracts an Any value contained in the Any represented by this DynAny.
get_any
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public DynAny get_dyn_any() throws TypeMismatch, InvalidValue
Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped into a new DynAny.
get_dyn_any
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public Serializable get_val() throws TypeMismatch, InvalidValue
Extracts a Serializable object from this DynAny. The IDL ValueBase type is mapped to the Java Serializable type.
get_val
in interface DynAnyOperations
TypeMismatch
- if the accessed component in the DynAny is of a type that is not equivalent to the requested type.TypeMismatch
- if called on a DynAny whose current component itself has componentsInvalidValue
- if this DynAny has components but has a current position of -1public boolean seek(int index)
Sets the current position to index. The current position is indexed 0 to n-1, that is, index zero corresponds to the first component. The operation returns true if the resulting current position indicates a component of the DynAny and false if index indicates a position that does not correspond to a component. Calling seek with a negative index is legal. It sets the current position to -1 to indicate no component and returns false. Passing a non-negative index value for a DynAny that does not have a component at the corresponding position sets the current position to -1 and returns false.
seek
in interface DynAnyOperations
public void rewind()
Is equivalent to seek(0).
rewind
in interface DynAnyOperations
public boolean next()
Advances the current position to the next component. The operation returns true while the resulting current position indicates a component, false otherwise. A false return value leaves the current position at -1. Invoking next on a DynAny without components leaves the current position at -1 and returns false.
next
in interface DynAnyOperations
public int component_count()
Returns the number of components of a DynAny. For a DynAny without components, it returns zero. The operation only counts the components at the top level. For example, if component_count is invoked on a DynStruct with a single member, the return value is 1, irrespective of the type of the member.
component_count
in interface DynAnyOperations
public DynAny current_component() throws TypeMismatch
Returns the DynAny for the component at the current position. It does not advance the current position, so repeated calls to current_component without an intervening call to rewind, next, or seek return the same component. The returned DynAny object reference can be used to get/set the value of the current component. If the current component represents a complex type, the returned reference can be narrowed based on the TypeCode to get the interface corresponding to the to the complex type. Calling current_component on a DynAny that cannot have components, such as a DynEnum or an empty exception, raises TypeMismatch. Calling current_component on a DynAny whose current position is -1 returns a nil reference. The iteration operations, together with current_component, can be used to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, current_component and next can be used to initialize all the components of the value. Once the dynamic value is completely initialized, to_any creates the corresponding any value.
current_component
in interface DynAnyOperations
TypeMismatch
- If called on a DynAny that cannot have components, such as a DynEnum or an empty exceptionpublic String[] _ids()
Description copied from class: ObjectImpl
Retrieves a string array containing the repository identifiers supported by this ObjectImpl
object. For example, for a stub, this method returns information about all the interfaces supported by the stub.
_ids
in class ObjectImpl
ObjectImpl
instance
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.