Package org.springdoc.ui
Record Class AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig
java.lang.Object
java.lang.Record
org.springdoc.ui.AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig
- Record Components:
cacheResources- whether to cache resources.patterns- the patterns to match.locations- the locations to use.
- Enclosing class:
AbstractSwaggerConfigurer
protected static record AbstractSwaggerConfigurer.SwaggerResourceHandlerConfig(boolean cacheResources, String[] patterns, String[] locations)
extends Record
The type Swagger resource handler config.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSwaggerResourceHandlerConfig(boolean cacheResources, String[] patterns, String[] locations) Creates an instance of aSwaggerResourceHandlerConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecacheResourcesrecord component.Create a Swagger resource handler config with resource caching enabled.Create a Swagger resource handler config with resource caching disabled.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.String[]Returns the value of thelocationsrecord component.String[]patterns()Returns the value of thepatternsrecord component.setLocations(String... locations) Sets the locations.setPatterns(String... patterns) Sets the patterns.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SwaggerResourceHandlerConfig
protected SwaggerResourceHandlerConfig(boolean cacheResources, String[] patterns, String[] locations) Creates an instance of aSwaggerResourceHandlerConfigrecord class.- Parameters:
cacheResources- the value for thecacheResourcesrecord componentpatterns- the value for thepatternsrecord componentlocations- the value for thelocationsrecord component
-
-
Method Details
-
setPatterns
Sets the patterns.- Parameters:
patterns- the patterns to match.- Returns:
- the updated config.
-
setLocations
Sets the locations.- Parameters:
locations- the locations to use.- Returns:
- the updated config.
-
createCached
Create a Swagger resource handler config with resource caching enabled. -
createUncached
Create a Swagger resource handler config with resource caching disabled. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
cacheResources
public boolean cacheResources()Returns the value of thecacheResourcesrecord component.- Returns:
- the value of the
cacheResourcesrecord component
-
patterns
Returns the value of thepatternsrecord component.- Returns:
- the value of the
patternsrecord component
-
locations
Returns the value of thelocationsrecord component.- Returns:
- the value of the
locationsrecord component
-