Java 类org.gradle.api.DomainObjectCollection 实例源码

项目:Reer    文件:CompositeDomainObjectSet.java   
public static <T> CompositeDomainObjectSet<T> create(Class<T> type, DomainObjectCollection<? extends T>... collections) {
    //noinspection unchecked
    DefaultDomainObjectSet<T> backingSet = new DefaultDomainObjectSet<T>(type, new CompositeCollection());
    CompositeDomainObjectSet<T> out = new CompositeDomainObjectSet<T>(backingSet);
    for (DomainObjectCollection<? extends T> c : collections) {
        out.addCollection(c);
    }
    return out;
}
项目:Reer    文件:CompositeDomainObjectSet.java   
public void addCollection(DomainObjectCollection<? extends T> collection) {
    if (!getStore().getCollections().contains(collection)) {
        getStore().addComposited(collection);
        collection.all(backingSet.getEventRegister().getAddAction());
        collection.whenObjectRemoved(backingSet.getEventRegister().getRemoveAction());
    }
}
项目:Reer    文件:CompositeDomainObjectSet.java   
public void removeCollection(DomainObjectCollection<? extends T> collection) {
    getStore().removeComposited(collection);
    Action<? super T> action = this.backingSet.getEventRegister().getRemoveAction();
    for (T item : collection) {
        action.execute(item);
    }
}
项目:gradle-plugins    文件:WarOverlayPluginTest.java   
@Test
public void testProperties() {
    Project project = ProjectBuilder.builder().build();

    project.getPlugins().apply(WarPlugin.class);
    project.getPlugins().apply(WarOverlayPlugin.class);

    Task warTask = project.getTasks().getByName(WarPlugin.WAR_TASK_NAME);

    assertThat(warTask.hasProperty("overlays")).isTrue();
    assertThat(warTask.property("overlays")).isInstanceOf(DomainObjectCollection.class);
}
项目:gradle-plugins    文件:WarOverlayPluginTest.java   
@Test
public void testProperties() {
    Project project = ProjectBuilder.builder().build();

    project.getPlugins().apply(WarPlugin.class);
    project.getPlugins().apply(WarOverlayPlugin.class);

    Task warTask = project.getTasks().getByName(WarPlugin.WAR_TASK_NAME);

    assertThat(warTask.hasProperty("overlays")).isTrue();
    assertThat(warTask.property("overlays")).isInstanceOf(DomainObjectCollection.class);
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public CompositeDomainObjectSet<T> addCollection(DomainObjectCollection<? extends T> collection) {
    if (!getStore().getCollections().contains(collection)) {
        getStore().addComposited(collection);
        collection.all(getEventRegister().getAddAction());
        collection.whenObjectRemoved(getEventRegister().getRemoveAction());
    }
    return this;
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public void removeCollection(DomainObjectCollection<? extends T> collection) {
    getStore().removeComposited(collection);
    Action<? super T> action = getEventRegister().getRemoveAction();
    for (T item : collection) {
        action.execute(item);
    }
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public void addCollection(DomainObjectCollection<? extends T> collection) {
    if (!getStore().getCollections().contains(collection)) {
        getStore().addComposited(collection);
        collection.all(getEventRegister().getAddAction());
        collection.whenObjectRemoved(getEventRegister().getRemoveAction());
    }
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public void removeCollection(DomainObjectCollection<? extends T> collection) {
    getStore().removeComposited(collection);
    Action<? super T> action = getEventRegister().getRemoveAction();
    for (T item : collection) {
        action.execute(item);
    }
}
项目:Reer    文件:DelegatingDomainObjectSet.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    return backingSet.withType(type, configureAction);
}
项目:Reer    文件:DelegatingDomainObjectSet.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    return withType(type, ConfigureUtil.configureUsing(configureClosure));
}
项目:Reer    文件:DefaultDomainObjectCollection.java   
public DomainObjectCollection<T> matching(final Spec<? super T> spec) {
    return filtered(createFilter(spec));
}
项目:Reer    文件:DefaultDomainObjectCollection.java   
public DomainObjectCollection<T> matching(Closure spec) {
    return matching(Specs.<T>convertClosureToSpec(spec));
}
项目:Reer    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(final Class<S> type) {
    return filtered(createFilter(type));
}
项目:Reer    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    DomainObjectCollection<S> result = withType(type);
    result.all(configureAction);
    return result;
}
项目:Reer    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    DomainObjectCollection<S> result = withType(type);
    result.all(configureClosure);
    return result;
}
项目:Reer    文件:TypedDomainObjectContainerWrapper.java   
public <S extends U> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    return delegate.withType(type, configureAction);
}
项目:Reer    文件:TypedDomainObjectContainerWrapper.java   
public <S extends U> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    return delegate.withType(type, configureClosure);
}
项目:Pushjet-Android    文件:DelegatingDomainObjectSet.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    return backingSet.withType(type, configureAction);
}
项目:Pushjet-Android    文件:DelegatingDomainObjectSet.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    return backingSet.withType(type, configureClosure);
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public DomainObjectCollection<T> matching(final Spec<? super T> spec) {
    return filtered(createFilter(spec));
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public DomainObjectCollection<T> matching(Closure spec) {
    return matching(Specs.<T>convertClosureToSpec(spec));
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(final Class<S> type) {
    return filtered(createFilter(type));
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    DomainObjectCollection<S> result = withType(type);
    result.all(configureAction);
    return result;
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    DomainObjectCollection<S> result = withType(type);
    result.all(configureClosure);
    return result;
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public CompositeDomainObjectSet(Class<T> type, DomainObjectCollection<? extends T>... collections) {
    this(type);
    for (DomainObjectCollection<? extends T> collection : collections) {
        addCollection(collection);
    }
}
项目:Pushjet-Android    文件:DefaultClassDirectoryBinary.java   
public DomainObjectCollection<LanguageSourceSet> getSource() {
    return source;
}
项目:Pushjet-Android    文件:DelegatingDomainObjectSet.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    return backingSet.withType(type, configureAction);
}
项目:Pushjet-Android    文件:DelegatingDomainObjectSet.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    return backingSet.withType(type, configureClosure);
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public DomainObjectCollection<T> matching(final Spec<? super T> spec) {
    return filtered(createFilter(spec));
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public DomainObjectCollection<T> matching(Closure spec) {
    return matching(Specs.<T>convertClosureToSpec(spec));
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(final Class<S> type) {
    return filtered(createFilter(type));
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
    DomainObjectCollection<S> result = withType(type);
    result.all(configureAction);
    return result;
}
项目:Pushjet-Android    文件:DefaultDomainObjectCollection.java   
public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
    DomainObjectCollection<S> result = withType(type);
    result.all(configureClosure);
    return result;
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public CompositeDomainObjectSet(Class<T> type, DomainObjectCollection<? extends T>... collections) {
    this(type);
    for (DomainObjectCollection<? extends T> collection : collections) {
        addCollection(collection);
    }
}
项目:Pushjet-Android    文件:ClassDirectoryBinary.java   
DomainObjectCollection<LanguageSourceSet> getSource();