Examples of InjectorConfig


Examples of com.cognifide.slice.api.injector.InjectorConfig

    List<InjectorConfig> flatSubtree = new ArrayList<InjectorConfig>();
    Deque<InjectorConfig> queue = new ArrayDeque<InjectorConfig>();
    queue.add(root);

    while (!queue.isEmpty()) {
      InjectorConfig node = queue.poll();
      if (!flatSubtree.add(node)) {
        throw new IllegalStateException("There is a cycle in the injectors graph: "
            + flatSubtree.toString());
      }
      queue.addAll(getChildren(node));
View Full Code Here

Examples of com.cognifide.slice.api.injector.InjectorConfig

    }
  }

  private Injector createInjector(InjectorConfig config) {
    List<Module> modules = new ArrayList<Module>();
    InjectorConfig current = config;
    do {
      modules.addAll(current.getModules());
      InjectorConfig parent = null;
      if (current.hasParent()) {
        String parentName = current.getParentName();
        parent = configByName.get(parentName);
        if (parent == null) {
          LOG.info("Can't create {} as its ancestor {} can't be found",
View Full Code Here

Examples of com.cognifide.slice.api.injector.InjectorConfig

    List<InjectorConfig> flatSubtree = new ArrayList<InjectorConfig>();
    Deque<InjectorConfig> queue = new ArrayDeque<InjectorConfig>();
    queue.add(root);

    while (!queue.isEmpty()) {
      InjectorConfig node = queue.poll();
      if (!flatSubtree.add(node)) {
        throw new IllegalStateException("There is a cycle in the injectors graph: "
            + flatSubtree.toString());
      }
      queue.addAll(getChildren(node));
View Full Code Here

Examples of com.cognifide.slice.api.injector.InjectorConfig

    }
  }

  private Injector createInjector(InjectorConfig config) {
    List<Module> modules = new ArrayList<Module>();
    InjectorConfig current = config;
    do {
      modules.addAll(current.getModules());
      InjectorConfig parent = null;
      if (current.hasParent()) {
        String parentName = current.getParentName();
        parent = configByName.get(parentName);
        if (parent == null) {
          LOG.info("Can't create {} as its ancestor {} can't be found",
View Full Code Here

Examples of com.cognifide.slice.api.injector.InjectorConfig

  }

  protected void bindListeners(final InjectorListener listener) {
    for (Entry<String, Injector> entry : injectorByName.entrySet()) {
      String name = entry.getKey();
      InjectorConfig config = configByName.get(name);
      listener.injectorCreated(entry.getValue(), config);
    }
    listeners.add(listener);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.