Package jenkins.scm.api.trait
Class SCMSourceTraitDescriptor
java.lang.Object
hudson.model.Descriptor<T>
jenkins.scm.api.trait.SCMTraitDescriptor<SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTraitDescriptor
- Direct Known Subclasses:
RegexSCMHeadFilterTrait.DescriptorImpl,WildcardSCMHeadFilterTrait.DescriptorImpl
Abstract base class for
Descriptor of SCMSourceTrait implementations.- Since:
- 2.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInfers the type of the correspondingSCMSourceTraitfrom the outer class.protectedSCMSourceTraitDescriptor(Class<? extends SCMSourceTrait> clazz) Constructor to use when type inference usingSCMSourceTraitDescriptor()does not work. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends SCMBuilder>Returns the type ofSCMBuilderthat thisSCMSourceTraitis applicable to.Class<? extends SCMSourceContext>Returns the type ofSCMSourceContextthat thisSCMSourceTraitis applicable to.Returns the type ofSCMSourcethat thisSCMSourceTraitis applicable to.booleanisApplicableTo(Class<? extends SCMSource> sourceClass) Checks if theSCMSourceTraitis relevant to the specified type ofSCMSource.booleanisApplicableTo(SCMSource source) Checks if theSCMSourceTraitis relevant to the specifiedSCMSource.booleanisApplicableTo(SCMSourceDescriptor descriptor) Checks if theSCMSourceTraitis relevant to the specifiedSCMSourceDescriptor.booleanisApplicableToBuilder(Class<? extends SCMBuilder> builderClass) Checks if theSCMSourceTraitis relevant to the specified type ofSCMBuilder.booleanisApplicableToBuilder(SCMBuilder<?, ?> builder) Checks if theSCMSourceTraitis relevant to the specifiedSCMBuilder.booleanisApplicableToContext(Class<? extends SCMSourceContext> contextClass) Checks if theSCMSourceTraitis relevant to the specified type ofSCMSourceContext.booleanisApplicableToContext(SCMSourceContext context) Checks if theSCMSourceTraitis relevant to the specifiedSCMSourceContext.Methods inherited from class jenkins.scm.api.trait.SCMTraitDescriptor
getScmClass, isApplicableToSCM, isApplicableToSCMMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
SCMSourceTraitDescriptor
Constructor to use when type inference usingSCMSourceTraitDescriptor()does not work.- Parameters:
clazz- Pass in the type ofSCMTrait
-
SCMSourceTraitDescriptor
protected SCMSourceTraitDescriptor()Infers the type of the correspondingSCMSourceTraitfrom the outer class. This version works when you follow the common convention, where a descriptor is written as the static nested class of the describable class.
-
-
Method Details
-
getBuilderClass
Returns the type ofSCMBuilderthat thisSCMSourceTraitis applicable to.- Returns:
- the type of
SCMBuilderthat thisSCMSourceTraitis applicable to.
-
isApplicableToBuilder
Checks if theSCMSourceTraitis relevant to the specified type ofSCMBuilder.- Parameters:
builderClass- the type ofSCMBuilder.- Returns:
trueif applicable to the specified type ofSCMBuilder.
-
isApplicableToBuilder
Checks if theSCMSourceTraitis relevant to the specifiedSCMBuilder.- Parameters:
builder- theSCMBuilder.- Returns:
trueif applicable to the specified type ofSCMBuilder.
-
getContextClass
Returns the type ofSCMSourceContextthat thisSCMSourceTraitis applicable to.- Returns:
- the type of
SCMSourceContextthat thisSCMSourceTraitis applicable to.
-
isApplicableToContext
Checks if theSCMSourceTraitis relevant to the specified type ofSCMSourceContext.- Parameters:
contextClass- the type ofSCMSourceContext.- Returns:
trueif applicable to the specified type ofSCMSourceContext.
-
isApplicableToContext
Checks if theSCMSourceTraitis relevant to the specifiedSCMSourceContext.- Parameters:
context- theSCMSourceContext.- Returns:
trueif applicable to the specified type ofSCMSourceContext.
-
getSourceClass
Returns the type ofSCMSourcethat thisSCMSourceTraitis applicable to.- Returns:
- the type of
SCMSourcethat thisSCMSourceTraitis applicable to.
-
isApplicableTo
Checks if theSCMSourceTraitis relevant to the specified type ofSCMSource. -
isApplicableTo
Checks if theSCMSourceTraitis relevant to the specifiedSCMSourceDescriptor.- Parameters:
descriptor- theSCMSourceDescriptor.- Returns:
trueif applicable to the specifiedSCMSourceDescriptor.
-
isApplicableTo
Checks if theSCMSourceTraitis relevant to the specifiedSCMSource.
-