saealib.core.compiler.ComponentNode#
- class saealib.core.compiler.ComponentNode(*, component_id, component, role=None, resolved_services=<factory>)[ソース]#
ベースクラス:
objectHold a component instance and its compilation-local contract snapshot.
- パラメータ:
component_id (str)
component (object)
role (str | None)
resolved_services (Mapping[str, object])
Methods
Return a node with one immutable compilation snapshot. |
|
Return a service-enriched node without re-reading its contract. |
Method Details
- ComponentNode.__init__(*, component_id, component, role=None, resolved_services=<factory>)#
- パラメータ:
component_id (str)
component (object)
role (str | None)
resolved_services (Mapping[str, object])
- 戻り値の型:
None
- ComponentNode.with_contract_snapshot(*, refresh=False)[ソース]#
Return a node with one immutable compilation snapshot.
refreshis used only for the first pass of a new compilation. A subsequent resolution pass preserves the snapshot already attached to the node, including when resolution only changes service bindings.- パラメータ:
refresh (bool)
- 戻り値の型:
- ComponentNode.with_resolved_services(resolved_services)[ソース]#
Return a service-enriched node without re-reading its contract.
Resolution rules may add service bindings later, but rebuilding the dataclass with
dataclasses.replacemust not invokecontract().- パラメータ:
resolved_services (Mapping[str, object])
- 戻り値の型: