Adds a read-edge to this module to the supplied module using the instrumentation API.

@param instrumentation The instrumentation instance to use for adding the edge.
@param module          The module to add as a read dependency to this module.
174998
public void addReads(Instrumentation instrumentation, JavaModule module) {
        DISPATCHER.addReads(instrumentation, this.module, module.unwrap());
    }
1158795
public void setModule(JSModule module) {
    // An input may only belong to one module.
    checkArgument(module == null || this.module == null || this.module == module);
    this.module = module;
  }
352944
@Override
    public T addAsModule(final URL resource, final String targetPath) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource must be specified");
        Validate.notNull(targetPath, "Target Path must be specified");

        return addAsModule(resource, new BasicPath(targetPath));
    }
407535
public void addModuleToExport(final String moduleName) {

        if (m_modulesToExport == null) {
            m_modulesToExport = new HashSet<String>();
        }
        m_modulesToExport.add(moduleName);
    }
424980
public void loadModule(final JsiiModule module) {
        try {
            String tarball = extractResource(module.getModuleClass(), module.getBundleResourceName(), null);
            ObjectNode req = makeRequest("load");
            req.put("tarball", tarball);
            req.put("name", module.getModuleName());
            req.put("version", module.getModuleVersion());
            this.runtime.requestResponse(req);
        } catch (IOException e) {
            throw new JsiiException("Unable to extract resource " + module.getBundleResourceName(), e);
        }
    }
829936
public final static Function<BigInteger, BigInteger> module(byte module) {
        return new Module(fromNumber(Byte.valueOf(module)));
    }
1185099
public boolean add(TypedEdge<T> e) {
        if (e.from() == rootVertex) 
            return add(edges, e.to(), e.edgeType());
        else if (e.to() == rootVertex) 
            return add(edges, e.from(), e.edgeType());
        return false;
    }
60413
private void addModulesArgument(final String argument, final List<String> arguments, final Module[] modules,
                                    final String aditionalpath, final String role)
            throws MojoExecutionException {
        StringBuilder buf = new StringBuilder();

        if (null != aditionalpath) {
            arguments.add(argument);
            buf.append(aditionalpath);
        }
        if (modules != null && modules.length > 0) {
            if (!arguments.contains(argument)) {
                arguments.add(argument);
            }

            for (int i = 0; i < modules.length; ++i) {
                Module module = modules[i];
                // String key = ArtifactUtils.versionlessKey( module.getGroupId(), module.getArtifactId() );
                // Artifact artifact = (Artifact) project.getArtifactMap().get( key );
                Artifact artifact = null;
                @SuppressWarnings("unchecked") Set<Artifact> allArtifacts = project.getArtifacts();
                for (Artifact art : allArtifacts) {
                    if (art.getGroupId().equals(module.getGroupId()) && art.getArtifactId().equals(
                            module.getArtifactId()) && StringUtils.defaultString(module.getClassifier()).equals(
                            StringUtils.defaultString(art.getClassifier())) && StringUtils.defaultString(
                            module.getType(), "jar").equals(StringUtils.defaultString(art.getType()))) {
                        artifact = art;
                        break;
                    }
                }
                if (artifact == null) {
                    throw new MojoExecutionException(
                            "The artifact " + module.toString() + " referenced in aspectj plugin as " + role
                                    + ", is not found the project dependencies");
                }
                if (buf.length() != 0) {
                    buf.append(File.pathSeparatorChar);
                }
                buf.append(artifact.getFile().getPath());
            }
        }
        if (buf.length() > 0) {
            String pathString = buf.toString();
            arguments.add(pathString);
            getLog().debug("Adding " + argument + ": " + pathString);
        }
    }
11141
@Bind(optional = true, aggregate = true)
    public synchronized void bindModule(Module module) {
        register(module);
    }
877930
private void addAllDependenciesAndPermissions(final ModuleSpecification moduleSpecification, final AdditionalModuleSpecification module) {
        module.addSystemDependencies(moduleSpecification.getSystemDependencies());
        module.addLocalDependencies(moduleSpecification.getLocalDependencies());
        for(ModuleDependency dep : moduleSpecification.getUserDependencies()) {
            if(!dep.getIdentifier().equals(module.getModuleIdentifier())) {
                module.addUserDependency(dep);
            }
        }
        for(PermissionFactory factory : moduleSpecification.getPermissionFactories()) {
            module.addPermissionFactory(factory);
        }
    }
1326740
public void addModule(Module module) {
        PreconditionUtil.verify(!initialized, "CrnkClient already initialized, cannot add further modules");
        if (module instanceof HttpAdapterAware) {
            ((HttpAdapterAware) module).setHttpAdapter(getHttpAdapter());
        }
        this.moduleRegistry.addModule(module);
    }
981723
public void addExtraModule(String moduleId) {
		if (extraModules == null) {
			extraModules = new LinkedList<String>();
		}
		extraModules.add(moduleId);
	}
1247626
public void addSubmodule(final Module submodule) {
        if (!submodules.contains(submodule)) {
            submodule.setSubmodule(true);

            if (promoted) {
                submodule.setPromoted(promoted);
            }

            submodules.add(submodule);
        }
    }
949038
public void addAccessorAnnotationDescriptor(String annotationDesc) {
        if (mAnnotationDescs == null) {
            mAnnotationDescs = new ArrayList<String>(4);
        }
        mAnnotationDescs.add(annotationDesc);
    }
