本文整理汇总了Java中org.omg.DynamicAny.DynAnyPackage.InvalidValue类的典型用法代码示例。如果您正苦于以下问题:Java InvalidValue类的具体用法?Java InvalidValue怎么用?Java InvalidValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InvalidValue类属于org.omg.DynamicAny.DynAnyPackage包,在下文中一共展示了InvalidValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insert_string
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
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);
}
示例2: get_dyn_any
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public org.omg.DynamicAny.DynAny get_dyn_any()
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_any)
throw new TypeMismatch();
// _REVISIT_ Copy value here?
try {
return DynAnyUtil.createMostDerivedDynAny(any.extract_any(), orb, true);
} catch (InconsistentTypeCode ictc) {
// The spec doesn't allow us to throw back this exception
// incase the anys any if of type Principal, native or abstract interface.
return null;
}
}
示例3: get_float
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public float get_float()
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_float();
}
示例4: insert_boolean
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public void insert_boolean(boolean 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_boolean(value);
}
示例5: insert_octet
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
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);
}
示例6: insert_char
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public void insert_char(char 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_char(value);
}
示例7: get_boolean
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public boolean get_boolean()
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_boolean)
throw new TypeMismatch();
return any.extract_boolean();
}
示例8: get_wstring
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public String get_wstring()
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_wstring();
}
示例9: insert_long
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
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);
}
示例10: insert_ulong
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public void insert_ulong(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_ulong(value);
}
示例11: insert_float
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public void insert_float(float 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_float(value);
}
示例12: get_string
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
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();
}
示例13: current_member_name
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public String current_member_name ()
throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
if (status == STATUS_DESTROYED) {
throw wrapper.dynAnyDestroyed() ;
}
if( ! checkInitComponents() || index < 0 || index >= names.length) {
throw new InvalidValue();
}
return names[index];
}
示例14: insert_reference
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public void insert_reference(org.omg.CORBA.Object 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_reference(value);
}
示例15: insert_typecode
import org.omg.DynamicAny.DynAnyPackage.InvalidValue; //导入依赖的package包/类
public void insert_typecode(org.omg.CORBA.TypeCode 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_typecode(value);
}