API Docs for: 1.0.1

Grape.Class Class

Defined in: js\grape\class.js:96

A static class for storing keyword related functions. To see how to create a class, check the Class method in the Grape class.

Item Index

Methods

registerKeyword

(
  • name
  • handlers
)
static

Registers a new keyword (like 'final' or 'static'). Todov2 callback params

Parameters:

  • name String
  • handlers Object

    The functions called during the class creation

    • [onInit] Function optional

      Called when a new class is about to create

    • [onAdd] Function optional

      Called when a method with the keyword is added to the class

    • [onFinish] Function optional

      Called when the class is ready

registerKeywordMatching

(
  • k1
  • k2
)
static

Tells to the Grape class system that two keywords can be used together. If not explicitly told, a keyword cannot be used with other ones. The order of keywords is irrelevant.

Parameters:

  • k1 String

    Keyword 1

  • k2 String

    Keyword 2