Record Class EndpointSpec
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.writer.controller.EndpointSpec
public record EndpointSpec(CrudEndpoint endpoint, String methodName, Function<ModelDescriptor,com.squareup.javapoet.AnnotationSpec> mapping, Function<ModelDescriptor,com.squareup.javapoet.TypeName> returnType, List<Function<ModelDescriptor,com.squareup.javapoet.ParameterSpec>> params, BiConsumer<com.squareup.javapoet.MethodSpec.Builder,ModelDescriptor> body)
extends Record
Describes how to generate a single controller endpoint.
-
Constructor Summary
ConstructorsConstructorDescriptionEndpointSpec(CrudEndpoint endpoint, String methodName, Function<ModelDescriptor, com.squareup.javapoet.AnnotationSpec> mapping, Function<ModelDescriptor, com.squareup.javapoet.TypeName> returnType, List<Function<ModelDescriptor, com.squareup.javapoet.ParameterSpec>> params, BiConsumer<com.squareup.javapoet.MethodSpec.Builder, ModelDescriptor> body) Creates an instance of aEndpointSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionBiConsumer<com.squareup.javapoet.MethodSpec.Builder, ModelDescriptor> body()Returns the value of thebodyrecord component.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Function<ModelDescriptor, com.squareup.javapoet.AnnotationSpec> mapping()Returns the value of themappingrecord component.Returns the value of themethodNamerecord component.List<Function<ModelDescriptor, com.squareup.javapoet.ParameterSpec>> params()Returns the value of theparamsrecord component.Function<ModelDescriptor, com.squareup.javapoet.TypeName> Returns the value of thereturnTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EndpointSpec
public EndpointSpec(CrudEndpoint endpoint, String methodName, Function<ModelDescriptor, com.squareup.javapoet.AnnotationSpec> mapping, Function<ModelDescriptor, com.squareup.javapoet.TypeName> returnType, List<Function<ModelDescriptor, com.squareup.javapoet.ParameterSpec>> params, BiConsumer<com.squareup.javapoet.MethodSpec.Builder, ModelDescriptor> body) Creates an instance of aEndpointSpecrecord class.- Parameters:
endpoint- the value for theendpointrecord componentmethodName- the value for themethodNamerecord componentmapping- the value for themappingrecord componentreturnType- the value for thereturnTyperecord componentparams- the value for theparamsrecord componentbody- the value for thebodyrecord 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). -
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
methodName
Returns the value of themethodNamerecord component.- Returns:
- the value of the
methodNamerecord component
-
mapping
Returns the value of themappingrecord component.- Returns:
- the value of the
mappingrecord component
-
returnType
Returns the value of thereturnTyperecord component.- Returns:
- the value of the
returnTyperecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-