interface ctypeLocale { public int mbtowc(...); ... class eucJP implements ctypeLocale { public int mbtowc(...) { /* CES -> 内部表現(2byte->16bit変換とか、CCS or UCS4に変換とか、特に決まってない) */ ... class ctypeLocaleFactory { public static ctypeLocaleImpl setlocale(String locale) { if (locale.equals("ja_JP.eucJP") return new eucJP(); ...