当前位置: 首页>>代码示例>>Java>>正文


Java DynFixed类代码示例

本文整理汇总了Java中org.omg.DynamicAny.DynFixed的典型用法代码示例。如果您正苦于以下问题:Java DynFixed类的具体用法?Java DynFixed怎么用?Java DynFixed使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DynFixed类属于org.omg.DynamicAny包,在下文中一共展示了DynFixed类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: assign

import org.omg.DynamicAny.DynFixed; //导入依赖的package包/类
public void assign(org.omg.DynamicAny.DynAny dyn_any)
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
{
    if (dyn_any == null)
        throw new BAD_PARAM("Null DynAny reference", 0,
                            CompletionStatus.COMPLETED_NO);

    if (m_destroyed)
        throw new OBJECT_NOT_EXIST("DynAny destroyed.", 0,
                                   CompletionStatus.COMPLETED_NO);

    if (!m_base_type.equivalent(dyn_any.type()))
        throw new org.omg.DynamicAny.DynAnyPackage.TypeMismatch();

    try {
        set_value(((DynFixed) dyn_any).get_value());
    }
    catch (InvalidValue iv) {
        throw new BAD_PARAM("Invalid value");
    }
    catch (ClassCastException cce) {
        throw new BAD_PARAM("Not a DynFixed value");
    }

}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:26,代码来源:DynFixedImpl.java

示例2: equal

import org.omg.DynamicAny.DynFixed; //导入依赖的package包/类
public boolean equal(org.omg.DynamicAny.DynAny dyn_any)
{
    if (dyn_any == null)
        throw new BAD_PARAM("Null DynAny reference", 0,
                            CompletionStatus.COMPLETED_NO);

    if (m_destroyed)
        throw new OBJECT_NOT_EXIST("DynAny destroyed.", 0,
                                   CompletionStatus.COMPLETED_NO);

    if (!m_base_type.equivalent(dyn_any.type()))
        return false;

    if (dyn_any instanceof DynFixed) {
        return fixed_value.equals(
            new BigDecimal(new String(((DynFixed) dyn_any).get_value())));
    } else { // invalid error
        throw new BAD_PARAM("dyn_any value does not instantiate DynFixed!"
                            + " but its type is fixed;");
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:22,代码来源:DynFixedImpl.java

示例3: create_fixed

import org.omg.DynamicAny.DynFixed; //导入依赖的package包/类
/**
 * Create fixed.
 *
 * @param official the type that was originally passed as a parameter by user.
 * May be alias of some other type.
 * @param type the type into that the "official type" evaluates during alias
 * resolving. Initially equal to "official type".
 */
public DynFixed create_fixed(TypeCode official, TypeCode type)
{
  return new gnuDynFixed(official, type, this, orb);
}
 
开发者ID:vilie,项目名称:javify,代码行数:13,代码来源:gnuDynAnyFactory.java


注:本文中的org.omg.DynamicAny.DynFixed类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。