static { TreeMap<Integer, Status> canonicalizer = new TreeMap<Integer, Status>(); for (Code code : Code.values()) { Status replaced = canonicalizer.put(code.value(), new Status(code)); if (replaced != null) { throw new IllegalStateException( "Code value duplication between " + replaced.getCode().name() + " & " + code.name()); } } STATUS_LIST = new ArrayList<Status>(canonicalizer.values()); }
private final void initKeywords() { for (int i = Code.FIRST_KW.ordinal(); i <= Code.LAST_KW.ordinal(); ++i) { final Code c = Code.values()[i]; m_symTab.symbol(c.str).keyword = c; } }