Examples of withType()


Examples of org.gradle.platform.base.ComponentSpecContainer.withType()

        NamedDomainObjectContainer<NativeLibrarySpec> nativeLibraries = components.containerWithType(NativeLibrarySpec.class);

        project.getExtensions().create("nativeRuntime", DefaultNativeComponentExtension.class, nativeExecutables, nativeLibraries);

        // TODO:DAZ Remove these: should not pollute the global namespace
        project.getExtensions().add("nativeComponents", components.withType(NativeComponentSpec.class));
        project.getExtensions().add("executables", nativeExecutables);
        project.getExtensions().add("libraries", nativeLibraries);

        instantiateDefaultPlatforms();
    }
View Full Code Here

Examples of org.gradle.platform.base.ComponentSpecContainer.withType()

        Project project = findProject(requirement);
        ComponentSpecContainer componentSpecContainer = project.getExtensions().findByType(ComponentSpecContainer.class);
        if (componentSpecContainer == null) {
            throw new LibraryResolveException(String.format("Project does not have a libraries container: '%s'", project.getPath()));
        }
        DomainObjectSet<NativeBinarySpec> projectBinaries = componentSpecContainer.withType(NativeLibrarySpec.class).getByName(requirement.getLibraryName()).getNativeBinaries();
        DomainObjectSet<NativeLibraryBinary> binaries = new DefaultDomainObjectSet<NativeLibraryBinary>(NativeLibraryBinary.class);
        // TODO:DAZ Convert, don't cast
        for (NativeBinarySpec nativeBinarySpec : projectBinaries) {
            binaries.add((NativeLibraryBinary) nativeBinarySpec);
        }
View Full Code Here

Examples of org.grouplens.lenskit.symbols.Symbol.withType()

        if (channelVectors != null) {
            for (Map.Entry<Symbol, MutableSparseVector> entry : channelVectors.entrySet()) {
                Symbol key = entry.getKey();
                MutableSparseVector msv = entry.getValue().copy();
                newChanVectors.put(key, msv);
                newChannels.put(key.withType(Double.class), new MutableSparseVectorMap(msv));
            }
        }
        // copy all remaining channels into the channel map
        if (channels != null) {
            for (Entry<TypedSymbol<?>, Long2ObjectMap<?>> entry : channels.entrySet()) {
View Full Code Here

Examples of org.grouplens.lenskit.symbols.Symbol.withType()

        if (channelVectors != null) {
            for (Map.Entry<Symbol, MutableSparseVector> entry : channelVectors.entrySet()) {
                Symbol key = entry.getKey();
                ImmutableSparseVector chan = entry.getValue().immutable(freeze, newDomain);
                newChannelVectors.put(key, chan);
                newChannels.put(key.withType(Double.class), new SparseVectorMap(chan));
            }
        }

        if (channels != null) {
            for (Entry<TypedSymbol<?>, Long2ObjectMap<?>> entry : channels.entrySet()) {
View Full Code Here

Examples of org.grouplens.lenskit.symbols.Symbol.withType()

    }

    @Test
    public void testIncludesUnboxedChannels() {
        Symbol sym = Symbol.of("foo");
        TypedSymbol<Double> tsym = sym.withType(Double.class);
        PackedScoredIdList list = builder.addChannel(sym)
                                         .add(42, 3.9)
                                         .build();
        ScoredId sid = list.get(0);
        assertThat(sid.hasUnboxedChannel(sym), equalTo(true));
View Full Code Here

Examples of org.sonatype.nexus.capability.support.CapabilityReferenceFilterBuilder.CapabilityReferenceFilter.withType()

                                                final Boolean includeNotExposed,
                                                final List<String> properties)
  {
    CapabilityReferenceFilter filter = CapabilityReferenceFilterBuilder.capabilities();
    if (type != null) {
      filter = filter.withType(capabilityType(type));
    }
    if (enabled != null) {
      filter = filter.enabled(enabled);
    }
    if (active != null) {
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.