java.lang.Object
java.lang.Record
io.john.amiscaray.quak.web.cfg.WebConfig
- Record Components:
exceptionHttpStatusMapping- Configures which HTTP status codes to use when handling different exceptions.
public record WebConfig(Map<Class<? extends Exception>,Integer> exceptionHttpStatusMapping)
extends Record
Web related configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DependencyID<WebConfig> The dependency ID for the framework to retrieve the web config.static final StringThe dependency name the framework expects for the web config. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionHttpStatusMappingrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
APPLICATION_WEB_CFG_DEPENDENCY_NAME
The dependency name the framework expects for the web config.- See Also:
-
APPLICATION_WEB_CFG_DEPENDENCY_ID
The dependency ID for the framework to retrieve the web config.
-
-
Constructor Details
-
WebConfig
Creates an instance of aWebConfigrecord class.- Parameters:
exceptionHttpStatusMapping- the value for theexceptionHttpStatusMappingrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
exceptionHttpStatusMapping
Returns the value of theexceptionHttpStatusMappingrecord component.- Returns:
- the value of the
exceptionHttpStatusMappingrecord component
-