Skip to main content

Singleton Design Pattern

  • Chapter
  • First Online:
Object-Oriented Design with ABAP

Abstract

YYou will find this design pattern useful when you need to guarantee that there is only a single instance of a class available during execution.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Though not a need, many users now prefer a multiple-monitor configuration.

  2. 2.

    GoF , p. 127.

  3. 3.

    In ABAP, a class marked as create private will confer create none upon any subclasses, preventing them from both being instantiated and creating instances of the superclass. Accordingly, SAP recommends including the final qualifier in the definition of those classes that are assigned create private instantiability.

  4. 4.

    Such references, where any one of the three components could use up to the full 30-character maximum length of its respective component name, would not have been possible years ago in releases of SAP environments such as R/3 where the ABAP editor restricted the width of a single line to 72 characters. Extending this editor line width restriction, which now stands at 255 characters, made it possible to construct such long compound references without having to resort to cumbersome techniques to avoid overrunning the line end barrier.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 James E. McDonough

About this chapter

Cite this chapter

McDonough, J.E. (2017). Singleton Design Pattern. In: Object-Oriented Design with ABAP. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2838-8_11

Download citation

Publish with us

Policies and ethics