{"id":"template-method-fine-grained-override-control","text":"Template Method distinguishes five kinds of called operations (concrete operations, concrete AbstractClass operations, primitive operations, factory methods, and hook operations), offering fine-grained override control: hooks provide default behavior intended for optional override, primitive operations require override, and in C++ the template method itself should be non-virtual, preventing subclasses from subverting the algorithm skeleton.","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["gof-template-method-five-operation-kinds","hook-operations-overridable-defaults","gof-cpp-template-method-nonvirtual"],"outlist":[],"label":"Five operation kinds plus non-virtual skeleton produce the most controlled inheritance in the GoF"}],"dependents":["template-method-principled-inheritance-counterexample"],"metadata":{"source_type":"derived","review_result":"pass","repair_action":"softened"},"created_at":"2026-06-17T23:28:16+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-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"}]}}