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 aControllerMethodContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.MethodSpec.Builderbuilder()Returns the value of thebuilderrecord component.endpoint()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.Returns the value of thesecurityPolicyrecord component.spec()Returns the value of thespecrecord component.final StringtoString()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 aControllerMethodContextrecord class.- Parameters:
builder- the value for thebuilderrecord componentmodel- the value for themodelrecord componentspec- the value for thespecrecord componentsecurityPolicy- the value for thesecurityPolicyrecord 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 thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
spec
Returns the value of thespecrecord component.- Returns:
- the value of the
specrecord component
-
securityPolicy
Returns the value of thesecurityPolicyrecord component.- Returns:
- the value of the
securityPolicyrecord component
-