Top Description Fields Constructors Methods
jdk.tools.jlink.internal.plugins

public Class ResourceFilter

extends Object
implements Predicate<String>
Class Inheritance
All Implemented Interfaces
java.util.function.Predicate
Imports
java.io.File, .IOException, .UncheckedIOException, java.nio.file.Files, .Path, .PathMatcher, java.util.ArrayList, .Collections, .List, .Objects, java.util.function.Predicate, jdk.tools.jlink.internal.Utils

Filter resource resources using path matcher.

Field Summary

Modifier and TypeField and Description
private static final List<String>
private final boolean
private final List<PathMatcher>
private final boolean

Constructor Summary

AccessConstructor and Description
private
ResourceFilter(List<String> patterns, boolean exclude)

Method Summary

Modifier and TypeMethod and Description
public static ResourceFilter
public static ResourceFilter
public static ResourceFilter
public static ResourceFilter
public boolean
test(String
the input argument
name
)

Implements java.util.function.Predicate.test.

Evaluates this predicate on the given argument.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_LISTback to summary
private static final List<String> EMPTY_LIST
includeback to summary
private final boolean include
matchersback to summary
private final List<PathMatcher> matchers
otherwiseback to summary
private final boolean otherwise

Constructor Detail

ResourceFilterback to summary
private ResourceFilter(List<String> patterns, boolean exclude)

Method Detail

excludeFilterback to summary
public static ResourceFilter excludeFilter(List<String> patterns)
excludeFilterback to summary
public static ResourceFilter excludeFilter(String patterns)
includeFilterback to summary
public static ResourceFilter includeFilter(List<String> patterns)
includeFilterback to summary
public static ResourceFilter includeFilter(String patterns)
testback to summary
public boolean test(String name)

Implements java.util.function.Predicate.test.

Doc from java.util.function.Predicate.test.

Evaluates this predicate on the given argument.

Parameters
name:String

the input argument

Returns:boolean

true if the input argument matches the predicate, otherwise false

Annotations
@Override