dev.youshallnotpass.inspection.sources.ExcludeSourceMask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-inspections Show documentation
Show all versions of java-inspections Show documentation
Java inspections library for youshallnotpass
The newest version!
package dev.youshallnotpass.inspection.sources;
import java.nio.file.Path;
public final class ExcludeSourceMask implements SourceMask {
private final SourceMask exclude;
private final SourceMask origin;
public ExcludeSourceMask(
final SourceMask exclude,
final SourceMask origin
) {
this.exclude = exclude;
this.origin = origin;
}
@Override
public boolean matches(final Path path) {
return origin.matches(path) && !exclude.matches(path);
}
}