Top Description Fields Constructors Methods
org.springframework.aot.nativex

pack-priv Class ResourceHintsWriter

extends Object
Class Inheritance
Imports
java.util.Collection, .Comparator, .LinkedHashMap, .List, .Map, java.util.stream.Stream, org.springframework.aot.hint.ConditionalHint, .ResourceBundleHint, .ResourceHints, .ResourcePatternHint, .ResourcePatternHints, org.springframework.lang.Nullable

Write a ResourceHints to the JSON output expected by the GraalVM native-image compiler, typically named resource-config.json.
Authors
Sebastien Deleuze, Stephane Nicoll, Brian Clozel
Since
6.0
See Also
Accessing Resources in Native Images, Native Image Build Configuration

Field Summary

Modifier and TypeField and Description
public static final ResourceHintsWriter
private static final Comparator<ResourceBundleHint>
private static final Comparator<ResourcePatternHint>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
addIfNotEmpty(Map<String, Object> attributes, String name, Object value)

private void
private void
private Map<String, Object>
private Map<String, Object>
private Map<String, Object>
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final ResourceHintsWriter INSTANCE
RESOURCE_BUNDLE_HINT_COMPARATORback to summary
private static final Comparator<ResourceBundleHint> RESOURCE_BUNDLE_HINT_COMPARATOR
RESOURCE_PATTERN_HINT_COMPARATORback to summary
private static final Comparator<ResourcePatternHint> RESOURCE_PATTERN_HINT_COMPARATOR

Constructor Detail

ResourceHintsWriterback to summary
pack-priv ResourceHintsWriter()

Method Detail

addIfNotEmptyback to summary
private void addIfNotEmpty(Map<String, Object> attributes, String name, Object value)
handleConditionback to summary
private void handleCondition(Map<String, Object> attributes, ConditionalHint hint)
handleResourceBundlesback to summary
private void handleResourceBundles(Map<String, Object> attributes, Stream<ResourceBundleHint> resourceBundles)
toAttributesback to summary
private Map<String, Object> toAttributes(ResourceHints hint)
toAttributesback to summary
private Map<String, Object> toAttributes(ResourceBundleHint hint)
toAttributesback to summary
private Map<String, Object> toAttributes(ResourcePatternHint hint)
writeback to summary
public void write(BasicJsonWriter writer, ResourceHints hints)