类 ResourceHints
java.lang.Object
cn.taketoday.aot.hint.ResourceHints
Gather the need for resources available at runtime.
- 从以下版本开始:
- 4.0
- 作者:
- Stephane Nicoll, Sam Brannen
-
字段概要
字段修饰符和类型字段说明private final Set<ResourceBundleHint>private final List<ResourcePatternHints>private final Set<TypeReference> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明registerPattern(String include) Register that the resources matching the specified pattern should be made available at runtime.registerPattern(Consumer<ResourcePatternHints.Builder> resourceHint) Register that the resources matching the specified pattern should be made available at runtime.registerPatternIfPresent(ClassLoader classLoader, String location, Consumer<ResourcePatternHints.Builder> resourceHint) Register a pattern if the givenlocationis available on the classpath.voidregisterResource(Resource resource) Register that the supplied resource should be made available at runtime.registerResourceBundle(String baseName) Register that the resource bundle with the specified base name should be made available at runtime.registerResourceBundle(String baseName, Consumer<ResourceBundleHint.Builder> resourceHint) Register that the resource bundle with the specified base name should be made available at runtime.registerType(TypeReference type) Register that the bytecode of the type defined by the specifiedTypeReferenceshould be made available at runtime.registerType(Class<?> type) Register that the bytecode of the specified type should be made available at runtime.Return the resource bundles that should be made available at runtime.Return the resources that should be made available at runtime.private Stringprivate ResourcePatternHints
-
字段详细资料
-
types
-
resourcePatternHints
-
resourceBundleHints
-
-
构造器详细资料
-
ResourceHints
public ResourceHints()
-
-
方法详细资料
-
resourcePatternHints
Return the resources that should be made available at runtime.- 返回:
- a stream of
ResourcePatternHints
-
resourceBundleHints
Return the resource bundles that should be made available at runtime.- 返回:
- a stream of
ResourceBundleHint
-
registerPatternIfPresent
public ResourceHints registerPatternIfPresent(@Nullable ClassLoader classLoader, String location, Consumer<ResourcePatternHints.Builder> resourceHint) Register a pattern if the givenlocationis available on the classpath. This delegates toClassLoader.getResource(String)which validates directories as well. The location is not included in the hint.- 参数:
classLoader- the classloader to uselocation- a '/'-separated path name that should existresourceHint- a builder to customize the resource pattern- 返回:
this, to facilitate method chaining
-
registerPattern
Register that the resources matching the specified pattern should be made available at runtime.- 参数:
resourceHint- a builder to further customize the resource pattern- 返回:
this, to facilitate method chaining
-
registerPattern
Register that the resources matching the specified pattern should be made available at runtime.- 参数:
include- a pattern of the resources to include (seeResourcePatternHintdocumentation)- 返回:
this, to facilitate method chaining
-
registerResource
Register that the supplied resource should be made available at runtime.- 参数:
resource- the resource to register- 抛出:
IllegalArgumentException- if the supplied resource is not aClassPathResourceor does not exist- 另请参阅:
-
registerType
Register that the bytecode of the type defined by the specifiedTypeReferenceshould be made available at runtime.- 参数:
type- the type to include- 返回:
this, to facilitate method chaining
-
registerType
Register that the bytecode of the specified type should be made available at runtime.- 参数:
type- the type to include- 返回:
this, to facilitate method chaining
-
registerResourceBundle
public ResourceHints registerResourceBundle(String baseName, @Nullable Consumer<ResourceBundleHint.Builder> resourceHint) Register that the resource bundle with the specified base name should be made available at runtime.- 参数:
baseName- the base name of the resource bundleresourceHint- a builder to further customize the resource bundle- 返回:
this, to facilitate method chaining
-
registerResourceBundle
Register that the resource bundle with the specified base name should be made available at runtime.- 参数:
baseName- the base name of the resource bundle- 返回:
this, to facilitate method chaining
-
typesPatternResourceHint
-
toIncludePattern
-