{@inheritDoc}

@see org.jboss.shrinkwrap.resolver.api.ResolveStage#addDependency(org.jboss.shrinkwrap.resolver.api.Coordinate)
550958
@Override
    public final RESOLVESTAGETYPE addDependency(final MavenDependency dependency) throws IllegalArgumentException {
        if (dependency == null) {
            throw new IllegalArgumentException("dependency must be specified");
        }
        final MavenDependency resolved = this.resolveDependency(dependency);
        this.session.getDependenciesForResolution().add(resolved);
        return this.covarientReturn();
    }
556663
public void addDependencyGraph(DAGraph<DataT, NodeT> dependencyGraph) {
        this.rootNode.addDependency(dependencyGraph.rootNode.key());
        Map<String, NodeT> sourceNodeTable = dependencyGraph.nodeTable;
        Map<String, NodeT> targetNodeTable = this.nodeTable;
        this.merge(sourceNodeTable, targetNodeTable);
        dependencyGraph.parentDAGs.add(this);
        if (this.hasParents()) {
            this.bubbleUpNodeTable(this, new LinkedList<String>());
        }
    }
516553
@SuppressWarnings("unchecked")
    protected void addPostRunDependent(Executable<? extends Indexable> executable) {
        TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) executable;
        this.addPostRunDependent(dependency);
    }
1054440
protected String addDependency(TaskGroup.HasTaskGroup dependency) {
        Objects.requireNonNull(dependency);
        this.taskGroup().addDependencyTaskGroup(dependency.taskGroup());
        return dependency.taskGroup().key();
    }
878854
private void addDependencyToGraph(final DbDependency dependency, final AbstractGraph graph, final int depth, final String parentId) {
        // In that case of Axway artifact we will add a module to the graph
        if (filters.getCorporateFilter().filter(dependency)) {
            final DbModule dbTarget = repoHandler.getModuleOf(dependency.getTarget());

            // if there is no module, add the artifact to the graph
            if(dbTarget == null){
                LOG.error("Got missing reference: " + dependency.getTarget());
                final DbArtifact dbArtifact = DataUtils.createDbArtifact(dependency.getTarget());
                final String targetElementId = graph.getId(dbArtifact);
                graph.addElement(targetElementId, dbArtifact.getVersion(), false);
                graph.addDependency(parentId, targetElementId, dependency.getScope());
                return;
            }

            // Add the element to the graph
            addModuleToGraph(dbTarget, graph, depth + 1);

            //Add the dependency to the graph
            final String moduleElementId = graph.getId(dbTarget);
            graph.addDependency(parentId, moduleElementId, dependency.getScope());
        }
        // In case a third-party we will add an artifact
        else {
            final DbArtifact dbTarget = repoHandler.getArtifact(dependency.getTarget());
            if(dbTarget == null){
                LOG.error("Got missing artifact: " + dependency.getTarget());
                return;
            }

            if(!graph.isTreated(graph.getId(dbTarget))){
                final ModelMapper modelMapper = new ModelMapper(repoHandler);
                final Artifact target = modelMapper.getArtifact(dbTarget);
                final String targetElementId = graph.getId(target);
                graph.addElement(targetElementId, target.getVersion(), false);
                graph.addDependency(parentId, targetElementId, dependency.getScope());
            }
        }
    }
72040
public void addDependentVariables(Variable ... depVars) {
		ArrayList<Variable> newDepVars = new ArrayList<Variable>();
		for (Variable v : this.dependentVariables) newDepVars.add(v);
		for (Variable v : depVars) newDepVars.add(v);
		this.dependentVariables = newDepVars.toArray(new Variable[newDepVars.size()]);
	}
165815
@Inject
   protected void injectDependencies(Cache cache) {
      this.queryCache = cache.getCacheManager().getGlobalComponentRegistry().getComponent(QueryCache.class);
      ComponentRegistry componentRegistry = cache.getAdvancedCache().getComponentRegistry();
      matcher = componentRegistry.getComponent(matcherImplClass);
      if (matcher == null) {
         throw new CacheException("Expected component not found in registry: " + matcherImplClass.getName());
      }
   }
387227
protected boolean addDependencies(DependencyContainer container)
  {
    /* XXX:
    if (_classPath instanceof JarPath) {
      container.add(_depend);
      return false;
    }
    else
    */ 
    if (_hasJNIReload) {
      container.add(this);
      return true;
    }
    else if (_sourcePath == null) {
      container.add(_depend);
      return false;
    }
    else {
      container.add(this);
      return true;
    }
  }
1244232
public void addDocumentDependency(CmsObject cms, CmsDocumentDependency resDeps) {

        if (resDeps != null) {
            m_doc.addField(CmsSearchField.FIELD_DEPENDENCY_TYPE, resDeps.getType());
            if ((resDeps.getMainDocument() != null) && (resDeps.getType() != null)) {
                m_doc.addField(
                    CmsSearchField.FIELD_PREFIX_DEPENDENCY + resDeps.getType().toString(),
                    resDeps.getMainDocument().toDependencyString(cms));
            }
            for (CmsDocumentDependency dep : resDeps.getVariants()) {
                m_doc.addField(
                    CmsSearchField.FIELD_PREFIX_DEPENDENCY + dep.getType().toString(),
                    dep.toDependencyString(cms));
            }
            for (CmsDocumentDependency dep : resDeps.getAttachments()) {
                m_doc.addField(
                    CmsSearchField.FIELD_PREFIX_DEPENDENCY + dep.getType().toString(),
                    dep.toDependencyString(cms));
            }
        }
    }
