Next: , Previous: , Up: Classes [Contents]


2.4 Abstract Members

'abstract [keywords] name': params

Declare an abstract method name as having params parameters, having optional additional keywords keywords.

Abstract members permit declaring an API, deferring the implementation to a subtype. Abstract methods are declared as an array of string parameter names params.

 // declares abstract method 'connect' expecting the two parameters,
 // 'host' and 'path'
 { 'abstract connect': [ 'host', 'path' ] }

Abstract members may only be a part of one of the following:

Interfaces:
Part of the GNU Project

Copyright © 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc.

"GNU Inside!" Page Fold licensed under CC-BY-SA 2.0; incorporates "A Big GNU Head".

The source code of this website is available in the website branch of the Git repository.

Authored by Mike Gerwitz

AltStyle によって変換されたページ (->オリジナル) /