org.omg.DynamicAny.DynAnyPackage.TypeMismatch Java Examples
The following examples show how to use
org.omg.DynamicAny.DynAnyPackage.TypeMismatch.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DynUnionImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public void set_to_default_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } int defaultIndex = defaultIndex(); if (defaultIndex == -1) { throw new TypeMismatch(); } try { clearData(); index = 1; currentMemberIndex = defaultIndex; currentMember = DynAnyUtil.createMostDerivedDynAny(memberType(defaultIndex), orb); components = new DynAny[] {discriminator, currentMember}; Any discriminatorAny = orb.create_any(); discriminatorAny.insert_octet((byte)0); discriminator = DynAnyUtil.createMostDerivedDynAny(discriminatorAny, orb, false); representations = REPRESENTATION_COMPONENTS; } catch (InconsistentTypeCode ictc) {} }
Example #2
Source File: DynUnionImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public void set_to_no_active_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } // _REVISIT_ How does one check for "entire range of discriminator values"? if (defaultIndex() != -1) { throw new TypeMismatch(); } checkInitComponents(); Any discriminatorAny = getAny(discriminator); // erase the discriminators value so that it does not correspond // to any of the unions case labels discriminatorAny.type(discriminatorAny.type()); index = 0; currentMemberIndex = NO_INDEX; // Necessary to guarantee OBJECT_NOT_EXIST in member() currentMember.destroy(); currentMember = null; components[0] = discriminator; representations = REPRESENTATION_COMPONENTS; }
Example #3
Source File: DynUnionImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void set_to_no_active_member () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } // _REVISIT_ How does one check for "entire range of discriminator values"? if (defaultIndex() != -1) { throw new TypeMismatch(); } checkInitComponents(); Any discriminatorAny = getAny(discriminator); // erase the discriminators value so that it does not correspond // to any of the unions case labels discriminatorAny.type(discriminatorAny.type()); index = 0; currentMemberIndex = NO_INDEX; // Necessary to guarantee OBJECT_NOT_EXIST in member() currentMember.destroy(); currentMember = null; components[0] = discriminator; representations = REPRESENTATION_COMPONENTS; }
Example #4
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public void insert_string(String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_string) throw new TypeMismatch(); if (value == null) throw new InvalidValue(); // Throw InvalidValue if this is a bounded string and the length is exceeded try { if (any.type().length() > 0 && any.type().length() < value.length()) throw new InvalidValue(); } catch (BadKind bad) { // impossible } any.insert_string(value); }
Example #5
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_octet(byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_octet) throw new TypeMismatch(); any.insert_octet(value); }
Example #6
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void assign (org.omg.DynamicAny.DynAny dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } super.assign(dyn_any); index = NO_INDEX; }
Example #7
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void from_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } super.from_any(value); index = NO_INDEX; }
Example #8
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_wstring(String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); currentComponent.insert_wstring(value); }
Example #9
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public java.io.Serializable get_val() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); return currentComponent.get_val(); }
Example #10
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public int get_long() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); return currentComponent.get_long(); }
Example #11
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void insert_ulonglong(long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_ulonglong) throw new TypeMismatch(); any.insert_ulonglong(value); }
Example #12
Source File: DynAnyUtil.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
static boolean set_current_component(DynAny dynAny, DynAny currentComponent) { if (currentComponent != null) { try { dynAny.rewind(); do { if (dynAny.current_component() == currentComponent) return true; } while (dynAny.next()); } catch (TypeMismatch tm) { /* impossible */ } } return false; }
Example #13
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void assign (org.omg.DynamicAny.DynAny dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } super.assign(dyn_any); index = NO_INDEX; }
Example #14
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void insert_val(java.io.Serializable value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } int kind = any.type().kind().value(); if (kind != TCKind._tk_value && kind != TCKind._tk_value_box) throw new TypeMismatch(); any.insert_Value(value); }
Example #15
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_octet(byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); currentComponent.insert_octet(value); }
Example #16
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public long get_longlong() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_longlong) throw new TypeMismatch(); return any.extract_longlong(); }
Example #17
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void from_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } super.from_any(value); index = NO_INDEX; }
Example #18
Source File: DynAnyComplexImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public TCKind current_member_kind () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if( ! checkInitComponents() || index < 0 || index >= components.length) { throw new InvalidValue(); } return components[index].type().kind(); }
Example #19
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_val(java.io.Serializable value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); currentComponent.insert_val(value); }
Example #20
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public int get_long() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_long) throw new TypeMismatch(); return any.extract_long(); }
Example #21
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public char get_char() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); return currentComponent.get_char(); }
Example #22
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_ulonglong(long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_ulonglong) throw new TypeMismatch(); any.insert_ulonglong(value); }
Example #23
Source File: DynAnyConstructedImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_long(int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (index == NO_INDEX) throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue(); DynAny currentComponent = current_component(); if (DynAnyUtil.isConstructedDynAny(currentComponent)) throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch(); currentComponent.insert_long(value); }
Example #24
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public int get_long() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_long) throw new TypeMismatch(); return any.extract_long(); }
Example #25
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public void insert_val(java.io.Serializable value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } int kind = any.type().kind().value(); if (kind != TCKind._tk_value && kind != TCKind._tk_value_box) throw new TypeMismatch(); any.insert_Value(value); }
Example #26
Source File: DynAnyBasicImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public double get_double() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_double) throw new TypeMismatch(); return any.extract_double(); }
Example #27
Source File: DynValueBoxImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void set_boxed_value_as_dyn_any(DynAny boxed) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if ( ! isNull && ! boxed.type().equal(this.type())) { throw new TypeMismatch(); } clearData(); components = new DynAny[] {boxed}; representations = REPRESENTATION_COMPONENTS; index = 0; isNull = false; }
Example #28
Source File: DynValueBoxImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public void set_boxed_value(org.omg.CORBA.Any boxed) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { if ( ! isNull && ! boxed.type().equal(this.type())) { throw new TypeMismatch(); } clearData(); any = boxed; representations = REPRESENTATION_ANY; index = 0; isNull = false; }
Example #29
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public long get_ulonglong() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_ulonglong) throw new TypeMismatch(); return any.extract_ulonglong(); }
Example #30
Source File: DynAnyBasicImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public String get_string() throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_string) throw new TypeMismatch(); return any.extract_string(); }