/** * @param paths * a {@link List} of {@link Path}s that match should be * matched for the {@link PathConfig}. * @return this builder instance. */ public Builder pathListMatcher(final List<Path> paths) { this.pathMatcher = DescribedPathMatcher.createPathListMatcher(paths); return this; }
/** * @param pattern * the pattern for the path, see * {@link FileSystem#getPathMatcher(String)} for supported * syntax. * @return this builder instance. */ public Builder patternPathMatcher(final String pattern) { this.pathMatcher = DescribedPathMatcher.createPatternMatcher(pattern); return this; }
@Override public String toString() { return "PathConfig [pathMatcher='" + this.pathMatcher.getDescription() + "', coveredItemNamePrefix=" + this.coveredItemNamePrefix + ", coveredItemArtifactType=" + this.coveredItemArtifactType + ", tagArtifactType=" + this.tagArtifactType + "]"; }
static DescribedPathMatcher createPatternMatcher(final String pattern) { final String fullPattern = addMissingPatternPrefix(pattern); final PathMatcher patternMatcher = FileSystems.getDefault().getPathMatcher(fullPattern); return new DescribedPathMatcher(fullPattern, patternMatcher); }
public boolean matches(final InputFile file) { final boolean matches = this.pathMatcher.matches(file); LOG.finest(() -> "File " + file + " matches " + this.pathMatcher + " = " + matches); return matches; }
static DescribedPathMatcher createPathListMatcher(final List<Path> paths) { final ListBasedPathMatcher listMatcher = new ListBasedPathMatcher(new HashSet<>(paths)); return new DescribedPathMatcher(paths.toString(), listMatcher); }
static DescribedPathMatcher createPatternMatcher(final String pattern) { final String fullPattern = addMissingPatternPrefix(pattern); final PathMatcher patternMatcher = FileSystems.getDefault().getPathMatcher(fullPattern); return new DescribedPathMatcher(fullPattern, patternMatcher); }
public boolean matches(final InputFile file) { final boolean matches = this.pathMatcher.matches(file); LOG.finest(() -> "File " + file + " matches " + this.pathMatcher + " = " + matches); return matches; }
static DescribedPathMatcher createPathListMatcher(final List<Path> paths) { final ListBasedPathMatcher listMatcher = new ListBasedPathMatcher(new HashSet<>(paths)); return new DescribedPathMatcher(paths.toString(), listMatcher); }
@Override public String toString() { return getDescription(); }
/** * @param paths * a {@link List} of {@link Path}s that match should be * matched for the {@link PathConfig}. * @return this builder instance. */ public Builder pathListMatcher(final List<Path> paths) { this.pathMatcher = DescribedPathMatcher.createPathListMatcher(paths); return this; }
/** * @param pattern * the pattern for the path, see * {@link FileSystem#getPathMatcher(String)} for supported * syntax. * @return this builder instance. */ public Builder patternPathMatcher(final String pattern) { this.pathMatcher = DescribedPathMatcher.createPatternMatcher(pattern); return this; }
@Override public String toString() { return getDescription(); }
@Override public String toString() { return "PathConfig [pathMatcher='" + this.pathMatcher.getDescription() + "', coveredItemNamePrefix=" + this.coveredItemNamePrefix + ", coveredItemArtifactType=" + this.coveredItemArtifactType + ", tagArtifactType=" + this.tagArtifactType + "]"; }
public String getDescription() { return this.pathMatcher.getDescription(); }
public String getDescription() { return this.pathMatcher.getDescription(); }