Esempio n. 1
0
 public static Xoa_app_mode parse(String s) {
   Object o = type_hash.Get_by(Bry_.new_u8(s));
   if (o == null)
     return Itm_cmd; // default to cmd as per early behaviour; handles mistaken "--app_mode wrong"
   int tid = ((Int_obj_val) o).Val();
   switch (tid) {
     case Tid_cmd:
       return Itm_cmd;
     case Tid_gui:
       return Itm_gui;
     case Tid_http:
       return Itm_http;
     case Tid_tcp:
       return Itm_tcp;
     case Tid_file:
       return Itm_file;
     default:
       throw Err_.new_unhandled(tid);
   }
 }