577047
@Override
    public void generate(final Module module, final Element element) {
        // this is not necessary, it is done to avoid the namespace definition
        // in every item.
        Element root = element;
        while (root.getParent() != null && root.getParent() instanceof Element) {
            root = (Element) element.getParent();
        }
        root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS);
        root.addNamespaceDeclaration(GeoRSSModule.GML_NS);

        final Element whereElement = new Element("where", GeoRSSModule.SIMPLE_NS);
        element.addContent(whereElement);

        final GeoRSSModule geoRSSModule = (GeoRSSModule) module;
        final AbstractGeometry geometry = geoRSSModule.getGeometry();

        if (geometry instanceof Point) {
            final Position pos = ((Point) geometry).getPosition();

            final Element pointElement = new Element("Point", GeoRSSModule.GML_NS);
            whereElement.addContent(pointElement);

            final Element posElement = new Element("pos", GeoRSSModule.GML_NS);
            posElement.addContent(String.valueOf(pos.getLatitude()) + " " + String.valueOf(pos.getLongitude()));
            pointElement.addContent(posElement);
        }

        else if (geometry instanceof LineString) {
            final PositionList posList = ((LineString) geometry).getPositionList();

            final Element lineElement = new Element("LineString", GeoRSSModule.GML_NS);
            lineElement.addContent(createPosListElement(posList));
            whereElement.addContent(lineElement);
        } else if (geometry instanceof Polygon) {
            final Element polygonElement = new Element("Polygon", GeoRSSModule.GML_NS);
            {
                final AbstractRing ring = ((Polygon) geometry).getExterior();
                if (ring instanceof LinearRing) {
                    final Element exteriorElement = new Element("exterior", GeoRSSModule.GML_NS);
                    polygonElement.addContent(exteriorElement);
                    final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
                    exteriorElement.addContent(ringElement);
                    ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));

                } else {
                    System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
                }
            }
            final List<AbstractRing> interiorList = ((Polygon) geometry).getInterior();
            final Iterator<AbstractRing> it = interiorList.iterator();
            while (it.hasNext()) {
                final AbstractRing ring = it.next();
                if (ring instanceof LinearRing) {
                    final Element interiorElement = new Element("interior", GeoRSSModule.GML_NS);
                    polygonElement.addContent(interiorElement);
                    final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
                    interiorElement.addContent(ringElement);
                    ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));

                } else {
                    System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
                }
            }
            whereElement.addContent(polygonElement);
        } else if (geometry instanceof Envelope) {
            final Envelope envelope = (Envelope) geometry;
            final Element envelopeElement = new Element("Envelope", GeoRSSModule.GML_NS);
            whereElement.addContent(envelopeElement);

            final Element lowerElement = new Element("lowerCorner", GeoRSSModule.GML_NS);
            lowerElement.addContent(String.valueOf(envelope.getMinLatitude()) + " " + String.valueOf(envelope.getMinLongitude()));
            envelopeElement.addContent(lowerElement);

            final Element upperElement = new Element("upperCorner", GeoRSSModule.GML_NS);
            upperElement.addContent(String.valueOf(envelope.getMaxLatitude()) + " " + String.valueOf(envelope.getMaxLongitude()));
            envelopeElement.addContent(upperElement);

        } else {
            System.err.println("GeoRSS GML format can't handle geometries of type: " + geometry.getClass().getName());
        }
    }
593451
private void addModules(MavenProject project, MavenProjectDirectoryDescriptor projectDescriptor, ScannerContext scannerContext) {
        File projectDirectory = project.getBasedir();
        Set<File> modules = new HashSet<>();
        for (String moduleName : project.getModules()) {
            File module = new File(projectDirectory, moduleName);
            modules.add(module);
        }
        for (MavenProject module : project.getCollectedProjects()) {
            if (modules.contains(module.getBasedir())) {
                MavenProjectDescriptor moduleDescriptor = resolveProject(module, MavenProjectDescriptor.class, scannerContext);
                projectDescriptor.getModules().add(moduleDescriptor);
            }
        }
    }
1294036
@SuppressWarnings("UnstableApiUsage")
    private void computeProjectDependencies(IdeaModule module) {
        ARTIFACT_DEPS_OF_PRJ.computeIfAbsent(module.getName(), moduleName -> {
            Map<String, Set<ArtifactSpec>> dependencies = new HashMap<>();
            module.getDependencies().forEach(dep -> {
                if (dep instanceof IdeaModuleDependency) {
                    // Add the dependency to the list.
                    String name = ((IdeaModuleDependency) dep).getTargetModuleName();
                    PRJ_DEPS_OF_PRJ.computeIfAbsent(moduleName, key -> new HashSet<>()).add(name);
                } else if (dep instanceof ExternalDependency) {
                    ExternalDependency extDep = (ExternalDependency) dep;
                    GradleModuleVersion gav = extDep.getGradleModuleVersion();
                    ArtifactSpec spec = new ArtifactSpec("compile", gav.getGroup(), gav.getName(), gav.getVersion(),
                                                         "jar", null, extDep.getFile());
                    String depScope = dep.getScope().getScope();
                    dependencies.computeIfAbsent(depScope, s -> new HashSet<>()).add(spec);
                }
            });
            return dependencies;
        });
    }