Record Class RestControllerParams
java.lang.Object
java.lang.Record
com.bobocode.bring.web.servlet.mapping.RestControllerParams
- Record Components:
instance
- The instance of the controller.method
- The method associated with the parameters.requestMethod
- The HTTP request method associated with the method.path
- The path associated with the method.
public record RestControllerParams(Object instance, Method method, RequestMethod requestMethod, String path)
extends Record
The
RestControllerParams
record represents parameters associated with a method
in a web controller.
This record is used to encapsulate information such as the controller instance, the method, the HTTP request method, and the path.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Object
The field for theinstance
record component.private final Method
The field for themethod
record component.private final String
The field for thepath
record component.private final RequestMethod
The field for therequestMethod
record component. -
Constructor Summary
ConstructorDescriptionRestControllerParams
(Object instance, Method method, RequestMethod requestMethod, String path) Creates an instance of aRestControllerParams
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.instance()
Returns the value of theinstance
record component.method()
Returns the value of themethod
record component.path()
Returns the value of thepath
record component.Returns the value of therequestMethod
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
instance
The field for theinstance
record component. -
method
The field for themethod
record component. -
requestMethod
The field for therequestMethod
record component. -
path
The field for thepath
record component.
-
-
Constructor Details
-
RestControllerParams
public RestControllerParams(Object instance, Method method, RequestMethod requestMethod, String path) Creates an instance of aRestControllerParams
record class.- Parameters:
instance
- the value for theinstance
record componentmethod
- the value for themethod
record componentrequestMethod
- the value for therequestMethod
record componentpath
- the value for thepath
record 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)
. -
instance
Returns the value of theinstance
record component.- Returns:
- the value of the
instance
record component
-
method
Returns the value of themethod
record component.- Returns:
- the value of the
method
record component
-
requestMethod
Returns the value of therequestMethod
record component.- Returns:
- the value of the
requestMethod
record component
-
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-