本文整理汇总了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;
}
示例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;
}
示例3: decorateBuilder
import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
@Override
protected void decorateBuilder(SCMBuilder<?, ?> builder) {
((GitSCMBuilder<?>) builder).withCredentials(credentialsId);
}
示例4: getBuilderClass
import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
@Override
public Class<? extends SCMBuilder> getBuilderClass() {
return GitSCMBuilder.class;
}
示例5: getBuilderClass
import jenkins.plugins.git.GitSCMBuilder; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Class<? extends SCMBuilder> getBuilderClass() {
return GitSCMBuilder.class;
}