public static final Set<ConfigKey<?>> getAllSupportedProperties() { Set<String> configsOnClass = Sets.newLinkedHashSet( Iterables.transform(ConfigUtils.getStaticKeysOnClass(JcloudsLocation.class), new Function<HasConfigKey<?>,String>() { @Override @Nullable public String apply(@Nullable HasConfigKey<?> input) { return input.getConfigKey().getName(); } })); Set<ConfigKey<?>> configKeysInList = ImmutableSet.<ConfigKey<?>>builder() .addAll(SUPPORTED_TEMPLATE_BUILDER_PROPERTIES.keySet()) .addAll(SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES.keySet()) .build(); Set<String> configsInList = Sets.newLinkedHashSet( Iterables.transform(configKeysInList, new Function<ConfigKey<?>,String>() { @Override @Nullable public String apply(@Nullable ConfigKey<?> input) { return input.getName(); } })); SetView<String> extrasInList = Sets.difference(configsInList, configsOnClass); // notInList is normal if (!extrasInList.isEmpty()) LOG.warn("JcloudsLocation supported properties differs from config defined on class: " + extrasInList); return Collections.unmodifiableSet(configKeysInList); }