@Test void buildProperties() { final String[] i18nPackages = { Config.class.getPackage().getName() }; final ParameterMeta host = new ParameterMeta(null, Config.class, ParameterMeta.Type.STRING, "configuration.host", "host", i18nPackages, emptyList(), null, emptyMap(), false); final ParameterMeta port = new ParameterMeta(null, Config.class, ParameterMeta.Type.NUMBER, "configuration.port", "port", i18nPackages, emptyList(), null, emptyMap(), false); final ParameterMeta username = new ParameterMeta(null, Config.class, ParameterMeta.Type.STRING, "configuration.username", "username", i18nPackages, emptyList(), null, emptyMap(), false); final ParameterMeta password = new ParameterMeta(null, Config.class, ParameterMeta.Type.STRING, "configuration.password", "password", i18nPackages, emptyList(), null, emptyMap(), false); final ParameterMeta config = new ParameterMeta(null, Config.class, ParameterMeta.Type.OBJECT, "configuration", "configuration", i18nPackages, asList(host, port, username, password), null, emptyMap(), false); final List<SimplePropertyDefinition> props = propertiesService .buildProperties(singletonList(config), getClass().getClassLoader(), Locale.getDefault(), null) .collect(toList()); assertEquals(5, props.size()); assertEquals("Configuration", props.get(0).getDisplayName()); assertEquals("Server Host Name", props.get(1).getDisplayName()); assertEquals("Enter the server host name...", props.get(1).getPlaceholder()); assertEquals("Password", props.get(2).getDisplayName()); assertEquals("Server Port", props.get(3).getDisplayName()); assertEquals("Enter the server port...", props.get(3).getPlaceholder()); assertEquals("User Name", props.get(4).getDisplayName()); }
public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); }
PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); } }
PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); }  }
PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); }  Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader,
            final Locale locale, final DefaultValueInspector.Instance rootInstance); }
PropertiesService { public Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader, final Locale locale, final DefaultValueInspector.Instance rootInstance) { return buildProperties(meta, loader, locale, rootInstance, null); }  Stream<SimplePropertyDefinition> buildProperties(final List<ParameterMeta> meta, final ClassLoader loader,
            final Locale locale, final DefaultValueInspector.Instance rootInstance);  }