@Test void parameterIndexMeta() throws NoSuchMethodException { final List<ParameterMeta> params = new ParameterModelService(new PropertyEditorRegistry()) .buildParameterMetas( getClass().getDeclaredMethod("multipleParams", String.class, BoolWrapper.class, String.class), null, new BaseParameterEnricher.Context(new LocalConfigurationService(emptyList(), "test"))); final List<SimplePropertyDefinition> props = propertiesService .buildProperties(params, Thread.currentThread().getContextClassLoader(), Locale.ROOT, null) .collect(toList()); assertEquals(4, props.size()); props.forEach(p -> { final boolean hasIndex = p.getMetadata().containsKey("definition::parameter::index"); final boolean isNested = p.getPath().contains("."); assertTrue((isNested && !hasIndex) || (!isNested && hasIndex)); }); props.sort(comparing(p -> Integer.parseInt(p.getMetadata().getOrDefault("definition::parameter::index", "4")))); assertEquals("aa/b/a/b.val", props.stream().map(SimplePropertyDefinition::getPath).collect(joining("/"))); }
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);  }