Class: AttributeForInstanceOf

gpf.attributes. AttributeForInstanceOf


new AttributeForInstanceOf(BaseClass)

Attribute to restrict the use of an attribute to instance of a given class (or child classes). It throws gpf.Error.RestrictedBaseClassAttribute if the target attribute is not used in a definition that does not extend the expected base class (or any of its child classes).

Usage restriction

Parameters:
Name Type Description
BaseClass function

The base class restriction

Since:
  • 0.2.8
Throws:

Extends

Methods


getClassConstructor()

GET accessor for

Class constructore the attribute was set on

Since:
  • 0.2.8
Inherited From:
Returns:

Class constructore the attribute was set on

Type
function | undefined

getMemberName()

GET accessor for

Class member name the attribute was set on (or undefined if at class level)

Since:
  • 0.2.8
Inherited From:
Returns:

Class member name the attribute was set on (or undefined if at class level)

Type
String | undefined