List<String> (@Nullable Component component) { String label = null; if (component instanceof JLabel) { label = getLabelFromComponent((JLabel)component); } else if (component instanceof JCheckBox) { label = getLabelFromComponent((JCheckBox)component); } else if (component instanceof JRadioButton) { label = getLabelFromComponent((JRadioButton)component); } else if (component instanceof JButton) { label = getLabelFromComponent((JButton)component); } label = Strings.nullize(label, true); List<String> labels = ClientProperty.get(component, ADDITIONAL_SEARCH_LABELS_KEY); if (labels != null) { ArrayList<String> al = new ArrayList<>(labels); if (label != null) { al.add(label); } return al; } if (label == null) { return new SmartList<>(); } return new SmartList<>(label); }