{"id":"template-method-bridges-inheritance-composition-at-all-scales","text":"Template Method's dual architectural role (principled inheritance counterexample within classes, inter-pattern integration mechanism between patterns) combined with framework inversion of control (system-level instantiation of the Hollywood principle) establishes Template Method as the mechanism bridging inheritance and composition across all organizational scales — within classes, between patterns, and across architectures.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["filtering-iterator-demonstrates-template-method-composability","framework-inversion-instantiates-hollywood-principle"],"outlist":[],"label":"Template Method's composability role and framework-level Hollywood principle show the same mechanism at three scales"}],"dependents":["template-method-sole-inheritance-bridge-within-monistic-system"],"metadata":{"source_type":"derived","review_result":"invalid"},"created_at":"2026-06-18T01:54:09+00:00","updated_at":"2026-06-18T06:15:08+00:00","reviewed_at":"2026-06-18T06:15:08+00:00","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"template-method-bridges-inheritance-composition-at-all-scales","truth_value":"IN","reason":"SL justification valid","antecedents":["filtering-iterator-demonstrates-template-method-composability","framework-inversion-instantiates-hollywood-principle"],"label":"Template Method's composability role and framework-level Hollywood principle show the same mechanism at three scales"},{"node":"filtering-iterator-demonstrates-template-method-composability","truth_value":"IN","reason":"SL justification valid","antecedents":["gof-filtering-iterator-adds-testitem","template-method-dual-role-skeleton-and-safety"],"label":"FilteringIterator exemplifies Template Method as an inter-pattern integration mechanism"},{"node":"gof-filtering-iterator-adds-testitem","truth_value":"IN","reason":"premise"},{"node":"template-method-dual-role-skeleton-and-safety","truth_value":"IN","reason":"SL justification valid","antecedents":["template-method-principled-inheritance-counterexample","observer-consistency-via-template-method"],"label":"Template Method's override control and its Observer safety role are two manifestations of the same Hollywood principle, revealing it as both the exception that proves the composition rule and the mechanism that makes composition-based notification safe"},{"node":"template-method-principled-inheritance-counterexample","truth_value":"IN","reason":"SL justification valid","antecedents":["template-method-fine-grained-override-control","composition-superiority-for-reuse"],"label":"Template Method is the exception that proves the composition rule by showing when inheritance works"},{"node":"template-method-fine-grained-override-control","truth_value":"IN","reason":"SL justification valid","antecedents":["gof-template-method-five-operation-kinds","hook-operations-overridable-defaults","gof-cpp-template-method-nonvirtual"],"label":"Five operation kinds plus non-virtual skeleton produce the most controlled inheritance in the GoF"},{"node":"gof-template-method-five-operation-kinds","truth_value":"IN","reason":"premise"},{"node":"hook-operations-overridable-defaults","truth_value":"IN","reason":"premise"},{"node":"gof-cpp-template-method-nonvirtual","truth_value":"IN","reason":"premise"},{"node":"composition-superiority-for-reuse","truth_value":"IN","reason":"SL justification valid","antecedents":["favor-composition-over-inheritance","inheritance-breaks-encapsulation","inheritance-compile-time-composition-run-time","delegation-composition-as-powerful-as-inheritance"],"label":"Four independent arguments converge on composition's superiority over inheritance"},{"node":"favor-composition-over-inheritance","truth_value":"IN","reason":"premise"},{"node":"inheritance-breaks-encapsulation","truth_value":"IN","reason":"premise"},{"node":"inheritance-compile-time-composition-run-time","truth_value":"IN","reason":"premise"},{"node":"delegation-composition-as-powerful-as-inheritance","truth_value":"IN","reason":"premise"},{"node":"observer-consistency-via-template-method","truth_value":"IN","reason":"SL justification valid","antecedents":["gof-observer-notify-after-consistent-state","gof-template-method-hollywood-principle"],"label":"Observer's consistency requirement and Template Method's inverted control connect as enforcement mechanism to correctness constraint"},{"node":"gof-observer-notify-after-consistent-state","truth_value":"IN","reason":"premise"},{"node":"gof-template-method-hollywood-principle","truth_value":"IN","reason":"premise"},{"node":"framework-inversion-instantiates-hollywood-principle","truth_value":"IN","reason":"SL justification valid","antecedents":["framework-inversion-of-control","gof-template-method-hollywood-principle"],"label":"Template Method's Hollywood principle and framework inversion of control are the same mechanism at different scales"},{"node":"framework-inversion-of-control","truth_value":"IN","reason":"premise"}]}}