Methods Summary |
---|
protected abstract void | checkValue(java.lang.Object[] value)
|
protected void | createDefaultComponentAt(int i, org.omg.CORBA.TypeCode contentType)
try {
components[i] = DynAnyUtil.createMostDerivedDynAny(contentType, orb);
} catch (InconsistentTypeCode itc) { // impossible
}
// get a hold of the default initialized Any without copying
anys[i] = getAny(components[i]);
|
protected int | getBound()
try {
return any.type().length();
} catch (BadKind badKind) { // impossible
return 0;
}
|
protected org.omg.CORBA.TypeCode | getContentType()
try {
return any.type().content_type();
} catch (BadKind badKind) { // impossible
return null;
}
|
public org.omg.CORBA.Any[] | get_elements()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
return (checkInitComponents() ? anys : null);
|
public org.omg.DynamicAny.DynAny[] | get_elements_as_dyn_any()
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
return (checkInitComponents() ? components : null);
|
public void | set_elements(org.omg.CORBA.Any[] value)
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
checkValue(value);
components = new DynAny[value.length];
anys = value;
// We know that this is of kind tk_sequence or tk_array
TypeCode expectedTypeCode = getContentType();
for (int i=0; i<value.length; i++) {
if (value[i] != null) {
if (! value[i].type().equal(expectedTypeCode)) {
clearData();
// _REVISIT_ More info
throw new TypeMismatch();
}
try {
// Creates the appropriate subtype without copying the Any
components[i] = DynAnyUtil.createMostDerivedDynAny(value[i], orb, false);
//System.out.println(this + " created component " + components[i]);
} catch (InconsistentTypeCode itc) {
throw new InvalidValue();
}
} else {
clearData();
// _REVISIT_ More info
throw new InvalidValue();
}
}
index = (value.length == 0 ? NO_INDEX : 0);
// Other representations are invalidated by this operation
representations = REPRESENTATION_COMPONENTS;
|
public void | set_elements_as_dyn_any(org.omg.DynamicAny.DynAny[] value)
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
checkValue(value);
components = (value == null ? emptyComponents : value);
anys = new Any[value.length];
// We know that this is of kind tk_sequence or tk_array
TypeCode expectedTypeCode = getContentType();
for (int i=0; i<value.length; i++) {
if (value[i] != null) {
if (! value[i].type().equal(expectedTypeCode)) {
clearData();
// _REVISIT_ More info
throw new TypeMismatch();
}
anys[i] = getAny(value[i]);
} else {
clearData();
// _REVISIT_ More info
throw new InvalidValue();
}
}
index = (value.length == 0 ? NO_INDEX : 0);
// Other representations are invalidated by this operation
representations = REPRESENTATION_COMPONENTS;
|