Methods Summary |
---|
public void | assign(org.omg.DynamicAny.DynAny dyn_any)
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
clearData();
super.assign(dyn_any);
representations = REPRESENTATION_ANY;
index = 0;
|
protected void | checkInitAny()
if ((representations & REPRESENTATION_ANY) == 0) {
//System.out.println(this + " checkInitAny: reps does not have REPRESENTATION_ANY");
if ((representations & REPRESENTATION_COMPONENTS) != 0) {
//System.out.println(this + " checkInitAny: reps has REPRESENTATION_COMPONENTS");
if (initializeAnyFromComponents()) {
representations |= REPRESENTATION_ANY;
}
} else if ((representations & REPRESENTATION_TYPECODE) != 0) {
//System.out.println(this + " checkInitAny: reps has REPRESENTATION_TYPECODE");
if (representations == REPRESENTATION_TYPECODE && isRecursive())
return;
if (initializeComponentsFromTypeCode()) {
representations |= REPRESENTATION_COMPONENTS;
}
if (initializeAnyFromComponents()) {
representations |= REPRESENTATION_ANY;
}
}
} else {
//System.out.println(this + " checkInitAny: reps != REPRESENTATION_ANY");
}
return;
|
protected boolean | checkInitComponents()
if ((representations & REPRESENTATION_COMPONENTS) == 0) {
if ((representations & REPRESENTATION_ANY) != 0) {
if (initializeComponentsFromAny()) {
representations |= REPRESENTATION_COMPONENTS;
} else {
return false;
}
} else if ((representations & REPRESENTATION_TYPECODE) != 0) {
if (initializeComponentsFromTypeCode()) {
representations |= REPRESENTATION_COMPONENTS;
} else {
return false;
}
}
}
return true;
|
protected void | clearData()
super.clearData();
// _REVISIT_ What about status?
components = emptyComponents;
index = NO_INDEX;
representations = REPRESENTATION_NONE;
|
public int | component_count()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
return (checkInitComponents() ? components.length : 0);
|
public org.omg.DynamicAny.DynAny | copy()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
checkInitAny();
try {
return DynAnyUtil.createMostDerivedDynAny(any, orb, true);
} catch (InconsistentTypeCode ictc) {
return null; // impossible
}
|
public org.omg.DynamicAny.DynAny | current_component()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if (index == NO_INDEX) {
return null;
}
return (checkInitComponents() ? components[index] : null);
|
public void | destroy()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if (status == STATUS_DESTROYABLE) {
status = STATUS_DESTROYED;
for (int i=0; i<components.length; i++) {
if (components[i] instanceof DynAnyImpl) {
((DynAnyImpl)components[i]).setStatus(STATUS_DESTROYABLE);
}
components[i].destroy();
}
}
|
public boolean | equal(org.omg.DynamicAny.DynAny dyn_any)
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if (dyn_any == this) {
return true;
}
if ( ! any.type().equal(dyn_any.type())) {
return false;
}
// This changes the current position of dyn_any.
// Make sure that our position isn't changed.
if (checkInitComponents() == false) {
return false;
}
DynAny currentComponent = null;
try {
// Remember the current position to restore it later
currentComponent = dyn_any.current_component();
for (int i=0; i<components.length; i++) {
if (dyn_any.seek(i) == false)
return false;
//System.out.println(this + " comparing component " + i + "=" + components[i] +
// " of type " + components[i].type().kind().value());
if ( ! components[i].equal(dyn_any.current_component())) {
//System.out.println("Not equal component " + i);
return false;
}
}
} catch (TypeMismatch tm) {
// impossible, we checked the type codes already
} finally {
// Restore the current position of the other DynAny
DynAnyUtil.set_current_component(dyn_any, currentComponent);
}
return true;
|
public void | from_any(org.omg.CORBA.Any value)
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
clearData();
super.from_any(value);
representations = REPRESENTATION_ANY;
index = 0;
|
public org.omg.CORBA.Any | get_any()
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_any();
|
public boolean | get_boolean()
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_boolean();
|
public char | get_char()
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();
|
public double | get_double()
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_double();
|
public org.omg.DynamicAny.DynAny | get_dyn_any()
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_dyn_any();
|
public float | get_float()
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_float();
|
public int | get_long()
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();
|
public long | get_longlong()
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_longlong();
|
public byte | get_octet()
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_octet();
|
public org.omg.CORBA.Object | get_reference()
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_reference();
|
public short | get_short()
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_short();
|
public java.lang.String | get_string()
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_string();
|
public org.omg.CORBA.TypeCode | get_typecode()
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_typecode();
|
public int | get_ulong()
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_ulong();
|
public long | get_ulonglong()
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_ulonglong();
|
public short | get_ushort()
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_ushort();
|
public java.io.Serializable | get_val()
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();
|
public char | get_wchar()
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_wchar();
|
public java.lang.String | get_wstring()
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_wstring();
|
protected boolean | initializeAnyFromComponents()
//System.out.println(this + " initializeAnyFromComponents");
OutputStream out = any.create_output_stream();
for (int i=0; i<components.length; i++) {
if (components[i] instanceof DynAnyImpl) {
((DynAnyImpl)components[i]).writeAny(out);
} else {
// Not our implementation. Nothing we can do to prevent copying.
components[i].to_any().write_value(out);
}
}
any.read_value(out.create_input_stream(), any.type());
return true;
|
protected abstract boolean | initializeComponentsFromAny()
|
protected abstract boolean | initializeComponentsFromTypeCode()
|
public void | insert_any(org.omg.CORBA.Any value)
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_any(value);
|
public void | insert_boolean(boolean value)
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_boolean(value);
|
public void | insert_char(char value)
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_char(value);
|
public void | insert_double(double value)
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_double(value);
|
public void | insert_dyn_any(org.omg.DynamicAny.DynAny value)
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_dyn_any(value);
|
public void | insert_float(float value)
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_float(value);
|
public void | insert_long(int value)
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);
|
public void | insert_longlong(long value)
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_longlong(value);
|
public void | insert_octet(byte value)
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);
|
public void | insert_reference(org.omg.CORBA.Object value)
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_reference(value);
|
public void | insert_short(short value)
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_short(value);
|
public void | insert_string(java.lang.String value)
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_string(value);
|
public void | insert_typecode(org.omg.CORBA.TypeCode value)
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_typecode(value);
|
public void | insert_ulong(int value)
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_ulong(value);
|
public void | insert_ulonglong(long value)
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_ulonglong(value);
|
public void | insert_ushort(short value)
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_ushort(value);
|
public void | insert_val(java.io.Serializable value)
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);
|
public void | insert_wchar(char value)
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_wchar(value);
|
public void | insert_wstring(java.lang.String value)
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);
|
protected boolean | isRecursive()
if (isRecursive == RECURSIVE_UNDEF) {
TypeCode typeCode = any.type();
if (typeCode instanceof TypeCodeImpl) {
if (((TypeCodeImpl)typeCode).is_recursive())
isRecursive = RECURSIVE_YES;
else
isRecursive = RECURSIVE_NO;
} else {
// No way to find out unless the TypeCode spec changes.
isRecursive = RECURSIVE_NO;
}
}
return (isRecursive == RECURSIVE_YES);
|
public boolean | next()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if (checkInitComponents() == false) {
return false;
}
index++;
if (index >= 0 && index < components.length) {
return true;
} else {
index = NO_INDEX;
return false;
}
|
public void | rewind()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
this.seek(0);
|
public boolean | seek(int newIndex)
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if (newIndex < 0) {
this.index = NO_INDEX;
return false;
}
if (checkInitComponents() == false) {
return false;
}
if (newIndex < components.length) {
index = newIndex;
return true;
}
return false;
|
public org.omg.CORBA.Any | to_any()
//System.out.println(this + " to_any ");
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
checkInitAny();
// Anys value may still be uninitialized if DynAny was initialized by TypeCode only
return DynAnyUtil.copy(any, orb);
|
protected void | writeAny(org.omg.CORBA.portable.OutputStream out)
// If all we got is TypeCode representation (no value)
// then we don't want to force creating a default value
//System.out.println(this + " checkInitAny before writeAny");
checkInitAny();
super.writeAny(out);
|