docs.intersystems.com
Home / Class Definition Reference / Method Keywords / Private


Class Definition Reference
Private
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Specifies whether this method is private (can be invoked only by methods of this class or its subclasses).
Usage
To specify that the method is private, use the following syntax:
Method name(formal_spec) As returnclass [ Private ] 
{    //implementation }
Otherwise, omit this keyword or place the word Not immediately before the keyword.
Details
Private class members can be used only by other members of the same class (or its subclasses). Note that other languages often use the word protected to describe this kind of visibility and use the word private to mean invisibility from subclasses.
This keyword is inherited but you can change its value in subclasses.
Default
If you omit this keyword, this method is not private.
See Also


Previous section           Next section
View this book as PDF
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-02-15 22:51:05