Package org.springframework.aot.hint.support

# Class FilePatternResourceHintsRegistrar

java.lang.Object
org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar

public class FilePatternResourceHintsRegistrar extends Object
Register the necessary resource hints for loading files from the classpath, based on file name prefixes and file extensions with convenience to support multiple classpath locations.

Only registers hints for matching classpath locations, which allows for several locations to be provided without contributing unnecessary hints.

Since:
  6.0
Author:
  Stephane Nicoll, Sam Brannen

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`FilePatternResourceHintsRegistrar.Builder`
Builder for `FilePatternResourceHintsRegistrar`.

## Constructor Summary

Constructors
Constructor
Description
`FilePatternResourceHintsRegistrar(List<String> filePrefixes, List<String> classpathLocations, List<String> fileExtensions)`
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.0.12 in favor of the builder

## Method Summary

Modifier and Type
Method
Description
`static FilePatternResourceHintsRegistrar.Builder`
`forClassPathLocations(String... classpathLocations)`
Configure the registrar with the specified classpath locations.
`static FilePatternResourceHintsRegistrar.Builder`
`forClassPathLocations(List<String> classpathLocations)`
Configure the registrar with the specified classpath locations.
`void`
`registerHints(ResourceHints hints, ClassLoader classLoader)`
Deprecated, for removal: This API element is subject to removal in a future version.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FilePatternResourceHintsRegistrar

@Deprecated(since="6.0.12", forRemoval=true) public FilePatternResourceHintsRegistrar(List<String> filePrefixes, List<String> classpathLocations, List<String> fileExtensions)
Deprecated, for removal: This API element is subject to removal in a future version.
as of 6.0.12 in favor of the builder
Create a new instance for the specified file prefixes, classpath locations, and file extensions.

Parameters:
  `filePrefixes` - the file prefixes
  `classpathLocations` - the classpath locations
  `fileExtensions` - the file extensions (starting with a dot)

## Method Details

### registerHints

@Deprecated(since="6.0.12", forRemoval=true) public void registerHints(ResourceHints hints, @Nullable ClassLoader classLoader)
Deprecated, for removal: This API element is subject to removal in a future version.

### forClassPathLocations

public static FilePatternResourceHintsRegistrar.Builder forClassPathLocations(String... classpathLocations)
Configure the registrar with the specified classpath locations.

Parameters:
  `classpathLocations` - the classpath locations
Returns:
  a `FilePatternResourceHintsRegistrar.Builder` to further configure the registrar
Since:
  6.0.12
See Also:
  - `forClassPathLocations(List)`

### forClassPathLocations

public static FilePatternResourceHintsRegistrar.Builder forClassPathLocations(List<String> classpathLocations)
Configure the registrar with the specified classpath locations.

Parameters:
  `classpathLocations` - the classpath locations
Returns:
  a `FilePatternResourceHintsRegistrar.Builder` to further configure the registrar
Since:
  6.0.12
See Also:
  - `forClassPathLocations(String...)`