Class NamedExceptionsBranchPropertyStrategy.Named

    • Constructor Detail

      • Named

        @DataBoundConstructor
        public Named​(@CheckForNull
                     String name,
                     @CheckForNull
                     BranchProperty[] props)
        Constructor
        Parameters:
        name - the names to match.
        props - the properties that the matching branches will get.
    • Method Detail

      • getProps

        @NonNull
        public List<BranchProperty> getProps()
        Returns the exception properties.
        Returns:
        the exception properties.
      • getName

        @NonNull
        public String getName()
        Returns the name(s) to match.
        Returns:
        the name(s) to match.
      • isMatch

        public boolean isMatch​(@NonNull
                               jenkins.scm.api.SCMHead head)
        Returns true if the head is a match.
        Parameters:
        head - the head.
        Returns:
        true if the head is a match.
      • isMatch

        public static boolean isMatch​(String branchName,
                                      String names)
        Returns true if and only if the branch name matches one of the name(s).
        Parameters:
        branchName - the branch name.
        names - the name(s) that are valid to match against.
        Returns:
        true if and only if the branch name matches one of the name(s).