Record Class ResourceLoadStrategy
java.lang.Object
java.lang.Record
io.micronaut.core.io.ResourceLoadStrategy
- Record Components:
type- The strategy type. Defaults toResourceLoadStrategyType.FAIL_ON_DUPLICATE.warnOnDuplicates- Whether to warn when duplicates are found. Applies only toResourceLoadStrategyType.FIRST_MATCH.mergeOrder- Artifact name regex patterns used to order resources before merging. Applies only toResourceLoadStrategyType.MERGE_ALL.
@NullMarked
public record ResourceLoadStrategy(ResourceLoadStrategyType type, boolean warnOnDuplicates, List<String> mergeOrder)
extends Record
Resource loading strategy.
- Since:
- 5.0.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResourceLoadStrategy(ResourceLoadStrategyType type, boolean warnOnDuplicates, List<String> mergeOrder) Creates an instance of aResourceLoadStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceLoadStrategy.Builderbuilder()Creates a new builder.static ResourceLoadStrategyReturns the default resource load strategy.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themergeOrderrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.booleanReturns the value of thewarnOnDuplicatesrecord component.
-
Constructor Details
-
ResourceLoadStrategy
public ResourceLoadStrategy(ResourceLoadStrategyType type, boolean warnOnDuplicates, List<String> mergeOrder) Creates an instance of aResourceLoadStrategyrecord class.- Parameters:
type- the value for thetyperecord componentwarnOnDuplicates- the value for thewarnOnDuplicatesrecord componentmergeOrder- the value for themergeOrderrecord component
-
-
Method Details
-
defaultStrategy
Returns the default resource load strategy.- Returns:
- The default resource load strategy.
- Since:
- 5.0.0
-
builder
Creates a new builder.- Returns:
- A new builder.
- Since:
- 5.0.0
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
-
warnOnDuplicates
public boolean warnOnDuplicates()Returns the value of thewarnOnDuplicatesrecord component.- Returns:
- the value of the
warnOnDuplicatesrecord component
-
mergeOrder
Returns the value of themergeOrderrecord component.- Returns:
- the value of the
mergeOrderrecord component
-