Harmonize visibility of RuntimeHints builders
Closes gh-28835
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user