Class JavaRecordMapperMethodGenerator
java.lang.Object
no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator<GenerationField,RecordObjectSpecification<?>>
no.sikt.graphitron.generators.abstractions.AbstractMapperMethodGenerator
no.sikt.graphitron.generators.mapping.JavaRecordMapperMethodGenerator
- All Implemented Interfaces:
MethodGenerator
-
Field Summary
Fields inherited from class no.sikt.graphitron.generators.abstractions.AbstractMapperMethodGenerator
toRecordFields inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
dependencyMap, localObject, processedSchema -
Constructor Summary
ConstructorsConstructorDescriptionJavaRecordMapperMethodGenerator(GenerationField localField, ProcessedSchema processedSchema, boolean toRecord) -
Method Summary
Modifier and TypeMethodDescriptionno.sikt.graphitron.javapoet.MethodSpecgenerate(GenerationField target) protected @NotNull no.sikt.graphitron.javapoet.CodeBlockiterateRecords(MapperContext context) booleanMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractMapperMethodGenerator
generateAll, getDefaultSpecBuilder, getLocalField, getMapperSpecBuilderMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
createServiceDependency, declareAllServiceClasses, declareAllServiceClasses, declareAllServiceClassesInAliasSet, getDataFetcherWiring, getDefaultSpecBuilder, getDependencyMap, getLocalObject, getLocalTable, getTypeResolverWiring
-
Constructor Details
-
JavaRecordMapperMethodGenerator
public JavaRecordMapperMethodGenerator(GenerationField localField, ProcessedSchema processedSchema, boolean toRecord)
-
-
Method Details
-
generate
- Specified by:
generatein classAbstractSchemaMethodGenerator<GenerationField,RecordObjectSpecification<?>> - Returns:
- The complete javapoet
MethodSpecbased on the provided target.
-
iterateRecords
@NotNull protected @NotNull no.sikt.graphitron.javapoet.CodeBlock iterateRecords(MapperContext context) - Specified by:
iterateRecordsin classAbstractMapperMethodGenerator- Returns:
- Code for setting the record data from input types.
-
mapsJavaRecord
public boolean mapsJavaRecord()- Specified by:
mapsJavaRecordin classAbstractMapperMethodGenerator
-