public Classification codeOf(Object code) { if ("Flg".equals(name())) { return CDef.Flg.codeOf(code); } if ("MemberStatus".equals(name())) { return CDef.MemberStatus.codeOf(code); } if ("ServiceRank".equals(name())) { return CDef.ServiceRank.codeOf(code); } if ("Region".equals(name())) { return CDef.Region.codeOf(code); } if ("WithdrawalReason".equals(name())) { return CDef.WithdrawalReason.codeOf(code); } if ("ProductCategory".equals(name())) { return CDef.ProductCategory.codeOf(code); } if ("ProductStatus".equals(name())) { return CDef.ProductStatus.codeOf(code); } throw new IllegalStateException("Unknown definition: " + this); // basically unreachable }