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


Java Bounds.toString方法代码示例

本文整理汇总了Java中org.omg.CORBA.TypeCodePackage.Bounds.toString方法的典型用法代码示例。如果您正苦于以下问题:Java Bounds.toString方法的具体用法?Java Bounds.toString怎么用?Java Bounds.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.omg.CORBA.TypeCodePackage.Bounds的用法示例。


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

示例1: current_member_name

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public String current_member_name()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
    org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
    if (m_destroyed)
        throw new OBJECT_NOT_EXIST("DynAny destroyed.");

    if (m_current_index == -1)
        throw new InvalidValue("No member (current = -1)");

    // at this point alwais curremt_member is valid
    try {
        return m_base_type.member_name(m_current_index);
    }
    catch (BadKind bk) {
        /* unreachable */
        throw new BAD_TYPECODE();
    }
    catch (Bounds bd) {
        /* unreachable */
        throw new INTERNAL(bd.toString());
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:24,代码来源:DynStructBase.java

示例2: current_member_kind

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public org.omg.CORBA.TCKind current_member_kind()
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
    org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
    if (m_destroyed)
        throw new OBJECT_NOT_EXIST("DynAny destroyed.");

    if (m_current_index == -1)
        throw new InvalidValue("No member (current = -1)");

    try {
        return m_base_type.member_type(m_current_index).kind();
    }
    catch (BadKind bk) {
        /* unreachable */
        throw new TypeMismatch(bk.toString());
    }
    catch (Bounds bd) {
        /* unreachable */
        throw new TypeMismatch(bd.toString());
    }

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

示例3: skipValue

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public static boolean skipValue(TypeCode type, CDRInputStream input)
{
    try {
        int member_length = type.member_count();
        for (int i = 0; i < member_length; i++) {
            if (!TypeCodeMarshaler.skipValue(type.member_type(i), input))
                return false;
        }
    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in value operations:"
                               + bk.toString());
    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in value operations:"
                               + bds.toString());
    }
    return true;
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:20,代码来源:ValueTypeCode.java

示例4: valuesEqual

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Compares two InputStream marshaled values of a given TypeCode to a
 * <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
 * alwais be invoked by this stream.
 * 
 * @param type
 *            the value <code>TypeCode</code>
 * @param input_a
 *            the <code>InputStream</code> where one value is marshaled
 * @param input_b
 *            the <code>InputStream</code> where the value value is
 *            marshaled
 * @pre <code>type</code> must be a value type.
 */

public static boolean valuesEqual(org.omg.CORBA.TypeCode type,
                                  InputStream input_a, InputStream input_b)
{
    try {
        int member_length = type.member_count();

        for (int i = 0; i < member_length; i++)
            if (!TypeCodeMarshaler.valuesEqual(type.member_type(i),
                                               input_a, input_b))
                return false;
    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bk.toString());

    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bds.toString());
    }

    return true;
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:39,代码来源:ValueTypeCode.java

示例5: skipValue

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Skips the value asociated to the TypeCode. This operation is used by the
 * TIDorb's Any implementation an the subclass <code>skip_value()</code>
 * operations.
 * 
 * @param input
 *            must be alwais a reference to a CDRInputStream object.
 */

public static boolean skipValue(TypeCode type, CDRInputStream input)
{
    try {
        int member_length = type.member_count();
        for (int i = 0; i < member_length; i++) {
            if (!TypeCodeMarshaler.skipValue(type.member_type(i), input))
                return false;
        }
    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bk.toString());
    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bds.toString());
    }
    return true;
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:29,代码来源:StructTypeCode.java

示例6: remarshalValue

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Copies and remarshals the given typecode value marshaled in an
 * InputStream to a <code>es.tid.TIDorbj.core.CDRInputStream</code>. This
 * method will alwais be invoked by this stream.
 * 
 * @param type
 *            the value <code>TypeCode</code>
 * @param input
 *            the <code>InputStream</code> where the value is marshaled
 * @param output
 *            the <code>es.tid.TIDorbj.core.CDRInputStream</code>
 * @pre the <code>TypeCode</code> must be a struct type
 */

