Package jetbrains.buildServer.vcs.spec
Class BranchSpecParser
- java.lang.Object
-
- jetbrains.buildServer.vcs.spec.BranchSpecParser
-
public class BranchSpecParser extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BranchSpecParser.AttributesBasedBranchFilterPattern
Branch pattern used only for branch filters.static class
BranchSpecParser.BranchPattern
static interface
BranchSpecParser.MatchResult
static class
BranchSpecParser.PatternLexer
-
Constructor Summary
Constructors Constructor Description BranchSpecParser(String spec, boolean extendedSyntax, BranchAttributesFilterManager attributesFilterManager)
BranchSpecParser(String spec, BranchSpecParserSettings settings, BranchAttributesFilterManager attributesFilterManager)
-
Method Summary
-
-
-
Constructor Detail
-
BranchSpecParser
public BranchSpecParser(@NotNull String spec, boolean extendedSyntax, @Nullable BranchAttributesFilterManager attributesFilterManager) throws InvalidBranchSpecException
- Parameters:
extendedSyntax
- if true spec allows usage of brackets, if false, only simple spec is allowed- Throws:
InvalidBranchSpecException
-
BranchSpecParser
public BranchSpecParser(@NotNull String spec, @NotNull BranchSpecParserSettings settings, @Nullable BranchAttributesFilterManager attributesFilterManager) throws InvalidBranchSpecException
- Throws:
InvalidBranchSpecException
-
-
Method Detail
-
validate
public static void validate(@Nullable String spec, boolean extendedSyntax)
-
validate
public static void validate(@Nullable String spec, boolean extendedSyntax, @Nullable BranchAttributesFilterManager branchAttributesFilterManager) throws InvalidBranchSpecException
- Throws:
InvalidBranchSpecException
-
getDefaultEscapeSymbol
public static int getDefaultEscapeSymbol(boolean extendedSyntax)
-
isEmpty
public boolean isEmpty()
-
asString
@NotNull public String asString()
-
getMatchedPattern
@Nullable public BranchSpecParser.MatchResult getMatchedPattern(@NotNull String vcsBranchName, @NotNull Map<String,BranchAttributesContext> context)
-
matches
public boolean matches(@NotNull String branchName, @NotNull Map<String,BranchAttributesContext> context)
-
parseBranchPattern
public static BranchSpecParser.BranchPattern parseBranchPattern(@NotNull String fullBranchSpec, int lineNum, @NotNull String line, @NotNull BranchSpecParser.PatternLexer lexer, boolean include, @NotNull BranchSpecParserSettings settings)
-
parseAttributesFilter
public static BranchSpecParser.BranchPattern parseAttributesFilter(@NotNull String fullBranchSpec, int lineNum, @NotNull String line, @NotNull BranchSpecParser.PatternLexer lexer, boolean include, @NotNull BranchAttributesFilterManager branchAttributesFilterManager)
-
-