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
ModifierConstructorDescriptionprotected
Infers the type of the correspondingSCMSourceTrait
from the outer class.protected
SCMSourceTraitDescriptor
(Class<? extends SCMSourceTrait> clazz) Constructor to use when type inference usingSCMSourceTraitDescriptor()
does not work. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends SCMBuilder>
Returns the type ofSCMBuilder
that thisSCMSourceTrait
is applicable to.Class<? extends SCMSourceContext>
Returns the type ofSCMSourceContext
that thisSCMSourceTrait
is applicable to.Returns the type ofSCMSource
that thisSCMSourceTrait
is applicable to.boolean
isApplicableTo
(Class<? extends SCMSource> sourceClass) Checks if theSCMSourceTrait
is relevant to the specified type ofSCMSource
.boolean
isApplicableTo
(SCMSource source) Checks if theSCMSourceTrait
is relevant to the specifiedSCMSource
.boolean
isApplicableTo
(SCMSourceDescriptor descriptor) Checks if theSCMSourceTrait
is relevant to the specifiedSCMSourceDescriptor
.boolean
isApplicableToBuilder
(Class<? extends SCMBuilder> builderClass) Checks if theSCMSourceTrait
is relevant to the specified type ofSCMBuilder
.boolean
isApplicableToBuilder
(SCMBuilder<?, ?> builder) Checks if theSCMSourceTrait
is relevant to the specifiedSCMBuilder
.boolean
isApplicableToContext
(Class<? extends SCMSourceContext> contextClass) Checks if theSCMSourceTrait
is relevant to the specified type ofSCMSourceContext
.boolean
isApplicableToContext
(SCMSourceContext context) Checks if theSCMSourceTrait
is relevant to the specifiedSCMSourceContext
.Methods inherited from class jenkins.scm.api.trait.SCMTraitDescriptor
getScmClass, isApplicableToSCM, isApplicableToSCM
Methods 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 correspondingSCMSourceTrait
from 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 ofSCMBuilder
that thisSCMSourceTrait
is applicable to.- Returns:
- the type of
SCMBuilder
that thisSCMSourceTrait
is applicable to.
-
isApplicableToBuilder
Checks if theSCMSourceTrait
is relevant to the specified type ofSCMBuilder
.- Parameters:
builderClass
- the type ofSCMBuilder
.- Returns:
true
if applicable to the specified type ofSCMBuilder
.
-
isApplicableToBuilder
Checks if theSCMSourceTrait
is relevant to the specifiedSCMBuilder
.- Parameters:
builder
- theSCMBuilder
.- Returns:
true
if applicable to the specified type ofSCMBuilder
.
-
getContextClass
Returns the type ofSCMSourceContext
that thisSCMSourceTrait
is applicable to.- Returns:
- the type of
SCMSourceContext
that thisSCMSourceTrait
is applicable to.
-
isApplicableToContext
Checks if theSCMSourceTrait
is relevant to the specified type ofSCMSourceContext
.- Parameters:
contextClass
- the type ofSCMSourceContext
.- Returns:
true
if applicable to the specified type ofSCMSourceContext
.
-
isApplicableToContext
Checks if theSCMSourceTrait
is relevant to the specifiedSCMSourceContext
.- Parameters:
context
- theSCMSourceContext
.- Returns:
true
if applicable to the specified type ofSCMSourceContext
.
-
getSourceClass
Returns the type ofSCMSource
that thisSCMSourceTrait
is applicable to.- Returns:
- the type of
SCMSource
that thisSCMSourceTrait
is applicable to.
-
isApplicableTo
Checks if theSCMSourceTrait
is relevant to the specified type ofSCMSource
. -
isApplicableTo
Checks if theSCMSourceTrait
is relevant to the specifiedSCMSourceDescriptor
.- Parameters:
descriptor
- theSCMSourceDescriptor
.- Returns:
true
if applicable to the specifiedSCMSourceDescriptor
.
-
isApplicableTo
Checks if theSCMSourceTrait
is relevant to the specifiedSCMSource
.
-