本文整理了Java中hudson.Extension
类的一些代码示例,展示了Extension
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension
类的具体详情如下:
包路径:hudson.Extension
类名称:Extension
暂无
代码示例来源:origin: jenkinsci/jenkins
@Extension @Symbol("standard")
public static class DescriptorImpl extends MyViewsTabBarDescriptor {
@Override
public String getDisplayName() {
return Messages.DefaultMyViewsTabsBar_DisplayName();
//return "Default My Views TabsBar";
}
}
代码示例来源:origin: jenkinsci/jenkins
@Override
protected boolean isOptional(Extension annotation) {
return annotation.optional();
}
代码示例来源:origin: jenkinsci/jenkins
@Override
protected double getOrdinal(Extension annotation) {
return annotation.ordinal();
}
代码示例来源:origin: jenkinsci/jenkins
@Extension
public static class ListenForInstallComplete extends InstallStateFilter {
@Override
public InstallState getNextInstallState(InstallState current, Provider<InstallState> proceed) {
InstallState next = proceed.get();
if (InstallState.INITIAL_SETUP_COMPLETED.equals(current)) {
UpgradeWizard.get().isUpToDate = true;
}
return next;
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension
public static final class AdministrativeMonitorImpl extends AdministrativeMonitor {
@Override
public String getDisplayName() {
return Messages.SCMTrigger_AdministrativeMonitorImpl_DisplayName();
}
private boolean on;
public boolean isActivated() {
return on;
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension @Symbol("demand")
public static class DescriptorImpl extends Descriptor<RetentionStrategy<?>> {
@Override
public String getDisplayName() {
return Messages.RetentionStrategy_Demand_displayName();
}
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension
public static class ConditionallyHidden extends DescriptorVisibilityFilter {
@SuppressWarnings("rawtypes")
@Override
public boolean filter(Object context, Descriptor descriptor) {
if (descriptor instanceof DescriptorImpl && context instanceof Job) {
return ((Job) context).supportsLogRotator();
}
return true;
}
}
代码示例来源:origin: jenkinsci/jenkins
public ExtensionComponent(T instance, Extension annotation) {
this(instance,annotation.ordinal());
}
代码示例来源:origin: jenkinsci/jenkins
private Level logLevel(IndexItem<Extension, Object> item) {
return item.annotation().optional() ? Level.FINE : Level.WARNING;
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension(ordinal = Integer.MAX_VALUE) @Symbol("none")
public static class DescriptorImpl extends SCMDescriptor<NullSCM> {
public DescriptorImpl() {
super(null);
}
@Override public String getDisplayName() {
return Messages.NullSCM_DisplayName();
}
}
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Whitelist rule based on system properties.
*
* For the bypass "kill" switch to be effective, it needs to have a high enough priority
*/
@Extension(ordinal=100)
public static class DefaultWhitelist extends CallableWhitelist {
@Override
public boolean isWhitelisted(RoleSensitive subject, Collection<Role> expected, Object context) {
return BYPASS;
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension(ordinal=DEFAULT_COLUMNS_ORDINAL_PROPERTIES_START-2) @Symbol("lastFailure")
public static class DescriptorImpl extends ListViewColumnDescriptor {
@Override
public String getDisplayName() {
return Messages.LastFailureColumn_DisplayName();
}
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension(ordinal = 10)
public static class DescriptorImpl extends GlobalSettingsProviderDescriptor {
@Override
public String getDisplayName() {
return Messages.FilePathGlobalSettingsProvider_DisplayName();
}
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension @Symbol("maven3Mojos")
public static final class DescriptorImpl extends ConsoleAnnotationDescriptor {
public String getDisplayName() {
return "Maven 3 Mojos";
}
}
代码示例来源:origin: jenkinsci/jenkins
@Extension(ordinal = 100)
public static class ProviderImpl extends QueueItemAuthenticatorProvider {
@Nonnull
@Override
public List<QueueItemAuthenticator> getAuthenticators() {
return get().getAuthenticators();
}
}
}
代码示例来源:origin: jenkinsci/jenkins
/**
* The default executors widget.
*
* A plugin may remove this from {@link Jenkins#getWidgets()} and swap in their own.
*
* @author Kohsuke Kawaguchi
* @since 1.514
*/
@Extension(ordinal=100) @Symbol("executors") // historically this was above normal widgets and below BuildQueueWidget
public class ExecutorsWidget extends Widget {
}
代码示例来源:origin: jenkinsci/jenkins
/**
* In case there are no other implementations we will fallback to this implementation.
*
* To make sure that we load this extension last (or at least very late) we use a negative ordinal.
* This allows custom implementation to be "first"
*/
@Extension(ordinal=-9999)
public class DefaultSimplePageDecorator extends SimplePageDecorator {
}
代码示例来源:origin: jenkinsci/jenkins
@Extension @Symbol("standard")
public static final class DescriptorImpl extends ProjectNamingStrategyDescriptor {
@Override
public String getDisplayName() {
return Messages.DefaultProjectNamingStrategy_DisplayName();
}
@Override
public String getHelpFile() {
return "/help/system-config/defaultJobNamingStrategy.html";
}
}
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Default pinger - use Java built-in functionality. This doesn't always work,
* a host may be reachable even if this returns false.
*/
@Extension
public static class BuiltInComputerPinger extends ComputerPinger {
@Override
public boolean isReachable(InetAddress ia, int timeout) throws IOException {
return ia.isReachable(timeout * 1000);
}
}
代码示例来源:origin: jenkinsci/jenkins
/**
* @author Kohsuke Kawaguchi
*/
@Extension(ordinal=2) @Symbol("envVars")
public class EnvVarsSlaveInfo extends SlaveSystemInfo {
@Override
public String getDisplayName() {
return Messages.EnvVarsSlaveInfo_DisplayName();
}
}
内容来源于网络,如有侵权,请联系作者删除!