Harmonize visibility of RuntimeHints builders

Closes gh-28835
This commit is contained in:
Stephane Nicoll 2022-07-18 14:09:25 +02:00
parent 87b83e8291
commit 444e06fa22
3 changed files with 9 additions and 2 deletions

View File

@ -33,7 +33,7 @@ public final class ResourceBundleHint implements ConditionalHint {
private final String baseName;
@Nullable
private TypeReference reachableType;
private final TypeReference reachableType;
ResourceBundleHint(Builder builder) {
@ -83,6 +83,10 @@ public final class ResourceBundleHint implements ConditionalHint {
@Nullable
private TypeReference reachableType;
Builder(String baseName) {
this.baseName = baseName;
}
/**
* Make this hint conditional on the fact that the specified type
* can be resolved.

View File

@ -137,7 +137,7 @@ public class ResourceHints {
* @return {@code this}, to facilitate method chaining
*/
public ResourceHints registerResourceBundle(String baseName, @Nullable Consumer<ResourceBundleHint.Builder> resourceHint) {
ResourceBundleHint.Builder builder = new ResourceBundleHint.Builder().baseName(baseName);
ResourceBundleHint.Builder builder = new ResourceBundleHint.Builder(baseName);
if (resourceHint != null) {
resourceHint.accept(builder);
}

View File

@ -71,6 +71,9 @@ public final class ResourcePatternHints {
private final Set<ResourcePatternHint> excludes = new LinkedHashSet<>();
Builder() {
}
/**
* Includes the resources matching the specified pattern.
* @param reachableType the type that should be reachable for this hint to apply