Source:
<code>private ConfigRecord(ConfigurationFactory configurationFactory, ConfigurationProvider<T> configurationProvider) { requireNonNull(configurationProvider, "configurationProvider"); ConfigurationBinding<T> configurationBinding = configurationProvider.getConfigurationBinding(); key = configurationBinding.getKey(); configClass = configurationBinding.getConfigClass(); prefix = configurationBinding.getPrefix().orElse(null); ConfigurationMetadata<T> metadata = getConfigurationMetadata(configurationBinding.getConfigClass()); T defaults = configurationFactory.getDefaultConfig(configurationBinding.getKey()); T instance = null; try { instance = configurationProvider.get(); } catch (Throwable ignored) { } String prefix = configurationBinding.getPrefix() .map(value -> value + ".") .orElse(""); ImmutableSortedSet.Builder<ConfigAttribute> builder = ImmutableSortedSet.naturalOrder(); for (AttributeMetadata attribute : metadata.getAttributes().values()) { String propertyName = prefix + attribute.getInjectionPoint().getProperty(); Method getter = attribute.getGetter(); String defaultValue = getValue(getter, defaults, "-- none --"); String currentValue = getValue(getter, instance, "-- n/a --"); String description = attribute.getDescription(); if (description == null) { description = ""; } boolean secret = false; if (attribute.getInjectionPoint().getSetter().isAnnotationPresent(Config.class)) { Config config = attribute.getInjectionPoint().getSetter().getAnnotation(Config.class); <START> secret = config.secret(); <END> } builder.add(new ConfigAttribute(attribute.getName(), propertyName, defaultValue, currentValue, description, secret)); } attributes = builder.build(); }</code><technical_language>cleaner add this property ConfigurationMetadata</technical_language>

Target:
private ConfigRecord(ConfigurationFactory configurationFactory, ConfigurationProvider<T> configurationProvider) { requireNonNull(configurationProvider, "configurationProvider"); ConfigurationBinding<T> configurationBinding = configurationProvider.getConfigurationBinding(); key = configurationBinding.getKey(); configClass = configurationBinding.getConfigClass(); prefix = configurationBinding.getPrefix().orElse(null); ConfigurationMetadata<T> metadata = getConfigurationMetadata(configurationBinding.getConfigClass()); T defaults = configurationFactory.getDefaultConfig(configurationBinding.getKey()); T instance = null; try { instance = configurationProvider.get(); } catch (Throwable ignored) { } String prefix = configurationBinding.getPrefix() .map(value -> value + ".") .orElse(""); ImmutableSortedSet.Builder<ConfigAttribute> builder = ImmutableSortedSet.naturalOrder(); for (AttributeMetadata attribute : metadata.getAttributes().values()) { String propertyName = prefix + attribute.getInjectionPoint().getProperty(); Method getter = attribute.getGetter(); String defaultValue = getValue(getter, defaults, "-- none --"); String currentValue = getValue(getter, instance, "-- n/a --"); String description = attribute.getDescription(); if (description == null) { description = ""; } builder.add(new ConfigAttribute(attribute.getName(), propertyName, defaultValue, currentValue, description, attribute.isRedact())); } attributes = builder.build(); }