Package com.google.inject.spi

Examples of com.google.inject.spi.RecordingBinder


     * Guice modules, so I ended up pasting in a bunch of code and banging
     * it around until it worked. Fun, neh?
     */
    private Map<Key<?>, Object> getBindings(HibernateModule module) {
      final Map<Key<?>, Object> bindings = Maps.newLinkedHashMap();
      final RecordingBinder binder = new RecordingBinder(Stage.PRODUCTION);
      module.configure(binder);
      for (Element element : binder.getElements()) {
        if (element instanceof InstanceBindingImpl<?>) {
          final InstanceBindingImpl<?> binding = (InstanceBindingImpl<?>) element;
          bindings.put(binding.getKey(), binding.getInstance());
        } else if (element instanceof ProviderInstanceBindingImpl<?>) {
          final ProviderInstanceBindingImpl<?> binding = (ProviderInstanceBindingImpl<?>) element;
View Full Code Here

TOP

Related Classes of com.google.inject.spi.RecordingBinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.