Record Class ControllerMethodContext
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.writer.controller.method.ControllerMethodContext
public record ControllerMethodContext(com.squareup.javapoet.MethodSpec.Builder builder, ModelDescriptor model, EndpointSpec spec, CrudSecurityPolicy securityPolicy)
extends Record
Context object passed to individual method components during generation.
-
Constructor Summary
ConstructorsConstructorDescriptionControllerMethodContext
(com.squareup.javapoet.MethodSpec.Builder builder, ModelDescriptor model, EndpointSpec spec, CrudSecurityPolicy securityPolicy) Creates an instance of aControllerMethodContext
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.MethodSpec.Builder
builder()
Returns the value of thebuilder
record component.endpoint()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.model()
Returns the value of themodel
record component.Returns the value of thesecurityPolicy
record component.spec()
Returns the value of thespec
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ControllerMethodContext
public ControllerMethodContext(com.squareup.javapoet.MethodSpec.Builder builder, ModelDescriptor model, EndpointSpec spec, CrudSecurityPolicy securityPolicy) Creates an instance of aControllerMethodContext
record class.- Parameters:
builder
- the value for thebuilder
record componentmodel
- the value for themodel
record componentspec
- the value for thespec
record componentsecurityPolicy
- the value for thesecurityPolicy
record component
-
-
Method Details
-
endpoint
-
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)
. -
builder
public com.squareup.javapoet.MethodSpec.Builder builder()Returns the value of thebuilder
record component.- Returns:
- the value of the
builder
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
spec
Returns the value of thespec
record component.- Returns:
- the value of the
spec
record component
-
securityPolicy
Returns the value of thesecurityPolicy
record component.- Returns:
- the value of the
securityPolicy
record component
-