}
public synchronized void insert_wstring(String value)
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue {
Any any = _OB_currentAny();
// Don't use checkValue() - we must accomodate bounded and
// unbounded strings
if (any == null)
throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
org.omg.CORBA.TypeCode tc = any.type();
org.omg.CORBA.TypeCode origTC = TypeCode._OB_getOrigType(tc);
if (origTC.kind() != org.omg.CORBA.TCKind.tk_wstring)
throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();
//
// Check for bounded wstring
//
try {
int len = origTC.length();
if (len > 0 && value.length() > len)
throw new org.omg.DynamicAny.DynAnyPackage.InvalidValue();
} catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
org.apache.yoko.orb.OB.Assert._OB_assert(false);
}
any.replace(tc, value);
notifyParent();
}