Skip to content

Instantly share code, notes, and snippets.

@ljnelson
Created February 11, 2017 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljnelson/e44ef2a23e2923dd35a529ab9fb9baa5 to your computer and use it in GitHub Desktop.
Save ljnelson/e44ef2a23e2923dd35a529ab9fb9baa5 to your computer and use it in GitHub Desktop.
private final void installConfigurationValueProducerMethods(@Observes final AfterBeanDiscovery event, final BeanManager beanManager) {
if (event != null && beanManager != null) {
final Instance<Object> i = beanManager.createInstance();
assert i != null;
final Instance<Configurations> configurationsInstance = i.select(Configurations.class);
assert configurationsInstance != null;
if (configurationsInstance.isResolvable()) {
final Configurations configurations = configurationsInstance.get();
assert configurations != null;
// TODO: get Types, add producer methods for them, etc.!
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment