# PluginCollection

interface PluginCollection<T : Plugin?> : DomainObjectSet<T> (source)

A `PluginCollection` represents a collection of org.gradle.api.Plugin instances.

#### Parameters

<T>

The type of plugins which this collection contains.

#### Inheritors

PluginContainer

## Functions

add
Link copied to clipboard
abstract fun add(plugin: T): Boolean
Unsupported.
addAll
Link copied to clipboard
abstract fun addAll(c: Collection<out T>): Boolean
Unsupported.
addAllLater
Link copied to clipboard
abstract fun addAllLater(provider: Provider<out Iterable<T>>)
addLater
Link copied to clipboard
abstract fun addLater(provider: Provider<out T>)
all
Link copied to clipboard
abstract fun all(action: Action<in T>)
clear
Link copied to clipboard
abstract fun clear()
Unsupported.
configureEach
Link copied to clipboard
abstract fun configureEach(action: Action<in T>)
contains
Link copied to clipboard
abstract fun contains(p: Any): Boolean
containsAll
Link copied to clipboard
abstract fun containsAll(p: Collection<out Any>): Boolean
copyOf
Link copied to clipboard
open fun <E> copyOf(p: Collection<out E>): Set<E>
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
findAll
Link copied to clipboard
abstract fun findAll(spec: Closure): Collection<T>
abstract fun findAll(spec: Closure): Set<T>
forEach
Link copied to clipboard
open fun forEach(p: Consumer<in T>)
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
isEmpty
Link copied to clipboard
abstract fun isEmpty(): Boolean
iterator
Link copied to clipboard
abstract fun iterator(): Iterator<T>
abstract fun iterator(): Iterator<E>
matching
Link copied to clipboard
abstract fun matching(spec: Spec<in T>): DomainObjectCollection<T>
abstract fun matching(closure: Closure): PluginCollection<T>
abstract fun matching(spec: Spec<in T>): PluginCollection<T>
of
Link copied to clipboard
open fun <E> of(): Set<E>
parallelStream
Link copied to clipboard
open fun parallelStream(): Stream<E>
remove
Link copied to clipboard
abstract fun remove(o: Any): Boolean
Unsupported.
removeAll
Link copied to clipboard
abstract fun removeAll(c: Collection<out Any>): Boolean
Unsupported.
removeIf
Link copied to clipboard
open fun removeIf(p: Predicate<in E>): Boolean
retainAll
Link copied to clipboard
abstract fun retainAll(p: Collection<out Any>): Boolean
size
Link copied to clipboard
abstract fun size(): Int
spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<T>
open fun spliterator(): Spliterator<E>
stream
Link copied to clipboard
open fun stream(): Stream<E>
toArray
Link copied to clipboard
abstract fun toArray(): Array<Any>
abstract fun <T> toArray(p: Array<T>): Array<T>
whenObjectAdded
Link copied to clipboard
abstract fun whenObjectAdded(action: Closure)
abstract fun whenObjectAdded(action: Action<in T>): Action<in T>
whenObjectRemoved
Link copied to clipboard
abstract fun whenObjectRemoved(action: Closure)
abstract fun whenObjectRemoved(action: Action<in T>): Action<in T>
whenPluginAdded
Link copied to clipboard
abstract fun whenPluginAdded(closure: Closure)
Adds a closure to be called when a plugin is added to this collection.
abstract fun whenPluginAdded(action: Action<in T>): Action<in T>
Adds an `Action` to be executed when a plugin is added to this collection.
withType
Link copied to clipboard
abstract fun <S : T?> withType(type: Class<S>): DomainObjectCollection<S>
abstract fun <S : T?> withType(type: Class<S>): PluginCollection<S>
withType
Link copied to clipboard
inline fun <S : Any> DomainObjectCollection<in S>.withType(): <Error class: unknown class>

Returns a collection containing the objects in this collection of the given type. The returned collection is live, so that when matching objects are later added to this collection, they are also visible in the filtered collection.

inline fun <S : Any> DomainObjectCollection<in S>.withType(noinline configuration: S.() -> Unit): DomainObjectCollection<S>

Returns a collection containing the objects in this collection of the given type. Equivalent to calling `withType(type).all(configureAction)`.

inline fun <S : T, T : Any> DomainObjectCollection<T>.withType(type: KClass<S>): DomainObjectCollection<S>
inline fun <S : T, T : Any> DomainObjectCollection<T>.withType(type: KClass<S>, configureAction: Action<in S>): DomainObjectCollection<S>

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.DomainObjectCollection.withType.

inline fun <S : T, T : Any> DomainObjectSet<T>.withType(type: KClass<S>): DomainObjectSet<S>

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.DomainObjectSet.withType.

inline fun <S : T, T : Plugin<*>> PluginCollection<T>.withType(type: KClass<S>): PluginCollection<S>

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.plugins.PluginCollection.withType.