
hudson.matrix.JDKAxis Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hudson-core Show documentation
Show all versions of hudson-core Show documentation
Contains the core Hudson code and view files to render HTML.
The newest version!
/*******************************************************************************
*
* Copyright (c) 2010, InfraDNA, Inc.
*
* 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.matrix;
import hudson.Extension;
import hudson.model.Hudson;
import org.kohsuke.stapler.DataBoundConstructor;
import java.util.Arrays;
import java.util.List;
/**
* {@link Axis} that selects available JDKs.
*
* @author Kohsuke Kawaguchi
*/
public class JDKAxis extends Axis {
/**
* JDK axis was used to be stored as a plain "Axis" with the name "jdk",
* so it cannot be configured by any other name.
*/
public JDKAxis(List values) {
super("jdk", values);
}
@DataBoundConstructor
public JDKAxis(String[] values) {
super("jdk", Arrays.asList(values));
}
@Override
public boolean isSystem() {
return true;
}
@Extension
public static class DescriptorImpl extends AxisDescriptor {
@Override
public String getDisplayName() {
return Messages.JDKAxis_DisplayName();
}
/**
* If there's no JDK configured, there's no point in this axis.
*/
@Override
public boolean isInstantiable() {
return !Hudson.getInstance().getJDKs().isEmpty();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy