ConfigProcessor class
Main configuration processor that orchestrates the state machine.
- Implemented types
- Available extensions
Constructors
- ConfigProcessor({FileSystem? fileSystem})
- Constructor that automatically registers built-in handlers.
Properties
- context → Context
-
Current processing context.
no setter
- currentState → ProcessorState
-
Current processing state.
no setter
- fileSystem → FileSystem
-
The filesystem used by built-in handlers (e.g.
IncludeHandler).final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getBlockScopedHandlers(
String blockType) → Map< String, CommandHandler> - Get all block-scoped handlers registered for a specific block type. Returns an empty map if no handlers are registered for the block type.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
popContext(
) → void - Pop the current context from the context stack.
-
popState(
) → ProcessorState? - Pop the current state from the stack.
-
process(
Config config) → Future< void> - Process a configuration. Returns a Future that completes when all processing is done. Handlers can be sync or async - the processor waits for async handlers to complete.
-
processElements(
List< ConfigElement> elements) → Future<void> -
Available on ConfigProcessor, provided by the ManualProcessing extension
Manually process a list of elements. This is useful for block handlers that set processChildrenAutomatically = false and want to process children with custom logic (filtering, reordering, multi-pass, etc.). -
processString(
String content) → Future< void> - Process a configuration string directly. Convenience method for parsing and processing in one step.
-
pushContext(
) → void - Push a new context onto the context stack.
-
pushState(
ProcessorState state) → void - Push a new state onto the stack.
-
registerBlockHandler(
BlockHandler handler) → void - Register a block handler. This will also call the handler's registerScopedCommands method to set up any block-scoped command handlers.
-
registerBlockScopedBlockHandler(
String parentBlockType, BlockHandler handler) → void - Register a block handler scoped to a specific parent block type. The handler will only be invoked for child blocks inside a parent block of the specified type.
-
registerBlockScopedCommandHandler(
String blockType, CommandHandler handler) → void - Register a command handler scoped to a specific block type. The handler will only be invoked for commands inside blocks of the specified type.
-
registerCommand(
String commandName, CommandHandler handler) → void -
Register a command handler scoped to the current block type.
override
-
registerCommandHandler(
CommandHandler handler) → void - Register a command handler.
-
registerScopedBlockHandler(
String blockType, BlockHandler handler) → void -
Register a block handler scoped to the current block type.
override
-
setErrorHandler(
ErrorHandler handler) → void - Set the error handler.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited