encyclopegia.org

Method stub

A method stub is a short and simple placeholder for a method that is not yet written for production needs. Generally, a method stub contains just enough code to allow it to be used a declaration with any parameters, and if applicable, a return value. A method stub may be used to implement an interface that is defined but for which the implementation is not available.

A method stub is a short and simple placeholder for a method that is not yet written for production needs. Generally, a method stub contains just enough code to allow it to be used a declaration with any parameters, and if applicable, a return value. A method stub may be used to implement an interface that is defined but for which the implementation is not available. ==Example== In the following example pseudocode, the function returns a particular value even though ultimately it is supposed to read a value from a hardware source. It returns a valid value, allowing consuming code to be runnable. The function ignores the input parameter which is common for a stub. function ReadThermometer(Source source) return 28 end function ==Related== ===Distributed computing=== In distributed computing, stub is like a mock object simulates existing code, such as a procedure on a remote machine. Such stubs can be useful in porting. In RMI nomenclature, a stub on the client-side communicates with a skeleton on the server-side. ===Windows/MS-DOS=== In Windows and MS-DOS, stub is like a shim small interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS). ==See also== Abstract method Mock object Dummy code Test stub Glue code Shim (computing) DOS stub

References

No reference rows published for this article.

Cite this article

MLA

"Method stub." encyclopegia.org, 2026, https://encyclopegia.org/wiki/method-stub. Accessed 24 November 2026.

Chicago

"Method stub." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/method-stub.

APA

encyclopegia.org. (2026). Method stub. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/method-stub

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

Related articles

Template:Footy-stub

stub · references available

Java remote method invocation

stub · references available

mutator method

stub · references available

Flexibility method

stub · references available

generalized method of moments

stub · references available

Euler–Maruyama method

stub · references available

Stub-tailed Spadebill

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1369189849 · 0.5 · snapshot enwiki-001369189849

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

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