HookPrimitive

HookPrimitive

new HookPrimitive()

Source:

To represent a hook primitive. A hook primitive is like a hook template, it allows a developer or a user to define hooks in different files and combine it in order to be injected by using a single script.

Methods

getVariables() → {Object}

Source:

Get the shared object from this hookset

Returns:

Shared object

Type
Object

toIntercept(context, set) → {Hook}

Source:

To built an intercepting hook from the current primitive

Parameters:
Name Type Description
context Project

The reference to the current Project instance

set HookSet

The hookset where the hook primitive is defined

Returns:

The hook ready to be injected

Type
Hook

toJsonObject() → {Object}

Source:

To make an instance of Object which not contain circular reference and which are ready to be serialized.

Returns:

Returns an Object instance representing the type

Type
Object

toProbe(context, set) → {Hook}

Source:

To built a probing hook from the current primitive

Parameters:
Name Type Description
context DexcaliburProject

The reference to the current Project instance

set HookSet

The hookset where the hook primitive is defined

Returns:

The hook ready to be injected

Type
Hook