Class SearchAccessorUtil
java.lang.Object
nl.datasteel.crudcraft.codegen.writer.search.SearchAccessorUtil
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 TypeMethodDescriptionstatic com.squareup.javapoet.MethodSpec
Generates a getter method for a given field name and type.static com.squareup.javapoet.MethodSpec
Generates a setter method for a given field name and type.
-
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 fieldtype
- 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 fieldtype
- the type of the field- Returns:
- a MethodSpec representing the setter method
-