public static void remarshalValue(TypeCode type, InputStream input,
                                  OutputStream output)
{
    try {
        int member_length = type.member_count();

        for (int i = 0; i < member_length; i++)
            TypeCodeMarshaler.remarshalValue(type.member_type(i), input,
                                             output);

    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bk.toString());

    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bds.toString());
    }

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

示例7: valuesEqual

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Compares two InputStream marshaled values of a given TypeCode to a
 * <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
 * alwais be invoked by this stream.
 * 
 * @param type
 *            the value <code>TypeCode</code>
 * @param input_a
 *            the <code>InputStream</code> where one value is marshaled
 * @param input_b
 *            the <code>InputStream</code> where the value value is
 *            marshaled
 * @pre <code>type</code> must be a struct type.
 */

public static boolean valuesEqual(org.omg.CORBA.TypeCode type,
                                  InputStream input_a, InputStream input_b)
{
    try {
        int member_length = type.member_count();

        for (int i = 0; i < member_length; i++)
            if (!TypeCodeMarshaler.valuesEqual(type.member_type(i),
                                               input_a, input_b))
                return false;
    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bk.toString());

    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bds.toString());
    }

    return true;
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:39,代码来源:StructTypeCode.java

示例8: equal

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public boolean equal(org.omg.CORBA.TypeCode tc)
{
    if (!super.equal(tc))
        return false;
    try {

        if (m_members.length != tc.member_count())
            return false;

        for (int i = 0; i < m_members.length; i++) {
            if (!m_members[i].equals(tc.member_name(i)))
                return false;
        }
        // all rigth
        return true;

    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in enum operations:" 
                               + bk.toString());

    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in enum operations:" 
                               + bds.toString());
    }

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

示例9: dump

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Dumps the description of a given TypeCode.
 * 
 * @param type
 *            the <code>TypeCode</code>
 * @param output
 *            the output stream where the TypeCode will be dumped
 * @pre <code>type</code> must be an enum type.
 */

public static void dump(TypeCode type, java.io.PrintWriter output)
    throws java.io.IOException
{
    try {

        output.print("[TYPECODE]{enum ");
        ComplexTypeCode.dumpParams(type, output);
        output.print(" {");
        int length = type.member_count();

        output.print(type.member_name(0));
        for (int i = 1; i < length; i++) {
            output.print(" ,");
            output.print(type.member_name(i));
        }
        output.print("} }");
    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in enum operations:"
                               + bk.toString());
    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in enum operations:"
                               + bds.toString());
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:37,代码来源:EnumTypeCode.java

示例10: member_name

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public void member_name(String arg)
    throws org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
    if (m_destroyed)
        throw new org.omg.CORBA.OBJECT_NOT_EXIST("DynAny destroyed.");

    if (m_component_count == 1)
        throw new InvalidValue("No active member");

    try {

        int member_count = m_base_type.member_count();

        for (int i = 0; i < member_count; i++) {
            if (arg.equals(m_base_type.member_name(i))) {
                DynAnyBase dyn_disc = (DynAnyBase)
                	m_factory.create_dyn_any(m_base_type.member_label(i));
                setIndex(i, dyn_disc);

                return;
            }
        }
    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE(bk.toString());
    }
    catch (Bounds bd) {
        throw new INTERNAL(bd.toString());
    }
    catch (InconsistentTypeCode itc) {/* unreachable */
        return;
    }

    throw new InvalidValue("Union has not any member named: " + arg);
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:36,代码来源:DynUnionImpl.java

