// Path: src/main/java/org/unbrokendome/gradle/plugins/gitversion/core/PatternMatchRuleContext.java
// public interface PatternMatchRuleContext extends RuleContext {
// 
//     @Nonnull
//     MatcherFacade getMatches();
// }
// 
// Path: src/main/java/org/unbrokendome/gradle/plugins/gitversion/model/GitBranch.java
// public interface GitBranch {
// 
//     @Nonnull
//     String getShortName();
// 
//     @Nonnull
//     String getFullName();
// 
//     @Nonnull
//     GitCommit getHead();
// }


import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Nonnull;
import org.gradle.api.Action;
import org.unbrokendome.gradle.plugins.gitversion.core.PatternMatchRuleContext;
import org.unbrokendome.gradle.plugins.gitversion.model.GitBranch;
package org.unbrokendome.gradle.plugins.gitversion.internal;





public final class PatternMatchingBranchRule extends AbstractRule<PatternMatchRuleContext> {

    private final Pattern pattern;


    PatternMatchingBranchRule(Pattern pattern, Action<PatternMatchRuleContext> action) {
        super(action);
        this.pattern = pattern;
    }


    @Nonnull
    @Override
    protected MatchResult match(RuleEvaluationContext evaluationContext) {
// Path: src/main/java/org/unbrokendome/gradle/plugins/gitversion/core/PatternMatchRuleContext.java
// public interface PatternMatchRuleContext extends RuleContext {
// 
//     @Nonnull
//     MatcherFacade getMatches();
// }
// 
// Path: src/main/java/org/unbrokendome/gradle/plugins/gitversion/model/GitBranch.java
// public interface GitBranch {
// 
//     @Nonnull
//     String getShortName();
// 
//     @Nonnull
//     String getFullName();
// 
//     @Nonnull
//     GitCommit getHead();
// }


// Path: src/main/java/org/unbrokendome/gradle/plugins/gitversion/internal/PatternMatchingBranchRule.java
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Nonnull;
import org.gradle.api.Action;
import org.unbrokendome.gradle.plugins.gitversion.core.PatternMatchRuleContext;
import org.unbrokendome.gradle.plugins.gitversion.model.GitBranch;

package org.unbrokendome.gradle.plugins.gitversion.internal;





public final class PatternMatchingBranchRule extends AbstractRule<PatternMatchRuleContext> {

    private final Pattern pattern;


    PatternMatchingBranchRule(Pattern pattern, Action<PatternMatchRuleContext> action) {
        super(action);
        this.pattern = pattern;
    }


    @Nonnull
    @Override
    protected MatchResult match(RuleEvaluationContext evaluationContext) {
        GitBranch currentBranch = evaluationContext.getRepository().getCurrentBranch();