当前位置: 首页>>代码示例>>Java>>正文


Java GitSCMBuilder类代码示例

本文整理汇总了Java中jenkins.plugins.git.GitSCMBuilder的典型用法代码示例。如果您正苦于以下问题:Java GitSCMBuilder类的具体用法?Java GitSCMBuilder怎么用?Java GitSCMBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GitSCMBuilder类属于jenkins.plugins.git包,在下文中一共展示了GitSCMBuilder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTraitsDescriptorLists

import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
/**
 * Populates the available trait descriptors.
 *
 * @return the available trait descriptors.
 */
@SuppressWarnings("unused") // jelly
public List<NamedArrayList<? extends SCMTraitDescriptor<?>>> getTraitsDescriptorLists() {
    GitSCMSource.DescriptorImpl sourceDescriptor =
            ExtensionList.lookup(Descriptor.class).get(GitSCMSource.DescriptorImpl.class);
    List<SCMTraitDescriptor<?>> all = new ArrayList<>();
    all.addAll(SCMNavigatorTrait._for(this, ASFGitSCMNavigatorContext.class, ASFGitSCMSourceBuilder.class));
    all.addAll(SCMSourceTrait._for(sourceDescriptor, GitSCMSourceContext.class, null));
    all.addAll(SCMSourceTrait._for(sourceDescriptor, null, GitSCMBuilder.class));
    Set<SCMTraitDescriptor<?>> dedup = new HashSet<>();
    for (Iterator<SCMTraitDescriptor<?>> iterator = all.iterator(); iterator.hasNext(); ) {
        SCMTraitDescriptor<?> d = iterator.next();
        if (dedup.contains(d)
                || d instanceof GitBrowserSCMSourceTrait.DescriptorImpl) {
            // remove any we have seen already and ban the browser configuration as it will always be github
            iterator.remove();
        } else {
            dedup.add(d);
        }
    }
    List<NamedArrayList<? extends SCMTraitDescriptor<?>>> result = new ArrayList<>();
    NamedArrayList.select(all, Messages.ASFGitSCMNavigator_ASFGitSCMNaviagort_repositories(),
            new NamedArrayList.Predicate<SCMTraitDescriptor<?>>() {
                @Override
                public boolean test(SCMTraitDescriptor<?> scmTraitDescriptor) {
                    return scmTraitDescriptor instanceof SCMNavigatorTraitDescriptor;
                }
            },
            true, result);
    NamedArrayList.select(all, Messages.ASFGitSCMNavigator_withinRepositories(),
            NamedArrayList.anyOf(NamedArrayList.withAnnotation(Discovery.class),
                    NamedArrayList.withAnnotation(Selection.class)),
            true, result);
    NamedArrayList.select(all, Messages.ASFGitSCMNavigator_additionalBehaviours(), null, true, result);
    return result;
}
 
开发者ID:stephenc,项目名称:asf-gitpubsub-jenkins-plugin,代码行数:41,代码来源:ASFGitSCMNavigator.java

示例2: getTraitsDescriptorLists

import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
public List<NamedArrayList<? extends SCMSourceTraitDescriptor>> getTraitsDescriptorLists() {
  List<NamedArrayList<? extends SCMSourceTraitDescriptor>> result = new ArrayList<>();
  List<SCMSourceTraitDescriptor> descriptors =
      SCMSourceTrait._for(this, GitSCMSourceContext.class, GitSCMBuilder.class);
  NamedArrayList.select(
      descriptors,
      "Within Repository",
      NamedArrayList.anyOf(
          NamedArrayList.withAnnotation(Selection.class),
          NamedArrayList.withAnnotation(Discovery.class)),
      true,
      result);
  NamedArrayList.select(descriptors, "Additional", null, true, result);
  return result;
}
 
开发者ID:GerritForge,项目名称:gerrit-plugin,代码行数:16,代码来源:GerritSCMSource.java

示例3: decorateBuilder

import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
@Override
protected void decorateBuilder(SCMBuilder<?, ?> builder) {
    ((GitSCMBuilder<?>) builder).withCredentials(credentialsId);
}
 
开发者ID:jenkinsci,项目名称:gitea-plugin,代码行数:5,代码来源:SSHCheckoutTrait.java

示例4: getBuilderClass

import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
@Override
public Class<? extends SCMBuilder> getBuilderClass() {
    return GitSCMBuilder.class;
}
 
开发者ID:jenkinsci,项目名称:gitea-plugin,代码行数:5,代码来源:SSHCheckoutTrait.java

示例5: getBuilderClass

import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Class<? extends SCMBuilder> getBuilderClass() {
  return GitSCMBuilder.class;
}
 
开发者ID:GerritForge,项目名称:gerrit-plugin,代码行数:6,代码来源:ChangeDiscoveryTrait.java


注:本文中的jenkins.plugins.git.GitSCMBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。