Record Class PropertySourceDescriptor
java.lang.Object
java.lang.Record
org.springframework.core.io.support.PropertySourceDescriptor
- Record Components:
locations- the locations to considerignoreResourceNotFound- whether a failure to find a property resource should be ignoredname- the name of the property source, ornullto infer onepropertySourceFactory- the type ofPropertySourceFactoryto use, ornullto use the defaultencoding- the encoding, ornullto use the default encoding
public record PropertySourceDescriptor(List<String> locations, boolean ignoreResourceNotFound, @Nullable String name, @Nullable Class<? extends PropertySourceFactory> propertySourceFactory, @Nullable String encoding)
extends Record
Descriptor for a
PropertySource.- Since:
- 6.0
- Author:
- Stephane Nicoll
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPropertySourceDescriptor(String... locations) Create a descriptor with the specified locations.PropertySourceDescriptor(List<String> locations, boolean ignoreResourceNotFound, @Nullable String name, @Nullable Class<? extends PropertySourceFactory> propertySourceFactory, @Nullable String encoding) Creates an instance of aPropertySourceDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionencoding()Returns the value of theencodingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreResourceNotFoundrecord component.Returns the value of thelocationsrecord component.name()Returns the value of thenamerecord component.@Nullable Class<? extends PropertySourceFactory> Returns the value of thepropertySourceFactoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PropertySourceDescriptor
Create a descriptor with the specified locations.- Parameters:
locations- the locations to consider
-
PropertySourceDescriptor
public PropertySourceDescriptor(List<String> locations, boolean ignoreResourceNotFound, @Nullable String name, @Nullable Class<? extends PropertySourceFactory> propertySourceFactory, @Nullable String encoding) Creates an instance of aPropertySourceDescriptorrecord class.- Parameters:
locations- the value for thelocationsrecord componentignoreResourceNotFound- the value for theignoreResourceNotFoundrecord componentname- the value for thenamerecord componentpropertySourceFactory- the value for thepropertySourceFactoryrecord componentencoding- the value for theencodingrecord component
-
-
Method Details
-
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. -
locations
-
ignoreResourceNotFound
public boolean ignoreResourceNotFound()Returns the value of theignoreResourceNotFoundrecord component.- Returns:
- the value of the
ignoreResourceNotFoundrecord component
-
name
-
propertySourceFactory
Returns the value of thepropertySourceFactoryrecord component.- Returns:
- the value of the
propertySourceFactoryrecord component
-
encoding
-