@Test public void profileExpressions() { final Config config = buildConfig("my.prop", "1", "%prof.my.prop", "${%prof.my.prop.profile}", "%prof.my.prop.profile", "2", SMALLRYE_PROFILE, "prof"); assertEquals("2", config.getValue("my.prop", String.class)); }
@Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { if (profile != null) { final String normalizeName = normalizeName(name); final ConfigValue profileValue = context.proceed("%" + profile + "." + normalizeName); if (profileValue != null) { try { final ConfigValue originalValue = context.proceed(normalizeName); if (originalValue != null && CONFIG_SOURCE_COMPARATOR.compare(profileValue, originalValue) > 0) { return originalValue; } } catch (final NoSuchElementException e) { } return profileValue.withName(normalizeName); } } return context.proceed(name); }
ProfileConfigSourceInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { if (profile != null) { final String normalizeName = normalizeName(name); final ConfigValue profileValue = context.proceed("%" + profile + "." + normalizeName); if (profileValue != null) { try { final ConfigValue originalValue = context.proceed(normalizeName); if (originalValue != null && CONFIG_SOURCE_COMPARATOR.compare(profileValue, originalValue) > 0) { return originalValue; } } catch (final NoSuchElementException e) { } return profileValue.withName(normalizeName); } } return context.proceed(name); } }
ProfileConfigSourceInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { if (profile != null) { final String normalizeName = normalizeName(name); final ConfigValue profileValue = context.proceed("%" + profile + "." + normalizeName); if (profileValue != null) { try { final ConfigValue originalValue = context.proceed(normalizeName); if (originalValue != null && CONFIG_SOURCE_COMPARATOR.compare(profileValue, originalValue) > 0) { return originalValue; } } catch (final NoSuchElementException e) { } return profileValue.withName(normalizeName); } } return context.proceed(name); } ProfileConfigSourceInterceptor(final String profile);  ProfileConfigSourceInterceptor(final ConfigSourceInterceptorContext context);  ProfileConfigSourceInterceptor(
            final ConfigSourceInterceptorContext context,
            final String profileConfigName); }
ProfileConfigSourceInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { if (profile != null) { final String normalizeName = normalizeName(name); final ConfigValue profileValue = context.proceed("%" + profile + "." + normalizeName); if (profileValue != null) { try { final ConfigValue originalValue = context.proceed(normalizeName); if (originalValue != null && CONFIG_SOURCE_COMPARATOR.compare(profileValue, originalValue) > 0) { return originalValue; } } catch (final NoSuchElementException e) { } return profileValue.withName(normalizeName); } } return context.proceed(name); } ProfileConfigSourceInterceptor(final String profile);  ProfileConfigSourceInterceptor(final ConfigSourceInterceptorContext context);  ProfileConfigSourceInterceptor(
            final ConfigSourceInterceptorContext context,
            final String profileConfigName); @Override ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name); @Override Iterator<String> iterateNames(final ConfigSourceInterceptorContext context); @Override Iterator<ConfigValue> iterateValues(final ConfigSourceInterceptorContext context); }
ProfileConfigSourceInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { if (profile != null) { final String normalizeName = normalizeName(name); final ConfigValue profileValue = context.proceed("%" + profile + "." + normalizeName); if (profileValue != null) { try { final ConfigValue originalValue = context.proceed(normalizeName); if (originalValue != null && CONFIG_SOURCE_COMPARATOR.compare(profileValue, originalValue) > 0) { return originalValue; } } catch (final NoSuchElementException e) { } return profileValue.withName(normalizeName); } } return context.proceed(name); } ProfileConfigSourceInterceptor(final String profile);  ProfileConfigSourceInterceptor(final ConfigSourceInterceptorContext context);  ProfileConfigSourceInterceptor(
            final ConfigSourceInterceptorContext context,
            final String profileConfigName); @Override ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name); @Override Iterator<String> iterateNames(final ConfigSourceInterceptorContext context); @Override Iterator<ConfigValue> iterateValues(final ConfigSourceInterceptorContext context); static final String SMALLRYE_PROFILE; }