Search in sources :

Example 1 with ConfigAttribute

use of io.airlift.configuration.ConfigurationInspector.ConfigAttribute in project airlift by airlift.

the class Bootstrap method makePrinterForConfiguration.

private static ColumnPrinter makePrinterForConfiguration(ConfigurationFactory configurationFactory) {
    ConfigurationInspector configurationInspector = new ConfigurationInspector();
    ColumnPrinter columnPrinter = new ColumnPrinter("PROPERTY", "DEFAULT", "RUNTIME", "DESCRIPTION");
    for (ConfigRecord<?> record : configurationInspector.inspect(configurationFactory)) {
        for (ConfigAttribute attribute : record.getAttributes()) {
            columnPrinter.addValues(attribute.getPropertyName(), attribute.getDefaultValue(), attribute.getCurrentValue(), attribute.getDescription());
        }
    }
    return columnPrinter;
}
Also used : ConfigAttribute(io.airlift.configuration.ConfigurationInspector.ConfigAttribute) ConfigurationInspector(io.airlift.configuration.ConfigurationInspector)

Aggregations

ConfigurationInspector (io.airlift.configuration.ConfigurationInspector)1 ConfigAttribute (io.airlift.configuration.ConfigurationInspector.ConfigAttribute)1