Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Note: no @Produces!
@ConfigurationValue
@Dependent
private static final Object produceConfigurationValue(final InjectionPoint injectionPoint, final Configurations configurations) {
Objects.requireNonNull(injectionPoint);
Objects.requireNonNull(configurations);
final String name = getConfigurationPropertyName(injectionPoint);
assert name != null;
return configurations.getValue(name, injectionPoint.getType()); // let's say this causes conversion
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment