Package org.springframework.aot.hint
Class ResourcePatternHint
java.lang.Object
org.springframework.aot.hint.ResourcePatternHint
- All Implemented Interfaces:
ConditionalHint
A hint that describes resources that should be made available at runtime.
Each pattern may be a simple path which has a one-to-one mapping to a
resource on the classpath, or alternatively may contain the special
*
character to indicate a wildcard match. For example:
file.properties
: matches just thefile.properties
file at the root of the classpath.com/example/file.properties
: matches just thefile.properties
file incom/example/
.*.properties
: matches all the files with a.properties
extension anywhere in the classpath.com/example/*.properties
: matches all the files with a.properties
extension incom/example/
and its child directories at any depth.com/example/*
: matches all the files incom/example/
and its child directories at any depth.
A resource pattern must not start with a slash (/
) unless it is the
root directory.
- Since:
- 6.0
- Author:
- Stephane Nicoll, Brian Clozel, Sebastien Deleuze, Sam Brannen
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the pattern to use for identifying the resources to match.Return the type that should be reachable for this hint to apply, ornull
if this hint should always been applied.int
hashCode()
toRegex()
Return the regexPattern
to use for identifying the resources to match.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.aot.hint.ConditionalHint
conditionMatches
-
Method Details
-
getPattern
Return the pattern to use for identifying the resources to match.- Returns:
- the pattern
-
toRegex
Return the regexPattern
to use for identifying the resources to match.- Returns:
- the regex pattern
-
getReachableType
Description copied from interface:ConditionalHint
Return the type that should be reachable for this hint to apply, ornull
if this hint should always been applied.- Specified by:
getReachableType
in interfaceConditionalHint
- Returns:
- the reachable type, if any
-
equals
-
hashCode
public int hashCode()
-