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

项目:javify    文件:gnuAny.java   
/**
 * Extract the stored value type.
 *
 * @return the previously stored value type.
 *
 * @throws BAD_OPERATION if the Any contains something different.
 *
 * @see org.omg.CORBA.portable.ValueBase
 */
public Serializable extract_Value()
                           throws BAD_OPERATION
{
  try
    {
      if (has instanceof ValueBaseHolder)
        return ((ValueBaseHolder) has).value;
      else
        {
          // Normally, ValueBase holder must be an instance of the
          // ValueBaseHolder. However some IDL compilers probably
          // have a bug, do not deriving this way. The the only
          // way to access the wrapped value is via reflection.
          Field f = has.getClass().getField("value");
          return (Serializable) f.get(has);
        }
    }
  catch (Exception ex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("Value type expected");
      bad.minor = Minor.Any;
      bad.initCause(ex);
      throw bad;
    }
}
项目:jvm-stm    文件:gnuAny.java   
/**
 * Extract the stored value type.
 *
 * @return the previously stored value type.
 *
 * @throws BAD_OPERATION if the Any contains something different.
 *
 * @see org.omg.CORBA.portable.ValueBase
 */
public Serializable extract_Value()
                           throws BAD_OPERATION
{
  try
    {
      if (has instanceof ValueBaseHolder)
        return ((ValueBaseHolder) has).value;
      else
        {
          // Normally, ValueBase holder must be an instance of the
          // ValueBaseHolder. However some IDL compilers probably
          // have a bug, do not deriving this way. The the only
          // way to access the wrapped value is via reflection.
          Field f = has.getClass().getField("value");
          return (Serializable) f.get(has);
        }
    }
  catch (Exception ex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("Value type expected");
      bad.minor = Minor.Any;
      bad.initCause(ex);
      throw bad;
    }
}
项目:JamVM-PH    文件:gnuAny.java   
/**
 * Extract the stored value type.
 *
 * @return the previously stored value type.
 *
 * @throws BAD_OPERATION if the Any contains something different.
 *
 * @see org.omg.CORBA.portable.ValueBase
 */
public Serializable extract_Value()
                           throws BAD_OPERATION
{
  try
    {
      if (has instanceof ValueBaseHolder)
        return ((ValueBaseHolder) has).value;
      else
        {
          // Normally, ValueBase holder must be an instance of the
          // ValueBaseHolder. However some IDL compilers probably
          // have a bug, do not deriving this way. The the only
          // way to access the wrapped value is via reflection.
          Field f = has.getClass().getField("value");
          return (Serializable) f.get(has);
        }
    }
  catch (Exception ex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("Value type expected");
      bad.minor = Minor.Any;
      bad.initCause(ex);
      throw bad;
    }
}
项目:classpath    文件:gnuAny.java   
/**
 * Extract the stored value type.
 *
 * @return the previously stored value type.
 *
 * @throws BAD_OPERATION if the Any contains something different.
 *
 * @see org.omg.CORBA.portable.ValueBase
 */
public Serializable extract_Value()
                           throws BAD_OPERATION
{
  try
    {
      if (has instanceof ValueBaseHolder)
        return ((ValueBaseHolder) has).value;
      else
        {
          // Normally, ValueBase holder must be an instance of the
          // ValueBaseHolder. However some IDL compilers probably
          // have a bug, do not deriving this way. The the only
          // way to access the wrapped value is via reflection.
          Field f = has.getClass().getField("value");
          return (Serializable) f.get(has);
        }
    }
  catch (Exception ex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("Value type expected");
      bad.minor = Minor.Any;
      bad.initCause(ex);
      throw bad;
    }
}
项目:javify    文件:gnuDynAny.java   
/** {@inheritDoc} */
public Serializable get_val() throws TypeMismatch
{
  try
    {
      return ((ValueBaseHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
项目:javify    文件:gnuDynAny.java   
/** {@inheritDoc} */
public void insert_val(Serializable a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((ValueBaseHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
项目:jvm-stm    文件:gnuDynAny.java   
/** {@inheritDoc} */
public Serializable get_val() throws TypeMismatch
{
  try
    {
      return ((ValueBaseHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
项目:jvm-stm    文件:gnuDynAny.java   
/** {@inheritDoc} */
public void insert_val(Serializable a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((ValueBaseHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
项目:JamVM-PH    文件:gnuDynAny.java   
/** {@inheritDoc} */
public Serializable get_val() throws TypeMismatch
{
  try
    {
      return ((ValueBaseHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
项目:JamVM-PH    文件:gnuDynAny.java   
/** {@inheritDoc} */
public void insert_val(Serializable a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((ValueBaseHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}
项目:classpath    文件:gnuDynAny.java   
/** {@inheritDoc} */
public Serializable get_val() throws TypeMismatch
{
  try
    {
      return ((ValueBaseHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
项目:classpath    文件:gnuDynAny.java   
/** {@inheritDoc} */
public void insert_val(Serializable a_x) throws InvalidValue, TypeMismatch
{
  try
    {
      ((ValueBaseHolder) holder).value = a_x;
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
}