NotNullLazyValue<Set<ArrangementSettingsToken>> (@NotNull final Class<?> clazz) { return NotNullLazyValue.createValue(() -> { Set<ArrangementSettingsToken> result = new HashSet<>(); for (Field field : clazz.getFields()) { if (ArrangementSettingsToken.class.isAssignableFrom(field.getType())) { try { result.add((ArrangementSettingsToken)field.get(null)); } catch (IllegalAccessException e) { assert false : e; } } } return result; }); }