GenerationContext class
Immutable context containing all generation state and configuration. Supports immutable updates through copyWith method.
Constructors
-
GenerationContext({required SchemaMap schemaMap, required List<
TypeName> path, TypeDefinitionNode? currentType, ClassPropertyName? currentFieldName, ClassName? currentClassName, required List<Definition> generatedClasses, required List<QueryInput> inputsClasses, required List<FragmentDefinitionNode> fragments, required Set<EnumName> usedEnums, required Set<ClassName> usedInputObjects}) -
const
Properties
- currentClassName → ClassName?
-
final
- currentFieldName → ClassPropertyName?
-
final
- currentType → TypeDefinitionNode?
-
final
-
fragments
→ List<
FragmentDefinitionNode> -
final
-
generatedClasses
→ List<
Definition> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inputsClasses
→ List<
QueryInput> -
final
-
path
→ List<
TypeName> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schemaMap → SchemaMap
-
final
-
usedEnums
→ Set<
EnumName> -
final
-
usedInputObjects
→ Set<
ClassName> -
final
Methods
-
copyWith(
{SchemaMap? schemaMap, List< TypeName> ? path, TypeDefinitionNode? currentType, ClassPropertyName? currentFieldName, ClassName? currentClassName, List<Definition> ? generatedClasses, List<QueryInput> ? inputsClasses, List<FragmentDefinitionNode> ? fragments, Set<EnumName> ? usedEnums, Set<ClassName> ? usedInputObjects}) → GenerationContext - Creates a new GenerationContext with updated values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void - Validates the generation context state for consistency
-
withCurrentType(
TypeDefinitionNode? type) → GenerationContext - Creates a new context with the current type set
-
withGeneratedClass(
Definition definition) → GenerationContext - Creates a new context with a new generated class added
-
withInputClass(
QueryInput input) → GenerationContext - Creates a new context with a new input class added
-
withPath(
List< TypeName> newPath) → GenerationContext - Creates a new context with an updated path
-
withPathExtension(
TypeName typeName) → GenerationContext - Creates a new context with an additional type added to the path
-
withUsedEnum(
EnumName enumName) → GenerationContext - Creates a new context with a used enum added
-
withUsedInputObject(
ClassName inputObjectName) → GenerationContext - Creates a new context with a used input object added
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited