IElementType (short idx) { // volatile read; array always grows, never shrinks, never overwritten IElementType type = ourRegistry[idx]; if (type instanceof TombstoneElementType) { throw new IllegalArgumentException("Trying to access element type from unloaded plugin: " + type); } return type; }