Record Class Endpoint
java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.shadow.model.Endpoint
- Record Components:
verb- the HTTP verb the endpoint responds to;HttpVerb.ANYwhen the controller method does not restrict the verbpath- the endpoint's path template, e.g."/api/users/{id}"; always starts with"/"declaringClass- fully-qualified name of the@RestControllerclassmethodSignature- simple signature of the handler method, e.g."getUser(Long)"sourceFile- simple file name of the source file, e.g."UserController.java"lineNumber- 1-based source line number of the handler method, or0when unknown
public record Endpoint(HttpVerb verb, String path, String declaringClass, String methodSignature, String sourceFile, int lineNumber)
extends Record
A single HTTP endpoint exposed by a
@RestController method, as found by scanning
controller source code.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclaringClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelineNumberrecord component.Returns the value of themethodSignaturerecord component.path()Returns the value of thepathrecord component.Returns the value of thesourceFilerecord component.final StringtoString()Returns a string representation of this record class.verb()Returns the value of theverbrecord component.
-
Constructor Details
-
Endpoint
public Endpoint(HttpVerb verb, String path, String declaringClass, String methodSignature, String sourceFile, int lineNumber) Creates an instance of aEndpointrecord class.- Parameters:
verb- the value for theverbrecord componentpath- the value for thepathrecord componentdeclaringClass- the value for thedeclaringClassrecord componentmethodSignature- the value for themethodSignaturerecord componentsourceFile- the value for thesourceFilerecord componentlineNumber- the value for thelineNumberrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
verb
Returns the value of theverbrecord component.- Returns:
- the value of the
verbrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
declaringClass
Returns the value of thedeclaringClassrecord component.- Returns:
- the value of the
declaringClassrecord component
-
methodSignature
Returns the value of themethodSignaturerecord component.- Returns:
- the value of the
methodSignaturerecord component
-
sourceFile
Returns the value of thesourceFilerecord component.- Returns:
- the value of the
sourceFilerecord component
-
lineNumber
public int lineNumber()Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-