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.propertiesfile at the root of the classpath.com/example/file.properties: matches just thefile.propertiesfile incom/example/.*.properties: matches all the files with a.propertiesextension anywhere in the classpath.com/example/*.properties: matches all the files with a.propertiesextension 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 TypeMethodDescriptionbooleanReturn the pattern to use for identifying the resources to match.Return the type that should be reachable for this hint to apply, ornullif this hint should always been applied.inthashCode()toRegex()Return the regexPatternto use for identifying the resources to match.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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 regexPatternto use for identifying the resources to match.- Returns:
- the regex pattern
-
getReachableType
Description copied from interface:ConditionalHintReturn the type that should be reachable for this hint to apply, ornullif this hint should always been applied.- Specified by:
getReachableTypein interfaceConditionalHint- Returns:
- the reachable type, if any
-
equals
-
hashCode
public int hashCode()
-