Class SCMTraitDescriptor<T extends SCMTrait<T>>

java.lang.Object
hudson.model.Descriptor<T>
jenkins.scm.api.trait.SCMTraitDescriptor<T>
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Direct Known Subclasses:
SCMNavigatorTraitDescriptor, SCMSourceTraitDescriptor

public abstract class SCMTraitDescriptor<T extends SCMTrait<T>> extends Descriptor<T>
Abstract base class for Descriptor of SCMTrait implementations.
Since:
2.2.0
  • Method Details

    • getScmClass

      public Class<? extends SCM> getScmClass()
      Returns the type of SCM that this SCMTrait is applicable to.
      Returns:
      the type of SCM that this SCMTrait is applicable to.
    • isApplicableToSCM

      public boolean isApplicableToSCM(@NonNull Class<? extends SCM> scmClass)
      Checks if the SCMTrait is relevant to the specified type of SCM.
      Parameters:
      scmClass - the type of SCM.
      Returns:
      true if applicable to the specified type of SCM.
    • isApplicableToSCM

      public boolean isApplicableToSCM(@NonNull SCMDescriptor<?> scm)
      Checks if the SCMTrait is relevant to the specified SCM.
      Parameters:
      scm - the SCMDescriptor for the type of SCM.
      Returns:
      true if applicable to the specified type of SCM.