Class SearchAccessorUtil

java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.SearchAccessorUtil

public final class SearchAccessorUtil extends Object
Utility class for generating getter and setter methods for fields in search request DTOs. This class provides methods to create method specifications for accessing and modifying private fields in generated classes.
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.squareup.javapoet.MethodSpec
    getter(String name, com.squareup.javapoet.TypeName type)
    Generates a getter method for a given field name and type.
    static com.squareup.javapoet.MethodSpec
    setter(String name, com.squareup.javapoet.TypeName type)
    Generates a setter method for a given field name and type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getter

      public static com.squareup.javapoet.MethodSpec getter(String name, com.squareup.javapoet.TypeName type)
      Generates a getter method for a given field name and type.
      Parameters:
      name - the name of the field
      type - the type of the field
      Returns:
      a MethodSpec representing the getter method
    • setter

      public static com.squareup.javapoet.MethodSpec setter(String name, com.squareup.javapoet.TypeName type)
      Generates a setter method for a given field name and type.
      Parameters:
      name - the name of the field
      type - the type of the field
      Returns:
      a MethodSpec representing the setter method