655912
public void addDependencies( String pomPath ) throws ProjectException {
        addDependencies( new Project(pomPath, getLocalRepoPath(), getRemoteRepositories()), null );
    }
450942
private void addDependent(String pathName, String relativeTo) {
        if (relativeTo != null) {
            Set<String> dependents = dependenctRelativePaths.get(relativeTo);
            if (dependents == null) {
                dependents = new HashSet<String>();
                dependenctRelativePaths.put(relativeTo, dependents);
            }
            dependents.add(pathName);
        }
    }
31218
private void addDependency(String symbol, Set<String> seen, List<String> list)
      throws ServiceException {
    DependencyInfo dependency = getDependencyInfo(symbol);
    if (dependency == null) {
      if (this.strictRequires) {
        throw new ServiceException("Unknown require of " + symbol);
      }
    } else if (!seen.containsAll(dependency.getProvides())) {
      seen.addAll(dependency.getProvides());
      for (String require : dependency.getRequiredSymbols()) {
        addDependency(require, seen, list);
      }
      list.add(dependency.getPathRelativeToClosureBase());
    }
  }
682449
public static void addServerExecutorDependency(ServiceBuilder<?> serviceBuilder, InjectedValue<ExecutorService> injector, boolean optional) {
    ServiceBuilder.DependencyType type = optional ? ServiceBuilder.DependencyType.OPTIONAL : ServiceBuilder.DependencyType.REQUIRED;
    serviceBuilder.addDependency(type, JBOSS_SERVER_EXECUTOR, ExecutorService.class, injector);
  }
629999
private static void addDependencyFactoryToContainer(Object dependencyFactory) {
        try {
            Class clazz = dependencyFactory.getClass();
            for (Field field : ReflectionHelper.getFields(clazz)) {
                if (field.isAnnotationPresent(Dependency.class)) {
                    qualifiers.clear();
                    for (Annotation annotation : field.getAnnotations()) {
                        if (annotation.annotationType().isAnnotationPresent(Qualifier.class)) {
                            qualifiers.add(annotation.annotationType().getCanonicalName());
                        }
                    }
                    dependencyContainer.add(DependencyIdentifier
                                    .getDependencyIdentifierForClass(field, qualifiers),
                            new DependencySource(DependencySource.DependencySourceType.FIELD,
                                    field,
                                    null,
                                    dependencyFactory,
                                    field.isAnnotationPresent(Singleton.class)));
                }
            }
            for (Method method : clazz.getMethods()) {
                if (method.isAnnotationPresent(Dependency.class)) {
                    qualifiers.clear();
                    for (Annotation annotation : method.getAnnotations()) {
                        if (annotation.annotationType().isAnnotationPresent(Qualifier.class)) {
                            qualifiers.add(annotation.annotationType().getCanonicalName());
                        }
                    }
                    dependencyContainer.add(DependencyIdentifier
                                    .getDependencyIdentifierForClass(method, qualifiers),
                            new DependencySource(DependencySource.DependencySourceType.METHOD,
                                    null,
                                    method,
                                    dependencyFactory,
                                    method.isAnnotationPresent(Singleton.class)));
                }
            }
        } catch (Exception e) {
            throw new AvicennaRuntimeException(e);
        }
    }
1115455
@Override
    public RESOLVESTAGETYPE addDependencies(final Collection<MavenDependency> dependencies)
        throws IllegalArgumentException {
        if (dependencies == null) {
            throw new IllegalArgumentException("dependencies must be provided");
        }
        for (final MavenDependency dep : dependencies) {
            this.addDependency(dep);
        }
        return this.covarientReturn();
    }
395945
public void addDependency(String notation, String scope) {
        log.debug("Add dep {} {}", notation, scope);
        
        DefaultArtifact artifact = new DefaultArtifact( notation );
        
        if ( Const.TEST.equals( artifact.getClassifier() ) || Const.TEST_JAR.equals( artifact.getClassifier() ) ) {
            
            ArtifactType artifactType = new DefaultArtifactType( Const.TEST_JAR, Const.JAR, Const.TEST_JAR, null );
            
            artifact = new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(),
                    null, Const.JAR, artifact.getBaseVersion(), artifactType );
        }
        Dependency dependency = new Dependency(artifact, scope);
        addDependency(dependency);
    }
708838
public final void add(ObservableDoubleValue dependency) {
        requireNonNull(dependency, "Parameter 'dependency' is null");

        if (!dependencies.contains(dependency)) {

            dependencies.add(dependency);
            bind(dependency);
            invalidate();

        } else {
            LOGGER.warn("Dependency already included: " + dependency + ", Skipping.");
        }
    }