All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hudson.tools.ToolInstallerDescriptor Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 *
 * Copyright (c) 2009, Oracle Corporation
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *
 *
 *
 *
 *******************************************************************************/ 

package hudson.tools;

import hudson.DescriptorExtensionList;
import hudson.model.Descriptor;
import hudson.model.Hudson;

import java.util.List;
import java.util.ArrayList;

/**
 * Descriptor for a {@link ToolInstaller}.
 *
 * @since 1.305
 */
public abstract class ToolInstallerDescriptor extends Descriptor {

    /**
     * Controls what kind of {@link ToolInstallation} this installer can be
     * applied to.
     *
     * 

By default, this method just returns true to everything, claiming * it's applicable to any tool installations. */ public boolean isApplicable(Class toolType) { return true; } public static DescriptorExtensionList> all() { return Hudson.getInstance().>getDescriptorList(ToolInstaller.class); } /** * Filters {@link #all()} by eliminating things that are not applicable to * the given type. */ public static List> for_(Class type) { List> r = new ArrayList>(); for (ToolInstallerDescriptor d : all()) { if (d.isApplicable(type)) { r.add(d); } } return r; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy