)]
	TRACE: InstalledJava(1.8.0_101-b13|1.8.0_101-b13|JRE|64bit|C:\Program Files\Java\jre1.8.0_101|{26A24AE4-039D-4CA4-87B4-2F64180101F0}|10)
[2025/04/05 14:52:06.464, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:490 (JavaEnvironment::detect)]
	TRACE: Installed Java detected: version=1.8.0_171; arch=64; productCode={26A24AE4-039D-4CA4-87B4-2F64180171F0}; type=0
[2025/04/05 14:52:06.464, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:140 (`anonymous-namespace'::detectHomeDir)]
	TRACE: Find home dir of {26A24AE4-039D-4CA4-87B4-2F64180171F0} Java installation
[2025/04/05 14:52:06.480, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:304 (`anonymous-namespace'::detectFullVersion)]
	TRACE: Detect full version of {26A24AE4-039D-4CA4-87B4-2F64180171F0} Java installation
[2025/04/05 14:52:06.480, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:215 (`anonymous-namespace'::detectFullVersionFromMsi)]
	TRACE: detectFullVersionFromMsi({26A24AE4-039D-4CA4-87B4-2F64180171F0})
[2025/04/05 14:52:06.573, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:328 (`anonymous-namespace'::detectJreMode)]
	TRACE: Detect mode of {26A24AE4-039D-4CA4-87B4-2F64180171F0} Java installation
[2025/04/05 14:52:06.573, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:452 (`anonymous-namespace'::getInstalledJava)]
	TRACE: InstalledJava(1.8.0_171-b11|1.8.0_171-b11|JRE|64bit|C:\Program Files\Java\jre1.8.0_171|{26A24AE4-039D-4CA4-87B4-2F64180171F0}|10)
[2025/04/05 14:52:06.573, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:490 (JavaEnvironment::detect)]
	TRACE: Installed Java detected: version=1.8.0; arch=64; productCode={64A3A4F4-B792-11D6-A78A-00B0D0180111}; type=1
[2025/04/05 14:52:06.696, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:0 (JavaEnvironment::detect)]
	TRACE: Exiting JavaEnvironment::detect (entered at JavaEnvironment.cpp:473)
[2025/04/05 14:52:06.900, jucheck.exe (PID: 6632, TID: 3708), Executor.cpp:147 (Executor::startExecution)]
	INFO: Executor.exec(): "C:\Program Files\Java\jre1.8.0_171\bin\javaws.exe" -SSVBaselineUpdate
[2025/04/05 14:52:07.189, jucheck.exe (PID: 6632, TID: 3708), Executor.cpp:181 (Executor::finishExecution)]
	INFO: Executor.finishExecution(): WaitForSingleObject exited with code 0
[2025/04/05 14:52:07.189, jucheck.exe (PID: 6632, TID: 3708), Executor.cpp:195 (Executor::finishExecution)]
	INFO: Executor.finishExecution(): ExitCode = 0
[2025/04/05 14:52:07.189, jucheck.exe (PID: 6632, TID: 3708), UpdateConf.cpp:1497 (UpdateSSV)]
	INFO: UpdateSSV() - Update Successful
[2025/04/05 14:52:07.189, jucheck.exe (PID: 6632, TID: 3708), AllUtils.cpp:125 (logit)]
	INFO: SetJavaUpdateStringKey was called with a NULL value for the key, so defaulting to trying jucheck key
[2025/04/05 14:52:07.267, jucheck.exe (PID: 6632, TID: 3708), Registry.cpp:389 (Registry::setString)]
	TRACE: Set [HKLM32\SOFTWARE\JavaSoft\Java Update\Policy\jucheck\LastUpdateBeginTime]=REG_SZ[Sat, 05 Apr 2025 11:52:07 GMT]
[2025/04/05 14:52:07.267, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:473 (JavaEnvironment::detect)]
	TRACE: Entering JavaEnvironment::detect
[2025/04/05 14:52:07.299, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:490 (JavaEnvironment::detect)]
	TRACE: Installed Java detected: version=1.8.0_101; arch=64; productCode={26A24AE4-039D-4CA4-87B4-2F64180101F0}; type=0
[2025/04/05 14:52:07.299, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:490 (JavaEnvironment::detect)]
	TRACE: Installed Java detected: version=1.8.0_171; arch=64; productCode={26A24AE4-039D-4CA4-87B4-2F64180171F0}; type=0
[2025/04/05 14:52:07.299, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:490 (JavaEnvironment::detect)]
	TRACE: Installed Java detected: version=1.8.0; arch=64; productCode={64A3A4F4-B792-11D6-A78A-00B0D0180111}; type=1
[2025/04/05 14:52:07.377, jucheck.exe (PID: 6632, TID: 3708), JavaEnvironment.cpp:0 (JavaEnvironment::detect)]
	TRACE: Exiting JavaEnvironment::detect (entered at JavaEnvironment.cpp:473)
[2025/04/05 14:52:07.37/*
 * Copyright 2010 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.gradle.api.internal.plugins;

import groovy.lang.Closure;
import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.internal.DefaultDomainObjectSet;
import org.gradle.api.internal.collections.CollectionFilter;
import org.gradle.api.plugins.PluginCollection;
import org.gradle.api.specs.Spec;
import org.gradle.api.specs.Specs;

public class DefaultPluginCollection<T extends Plugin> extends DefaultDomainObjectSet<T> implements PluginCollection<T> {

    public DefaultPluginCollection(Class<T> type) {
        super(type);
    }
    
    protected DefaultPluginCollection(DefaultPluginCollection<? super T> collection, CollectionFilter<T> filter) {
        super(collection, filter);
    }

    protected <S extends T> DefaultPluginCollection<S> filtered(CollectionFilter<S> filter) {
        return new DefaultPluginCollection<S>(this, filter);
    }

    public <S extends T> PluginCollection<S> withType(Class<S> type) {
        return filtered(createFilter(type));
    }

    public PluginCollection<T> matching(Spec<? super T> spec) {
        return filtered(createFilter(spec));
    }

    public PluginCollection<T> matching(Closure spec) {
        return matching(Specs.<T>convertClosureToSpec(spec));
    }

    public Action<? super T> whenPluginAdded(Action<? super T> action) {
        return whenObjectAdded(action);
    }

    public void whenPluginAdded(Closure closure) {
        whenObjectAdded(closure);
    }

}
