本文整理汇总了Java中jenkins.scm.api.trait.SCMTrait类的典型用法代码示例。如果您正苦于以下问题:Java SCMTrait类的具体用法?Java SCMTrait怎么用?Java SCMTrait使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SCMTrait类属于jenkins.scm.api.trait包,在下文中一共展示了SCMTrait类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTraitsDefaults
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
public List<SCMTrait<? extends SCMTrait<?>>> getTraitsDefaults() {
GiteaSCMSource.DescriptorImpl descriptor =
ExtensionList.lookup(Descriptor.class).get(GiteaSCMSource.DescriptorImpl.class);
if (descriptor == null) {
throw new AssertionError();
}
List<SCMTrait<? extends SCMTrait<?>>> result = new ArrayList<>();
result.addAll(descriptor.getTraitsDefaults());
return result;
}
示例2: getTraitsDefaults
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
/**
* Populate the default traits for new instances.
*
* @return the default traits.
*/
public List<SCMTrait<? extends SCMTrait<?>>> getTraitsDefaults() {
GitSCMSource.DescriptorImpl descriptor =
ExtensionList.lookup(Descriptor.class).get(GitSCMSource.DescriptorImpl.class);
if (descriptor == null) {
throw new AssertionError();
}
List<SCMTrait<? extends SCMTrait<?>>> result = new ArrayList<>();
result.addAll(descriptor.getTraitsDefaults());
return result;
}
示例3: getTraits
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
@NonNull
public List<SCMTrait<?>> getTraits() {
return Collections.unmodifiableList(traits);
}
示例4: setTraits
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
@DataBoundSetter
public void setTraits(List<SCMTrait<?>> traits) {
this.traits = new ArrayList<>(Util.fixNull(traits));
}
示例5: setTraits
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
@DataBoundSetter
public void setTraits(List<SCMSourceTrait> traits) {
this.traits = SCMTrait.asSetList(traits);
}
示例6: isIgnoreOnPushNotifications
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
@Restricted(DoNotUse.class)
public boolean isIgnoreOnPushNotifications() {
return SCMTrait.find(traits, IgnoreOnPushNotificationTrait.class) != null;
}
示例7: getTraits
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
/**
* Gets the traits.
*
* @return the traits.
*/
@NonNull
public List<SCMTrait<?>> getTraits() {
return Collections.unmodifiableList(traits);
}
示例8: setTraits
import jenkins.scm.api.trait.SCMTrait; //导入依赖的package包/类
/**
* Sets the traits.
*
* @param traits the traits.
*/
@DataBoundSetter
public void setTraits(@CheckForNull List<? extends SCMTrait<?>> traits) {
this.traits = new ArrayList<>(Util.fixNull(traits));
}