示例11: get_members

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public org.omg.DynamicAny.NameValuePair[] get_members()
{

    if (m_destroyed)
        throw new OBJECT_NOT_EXIST("DynAny destroyed.");

    try {

        Any[] any_members = super.get_elements();

        NameValuePair[] members = new NameValuePair[m_component_count];

        for (int i = 0; i < m_component_count; i++) {

            members[i] = new NameValuePair(m_base_type.member_name(i),
                                           any_members[i]);
        }

        return members;

    }
    catch (BadKind bk) {
        /* unreachable */
        throw new BAD_TYPECODE(bk.toString());

    }
    catch (Bounds bd) {
        /* unreachable */
        throw new INTERNAL(bd.toString());
    }

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

示例12: set_members

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
public void set_members(org.omg.DynamicAny.NameValuePair[] value)
    throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch,
    org.omg.DynamicAny.DynAnyPackage.InvalidValue
{
    try {
        if (m_destroyed)
            throw new OBJECT_NOT_EXIST("DynAny destroyed.");

        reset();

        if (value.length != m_component_count)
            throw new TypeMismatch("Invalid number of members: "
                                   + m_component_count + " expected, not "
                                   + value.length);

        Any[] members_values = new Any[m_component_count];

        for (int i = 0; i < m_component_count; i++) {
            members_values[i] = value[i].value;
            if (!m_base_type.member_name(i).equals(value[i].id))
                throw new InvalidValue("Invalid member name, "
                                       + m_base_type.member_name(i)
                                       + "expected, not " + value[i].id);
        }

        set_elements(members_values);

    }
    catch (BadKind bk) {
        /* unreachable */
        throw new BAD_TYPECODE(bk.toString());

    }
    catch (Bounds bd) {
        /* unreachable */
        throw new INTERNAL(bd.toString());
    }

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

示例13: writeParams

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Marshal the given typecode params in a
 * <code>es.tid.TIDorbj.core.CDRInputStream</code>. This method will
 * alwais be invoked by this stream.
 * 
 * @param type
 *            the <code>TypeCode</code>
 * @param output
 *            the <code>es.tid.TIDorbj.core.CDRInputStream</code>
 * @pre the the <code>TypeCode</code> must be an union type
 */

public static void writeParams(TypeCode type, CDROutputStream output)
{
    try {
        ComplexTypeCode.writeParams(type, output);

        output.write_TypeCode(type.discriminator_type());
        output.write_long(type.default_index());

        int length = type.member_count();

        output.write_ulong(length);

        for (int i = 0; i < length; i++) {
            // Change, only the value of discriminator is marshalled
            // output.write_any(type.member_label(i));
            type.member_label(i).write_value(output);
            output.write_string(type.member_name(i));
            output.write_TypeCode(type.member_type(i));
        }

    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in union operations:"
                               + bk.toString());

    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in union operations:"
                               + bds.toString());
    }

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

示例14: dumpValue

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
/**
 * Dumps the description of a the marshaled value of a given TypeCode.
 * 
 * @param type
 *            the <code>TypeCode</code>
 * @param input
 *            the input stream where the value is marshaled
 * @param output
 *            the output stream where the value will be dumped
 * @pre the typecode must be a struct type
 * @return <code>true</code> if if has been possible dump the value.
 */

public static boolean dumpValue(TypeCode type, InputStream input,
                                java.io.PrintWriter output)
    throws java.io.IOException
{
    try {
        int member_length = type.member_count();

        output.print("[VALUE]{struct ");
        output.print(type.name());
        output.print(": ");
        for (int i = 0; i < member_length; i++) {
            output.print('(');
            output.print(i);
            output.print(") ");
            output.print(type.member_name(i));
            output.print(": ");
            if (!TypeCodeDumper.dumpValue(type.member_type(i), input,
                                          output))
                return false;
            output.print(" | ");
        }
        output.print(" END_STRUCT-}");

    }
    catch (BadKind bk) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bk.toString());

    }
    catch (Bounds bds) {
        throw new BAD_TYPECODE("Fault in struct operations:"
                               + bds.toString());
    }

    return true;
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:50,代码来源:StructTypeCode.java

示例15: getComponentType

import org.omg.CORBA.TypeCodePackage.Bounds; //导入方法依赖的package包/类
protected TypeCode getComponentType(int position)
{
    try {
        return m_base_type.member_type(position);
    }
    catch (BadKind bk) {
        /* unreachable */
        throw new BAD_TYPECODE(bk.toString());
    }
    catch (Bounds bd) {
        /* unreachable */
        throw new INTERNAL(bd.toString());
    }

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


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