Record Class MockRequestServices
java.lang.Object
java.lang.Record
io.github.grumpystuff.grumpyrest.request.mock.MockRequestServices
- Record Components:
fromStringParserRegistry- used to parse path arguments and querystring argumentsquerystringParserRegistry- used to parse the whole querystringjsonEngine- used to parse request bodies
public record MockRequestServices(FromStringParserRegistry fromStringParserRegistry, QuerystringParserRegistry querystringParserRegistry, StructuralJsonEngine jsonEngine)
extends Record
Implements the infrastructure behind
MockRequests, such as the JsonEngine to use.-
Constructor Summary
ConstructorsConstructorDescriptionThis constructor generates new registries for everything.MockRequestServices(FromStringParserRegistry fromStringParserRegistry, QuerystringParserRegistry querystringParserRegistry, StructuralJsonEngine jsonEngine) Creates an instance of aMockRequestServicesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromStringParserRegistryrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thejsonEnginerecord component.Returns the value of thequerystringParserRegistryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MockRequestServices
public MockRequestServices()This constructor generates new registries for everything. Customized converters can be added to those registries later. -
MockRequestServices
public MockRequestServices(FromStringParserRegistry fromStringParserRegistry, QuerystringParserRegistry querystringParserRegistry, StructuralJsonEngine jsonEngine) Creates an instance of aMockRequestServicesrecord class.- Parameters:
fromStringParserRegistry- the value for thefromStringParserRegistryrecord componentquerystringParserRegistry- the value for thequerystringParserRegistryrecord componentjsonEngine- the value for thejsonEnginerecord 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). -
fromStringParserRegistry
Returns the value of thefromStringParserRegistryrecord component.- Returns:
- the value of the
fromStringParserRegistryrecord component
-
querystringParserRegistry
Returns the value of thequerystringParserRegistryrecord component.- Returns:
- the value of the
querystringParserRegistryrecord component
-
jsonEngine
Returns the value of thejsonEnginerecord component.- Returns:
- the value of the
jsonEnginerecord component
-