NodeMeta class final
Debug metadata attached to IR nodes.
NodeMeta carries source location and arbitrary attributes for debugging, hooks, and auditing. It is intentionally excluded from equality so that two nodes with identical semantic content compare equal regardless of their source locations.
When to Use
- Access location to find where a node came from in the source DOCX.
- Access attributes for Word-specific details like style IDs or list info.
- In hooks, use
node.metato make context-aware decisions.
Memory Considerations
Keep attributes minimal. Every node carries a reference to its meta, so large attribute maps can bloat memory on big documents.
See also:
- DocNode.meta where this is attached
- SourceLocation for the location format
- Annotations
-
- @immutable
Constructors
-
NodeMeta({SourceLocation? location, Map<
String, Object?> attributes = const {}}) - Creates node metadata with optional location and attributes.
Properties
-
attributes
→ Map<
String, Object?> -
Arbitrary attributes from the source document.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- location → SourceLocation?
-
Where in the source DOCX this node originated.
final
- 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override