ToolDefinitionSerializer class

Serializes a ToolDefinition tree to YAML format.

Used by the --dump-definitions flag to output all native commands, options, and metadata. The host tool calls this on nested tools to auto-discover their definitions.

final yaml = ToolDefinitionSerializer.toYaml(myToolDefinition);
print(yaml);

Constructors

ToolDefinitionSerializer()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromYaml(String yaml) ToolDefinition
Parse YAML output from --dump-definitions back into a ToolDefinition.
fromYamlMap(Map map) ToolDefinition
Parse a YAML map (from the yaml package) into a ToolDefinition.
toYaml(ToolDefinition tool) String
Serialize a ToolDefinition to YAML string.