Class AbstractMapperMethodGenerator

All Implemented Interfaces:
MethodGenerator
Direct Known Subclasses:
JavaRecordMapperMethodGenerator, RecordMapperMethodGenerator, RecordValidatorMethodGenerator

public abstract class AbstractMapperMethodGenerator extends AbstractSchemaMethodGenerator<GenerationField,RecordObjectSpecification<?>>
  • Field Details

    • toRecord

      protected final boolean toRecord
  • Constructor Details

    • AbstractMapperMethodGenerator

      public AbstractMapperMethodGenerator(GenerationField localField, ProcessedSchema processedSchema, boolean toRecord)
  • Method Details

    • getLocalField

      public GenerationField getLocalField()
    • getDefaultSpecBuilder

      public no.sikt.graphitron.javapoet.MethodSpec.Builder getDefaultSpecBuilder(String methodName, String inputName, no.sikt.graphitron.javapoet.TypeName inputType, no.sikt.graphitron.javapoet.TypeName returnType)
    • getMapperSpecBuilder

      public no.sikt.graphitron.javapoet.MethodSpec.Builder getMapperSpecBuilder(GenerationField target)
    • generateAll

      public List<no.sikt.graphitron.javapoet.MethodSpec> generateAll()
      Returns:
      List of complete javapoet MethodSpec that can be generated for this object.
    • mapsJavaRecord

      public abstract boolean mapsJavaRecord()
    • iterateRecords

      protected abstract no.sikt.graphitron.javapoet.CodeBlock iterateRecords(MapperContext context)
      Returns:
      Code for setting the mapping data.