encyclopegia.org

call super

Call super is a code smell or anti-pattern of some object-oriented programming languages.[src] Call super is a design pattern in which a particular class stipulates that in a derived subclass, the user is required to override a method and call back the overridden function itself at a particular point.[src] The overridden method may be intentionally incomplete, and reliant on the overriding method to augment its functionality in a prescribed manner.[src] However, the fact that the language itself may not be able to enforce all conditions prescribed on this call is what makes this an anti-pattern.[src]

Call super is a code smell or anti-pattern of some object-oriented programming languages.[src] Call super is a design pattern in which a particular class stipulates that in a derived subclass, the user is required to override a method and call back the overridden function itself at a particular point.[src] The overridden method may be intentionally incomplete, and reliant on the overriding method to augment its functionality in a prescribed manner.[src] However, the fact that the language itself may not be able to enforce all conditions prescribed on this call is what makes this an anti-pattern.[src] abstract class ReportGenerator { public virtual Report CreateReport() { // Generate the general report object // ...[src] return new Report(...); } } A user of the class is expected to implement a subclass like this: class ConcreteReportGenerator : ReportGenerator { public override Report CreateReport() { // Tabulate data in the store-specific way // ...[src] // Design of this class requires the parent CreateReport() function to be called at the // end of the overridden function.[src] But note this line could easily be left out, or the // returned report could be further modified after the call, violating the class design // and possibly also the company-wide report format.[src] return base.CreateReport(); } } A preferable interface looks like this: abstract class ReportGenerator { public Report CreateReport() { Tabulate(); // Generate the general report object // ...[src] return new Report(...); } protected abstract void Tabulate(); } An implementation would override this class like this: class ConcreteReportGenerator : ReportGenerator { protected override void Tabulate() { // Tabulate data in the store-specific way // ...[src] } }[src]

15 sentences · 15 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"call super." encyclopegia.org, 2025, https://encyclopegia.org/wiki/call-super. Accessed 27 November 2026.

Chicago

"call super." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/call-super.

APA

encyclopegia.org. (2025). call super. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/call-super

Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Super Star Wars: The Empire Strikes Back

stub · references available

Call of Duty 4: Modern Warfare

stub · references available

Super

stub · references available

Super Bowl V

stub · references available

FIA Super Licence

stub · references available

Babylon 5: A Call to Arms

stub · references available

Super Nintendo Entertainment System

stub · references available

super high frequency

stub · references available
CC BY-SA 4.0 · tier1-factual · https://en.wikipedia.org/w/index.php?oldid=1309136717 · 0.55 · snapshot call-super-572877-d6ca95c1f75263e5 · QID Q5021671

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.