コード例 #1
0
 /**
  * Extract IndexOutOfRange from an any
  *
  * @param a an any
  * @return the extracted IndexOutOfRange value
  */
 public static org.coach.tracing.api.IndexOutOfRange extract(org.omg.CORBA.Any a) {
   if (!a.type().equal(type())) throw new org.omg.CORBA.MARSHAL();
   if (HAS_OPENORB && a instanceof org.openorb.CORBA.Any) {
     // streamable extraction. The jdk stubs incorrectly define the Any stub
     org.openorb.CORBA.Any any = (org.openorb.CORBA.Any) a;
     try {
       org.omg.CORBA.portable.Streamable s = any.extract_Streamable();
       if (s instanceof org.coach.tracing.api.IndexOutOfRangeHolder)
         return ((org.coach.tracing.api.IndexOutOfRangeHolder) s).value;
     } catch (org.omg.CORBA.BAD_INV_ORDER ex) {
     }
     org.coach.tracing.api.IndexOutOfRangeHolder h =
         new org.coach.tracing.api.IndexOutOfRangeHolder(read(a.create_input_stream()));
     a.insert_Streamable(h);
     return h.value;
   }
   return read(a.create_input_stream());
 }
コード例 #2
0
 /**
  * Extract ExceptionPretNotDeleted from an any
  *
  * @param a an any
  * @return the extracted ExceptionPretNotDeleted value
  */
 public static LivreEnLigne.ExceptionPretNotDeleted extract(org.omg.CORBA.Any a) {
   if (!a.type().equal(type())) throw new org.omg.CORBA.MARSHAL();
   if (HAS_OPENORB && a instanceof org.openorb.CORBA.Any) {
     // streamable extraction. The jdk stubs incorrectly define the Any stub
     org.openorb.CORBA.Any any = (org.openorb.CORBA.Any) a;
     try {
       org.omg.CORBA.portable.Streamable s = any.extract_Streamable();
       if (s instanceof LivreEnLigne.ExceptionPretNotDeletedHolder)
         return ((LivreEnLigne.ExceptionPretNotDeletedHolder) s).value;
     } catch (org.omg.CORBA.BAD_INV_ORDER ex) {
     }
     LivreEnLigne.ExceptionPretNotDeletedHolder h =
         new LivreEnLigne.ExceptionPretNotDeletedHolder(read(a.create_input_stream()));
     a.insert_Streamable(h);
     return h.value;
   }
   return read(a.create_input_stream());
 }