Package com.cognifide.slice.api.injector

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


    }
  }

  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

    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

    }
  }

  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

  }

  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

Related Classes of com.cognifide.slice.api.injector.InjectorConfig

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.