Record Class Route
java.lang.Object
java.lang.Record
dev.voidframework.web.http.routing.Route
- Record Components:
httpMethod- HTTP methodroutePattern- URL regex patternfilterClassTypes- The filter class types to applycontrollerClassType- The controller class typemethod- The method
public record Route(HttpMethod httpMethod, Pattern routePattern, List<Class<? extends Filter>> filterClassTypes, Class<?> controllerClassType, Method method)
extends Record
A single route.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>Returns the value of thecontrollerClassTyperecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilterClassTypesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehttpMethodrecord component.method()Returns the value of themethodrecord component.Returns the value of theroutePatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Route
public Route(HttpMethod httpMethod, Pattern routePattern, List<Class<? extends Filter>> filterClassTypes, Class<?> controllerClassType, Method method) Creates an instance of aRouterecord class.- Parameters:
httpMethod- the value for thehttpMethodrecord componentroutePattern- the value for theroutePatternrecord componentfilterClassTypes- the value for thefilterClassTypesrecord componentcontrollerClassType- the value for thecontrollerClassTyperecord componentmethod- the value for themethodrecord 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). -
httpMethod
Returns the value of thehttpMethodrecord component.- Returns:
- the value of the
httpMethodrecord component
-
routePattern
Returns the value of theroutePatternrecord component.- Returns:
- the value of the
routePatternrecord component
-
filterClassTypes
Returns the value of thefilterClassTypesrecord component.- Returns:
- the value of the
filterClassTypesrecord component
-
controllerClassType
Returns the value of thecontrollerClassTyperecord component.- Returns:
- the value of the
controllerClassTyperecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-