Class DTOGenerator<T extends GenerationTarget>
java.lang.Object
no.sikt.graphitron.generators.abstractions.AbstractClassGenerator
no.sikt.graphitron.generators.abstractions.AbstractSchemaClassGenerator<T>
no.sikt.graphitron.generators.dto.DTOGenerator<T>
- All Implemented Interfaces:
ClassGenerator
- Direct Known Subclasses:
EnumDTOGenerator,InputDTOGenerator,InterfaceDTOGenerator,TypeDTOGenerator,UnionDTOGenerator
public abstract class DTOGenerator<T extends GenerationTarget>
extends AbstractSchemaClassGenerator<T>
-
Field Summary
FieldsFields inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaClassGenerator
processedSchema -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringprotected static StringgetDTOVariableNameForField(GenerationSourceField<? extends graphql.language.NamedNode<?>> field) protected no.sikt.graphitron.javapoet.TypeNamegetTypeNameForField(GenerationSourceField<?> field, KeyWrapper firstStepKeyForField) protected no.sikt.graphitron.javapoet.TypeSpec.BuildergetTypeSpecBuilder(String targetName, List<? extends GenerationSourceField<?>> fields) Methods inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaClassGenerator
generateMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractClassGenerator
generateAllAsMap, generateAllToDirectory, getGeneratedClassName, getSpec, getSpec, setDependencies, writeToFile, writeToFile, writeToStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface no.sikt.graphitron.generators.abstractions.ClassGenerator
generateAll
-
Field Details
-
HASH_CODE
- See Also:
-
OBJ
- See Also:
-
EQUALS
- See Also:
-
-
Constructor Details
-
DTOGenerator
-
-
Method Details
-
getTypeSpecBuilder
protected no.sikt.graphitron.javapoet.TypeSpec.Builder getTypeSpecBuilder(String targetName, List<? extends GenerationSourceField<?>> fields) -
getDTOVariableNameForField
protected static String getDTOVariableNameForField(GenerationSourceField<? extends graphql.language.NamedNode<?>> field) -
getDTOGetterMethodNameForField
-
getTypeNameForField
protected no.sikt.graphitron.javapoet.TypeName getTypeNameForField(GenerationSourceField<?> field, KeyWrapper firstStepKeyForField) -
getDefaultSaveDirectoryName
- Returns:
- The final directory path within the package where the classes are ultimately saved.
-
getFileNameSuffix
- Returns:
- The suffix that is to be added to the end of file names generated by this class.
-