Java 类org.omg.CORBA.CustomMarshal 实例源码

项目:OpenJSharp    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:openjdk-jdk10    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:openjdk9    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:jdk8u_corba    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:javify    文件:Vio.java   
/**
 * Try to write value supposing that it implements self-streamable interfaces.
 * Return false if it does not or true on success.
 */
static boolean writeSelf(OutputStream output, Serializable value)
{
  // User defined write method is present.
  if (value instanceof CustomMarshal)
    {
      ((CustomMarshal) value).marshal((DataOutputStream) output);
      return true;
    }
  else if (value instanceof Streamable)
    {
      ((Streamable) value)._write(output);
      return true;
    }
  return false;
}
项目:jvm-stm    文件:Vio.java   
/**
 * Try to write value supposing that it implements self-streamable interfaces.
 * Return false if it does not or true on success.
 */
static boolean writeSelf(OutputStream output, Serializable value)
{
  // User defined write method is present.
  if (value instanceof CustomMarshal)
    {
      ((CustomMarshal) value).marshal((DataOutputStream) output);
      return true;
    }
  else if (value instanceof Streamable)
    {
      ((Streamable) value)._write(output);
      return true;
    }
  return false;
}
项目:infobip-open-jdk-8    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:openjdk-source-code-learn    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:OLD-OpenJDK8    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:JamVM-PH    文件:Vio.java   
/**
 * Try to write value supposing that it implements self-streamable interfaces.
 * Return false if it does not or true on success.
 */
static boolean writeSelf(OutputStream output, Serializable value)
{
  // User defined write method is present.
  if (value instanceof CustomMarshal)
    {
      ((CustomMarshal) value).marshal((DataOutputStream) output);
      return true;
    }
  else if (value instanceof Streamable)
    {
      ((Streamable) value)._write(output);
      return true;
    }
  return false;
}
项目:openjdk-orb    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:classpath    文件:Vio.java   
/**
 * Try to write value supposing that it implements self-streamable interfaces.
 * Return false if it does not or true on success.
 */
static boolean writeSelf(OutputStream output, Serializable value)
{
  // User defined write method is present.
  if (value instanceof CustomMarshal)
    {
      ((CustomMarshal) value).marshal((DataOutputStream) output);
      return true;
    }
  else if (value instanceof Streamable)
    {
      ((Streamable) value)._write(output);
      return true;
    }
  return false;
}
项目:openjdk-icedtea7    文件:CDROutputStream_1_0.java   
private void writeIDLValue(Serializable object, String repID)
{
    if (object instanceof StreamableValue) {
        ((StreamableValue)object)._write(parent);

    } else if (object instanceof CustomValue) {
        ((CustomValue)object).marshal(parent);

    } else {
        BoxedValueHelper helper = Utility.getHelper(object.getClass(), null, repID);
        boolean isCustom = false;
        if (helper instanceof ValueHelper && object instanceof CustomMarshal) {
            try {
                if (((ValueHelper)helper).get_type().type_modifier() == VM_CUSTOM.value)
                    isCustom = true;
            } catch(BadKind ex) {
                throw wrapper.badTypecodeForCustomValue( CompletionStatus.COMPLETED_MAYBE,
                    ex ) ;
            }
        }
        if (isCustom)
            ((CustomMarshal)object).marshal(parent);
        else
            helper.write_value(parent, object);
    }
}
项目:javify    文件:ValueHandlerDelegateImpl.java   
/**
 * Checks if an instance of this class can write its fields itself.
 */
public boolean isCustomMarshaled(Class clz)
{
  return CustomMarshal.class.isAssignableFrom(clz)
    || Streamable.class.isAssignableFrom(clz);
}
项目:jvm-stm    文件:ValueHandlerDelegateImpl.java   
/**
 * Checks if an instance of this class can write its fields itself.
 */
public boolean isCustomMarshaled(Class clz)
{
  return CustomMarshal.class.isAssignableFrom(clz)
    || Streamable.class.isAssignableFrom(clz);
}
项目:JamVM-PH    文件:ValueHandlerDelegateImpl.java   
/**
 * Checks if an instance of this class can write its fields itself.
 */
public boolean isCustomMarshaled(Class clz)
{
  return CustomMarshal.class.isAssignableFrom(clz)
    || Streamable.class.isAssignableFrom(clz);
}
项目:classpath    文件:ValueHandlerDelegateImpl.java   
/**
 * Checks if an instance of this class can write its fields itself.
 */
public boolean isCustomMarshaled(Class clz)
{
  return CustomMarshal.class.isAssignableFrom(clz)
    || Streamable.class.isAssignableFrom(clz);
}