Java Code Examples for org.omg.CORBA.AnyHolder

The following are top voted examples for showing how to use org.omg.CORBA.AnyHolder. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: javify   File: gnuDynAny.java   View source code 5 votes vote down vote up
/**
 * Return the second (enclosed any) that is stored in the wrapped Any.
 */
public Any get_any() throws TypeMismatch
{
  try
    {
      return ((AnyHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 2
Project: javify   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_any(Any a_x) throws TypeMismatch, InvalidValue
{
  try
    {
      if (a_x.type().kind().value() == TCKind._tk_null)
        ((AnyHolder) holder).value = a_x;
      else
        {
          OutputStream buf = a_x.create_output_stream();
          buf.write_any(a_x);
          holder._read(buf.create_input_stream());
          buf.close();
        }
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
  catch (MARSHAL m)
    {
      InvalidValue v = new InvalidValue();
      v.initCause(m);
      throw v;
    }
  catch (IOException ex)
    {
      throw new Unexpected(ex);
    }
}
 
Example 3
Project: javify   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public Any extract_any()
                throws BAD_OPERATION
{
  check(TCKind._tk_any);
  return ((AnyHolder) has).value;
}
 
Example 4
Project: jvm-stm   File: gnuDynAny.java   View source code 5 votes vote down vote up
/**
 * Return the second (enclosed any) that is stored in the wrapped Any.
 */
public Any get_any() throws TypeMismatch
{
  try
    {
      return ((AnyHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 5
Project: jvm-stm   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_any(Any a_x) throws TypeMismatch, InvalidValue
{
  try
    {
      if (a_x.type().kind().value() == TCKind._tk_null)
        ((AnyHolder) holder).value = a_x;
      else
        {
          OutputStream buf = a_x.create_output_stream();
          buf.write_any(a_x);
          holder._read(buf.create_input_stream());
          buf.close();
        }
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
  catch (MARSHAL m)
    {
      InvalidValue v = new InvalidValue();
      v.initCause(m);
      throw v;
    }
  catch (IOException ex)
    {
      throw new Unexpected(ex);
    }
}
 
Example 6
Project: jvm-stm   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public Any extract_any()
                throws BAD_OPERATION
{
  check(TCKind._tk_any);
  return ((AnyHolder) has).value;
}
 
Example 7
Project: JamVM-PH   File: gnuDynAny.java   View source code 5 votes vote down vote up
/**
 * Return the second (enclosed any) that is stored in the wrapped Any.
 */
public Any get_any() throws TypeMismatch
{
  try
    {
      return ((AnyHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 8
Project: JamVM-PH   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_any(Any a_x) throws TypeMismatch, InvalidValue
{
  try
    {
      if (a_x.type().kind().value() == TCKind._tk_null)
        ((AnyHolder) holder).value = a_x;
      else
        {
          OutputStream buf = a_x.create_output_stream();
          buf.write_any(a_x);
          holder._read(buf.create_input_stream());
          buf.close();
        }
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
  catch (MARSHAL m)
    {
      InvalidValue v = new InvalidValue();
      v.initCause(m);
      throw v;
    }
  catch (IOException ex)
    {
      throw new Unexpected(ex);
    }
}
 
Example 9
Project: JamVM-PH   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public Any extract_any()
                throws BAD_OPERATION
{
  check(TCKind._tk_any);
  return ((AnyHolder) has).value;
}
 
Example 10
Project: classpath   File: gnuDynAny.java   View source code 5 votes vote down vote up
/**
 * Return the second (enclosed any) that is stored in the wrapped Any.
 */
public Any get_any() throws TypeMismatch
{
  try
    {
      return ((AnyHolder) holder).value;
    }
  catch (ClassCastException cex)
    {
      TypeMismatch m = new TypeMismatch();
      m.initCause(cex);
      throw m;
    }
}
 
Example 11
Project: classpath   File: gnuDynAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public void insert_any(Any a_x) throws TypeMismatch, InvalidValue
{
  try
    {
      if (a_x.type().kind().value() == TCKind._tk_null)
        ((AnyHolder) holder).value = a_x;
      else
        {
          OutputStream buf = a_x.create_output_stream();
          buf.write_any(a_x);
          holder._read(buf.create_input_stream());
          buf.close();
        }
      valueChanged();
    }
  catch (ClassCastException cex)
    {
      TypeMismatch t = new TypeMismatch();
      t.initCause(cex);
      throw t;
    }
  catch (MARSHAL m)
    {
      InvalidValue v = new InvalidValue();
      v.initCause(m);
      throw v;
    }
  catch (IOException ex)
    {
      throw new Unexpected(ex);
    }
}
 
Example 12
Project: classpath   File: gnuAny.java   View source code 5 votes vote down vote up
/** {@inheritDoc} */
public Any extract_any()
                throws BAD_OPERATION
{
  check(TCKind._tk_any);
  return ((AnyHolder) has).value;
}