void (TableModel model) { Set<CustomChoice> choices = editor.getCustomChoices(); if (AutoChoices.DISABLED == editor.getAutoChoices()) { maxChoices = 0; } else { Class<?> c = model.getColumnClass(column); if (c.equals(Boolean.class)) { // consider true and false (plus null!) maxChoices = 3; } else { // consider enum constants, plus null Object[] o = c.getEnumConstants(); if (o == null){ // no enum, only handle ENABLED if (AutoChoices.ENUMS == editor.getAutoChoices()) { maxChoices = 0; } else { maxChoices = Integer.MAX_VALUE; } } else { maxChoices = o.length + 1; } } } autoOptions = maxChoices > 0; if (choices.isEmpty()) { customChoices = null; } else { customChoices = new HashMap<>(); for (CustomChoice cc : choices) { customChoices.put(cc, cc.getFilter(editor)); } if (maxChoices != Integer.MAX_VALUE) { maxChoices += customChoices.size(); } } }