API

Name Methods Generated By Description Max Num
AJS

addPrefix
addSuffix
addWrapper

getVersion

Automatic
execution of
statically-defined
function
AJS is a singleton Factory-object that creates and manages method-call interceptions. AJS allows application of an unlimited number of prefixes and suffixes to a given method, and such affixes can be applied to an unlimited number of methods in a given application. 1
interceptee

addPrefix
addSuffix
addWrapper

getFirstPfix
getLastPfix
getFirstSfix
getLastSfix

getPfixTot
getSfixTot

user/platform An 'interceptee' is a method to which prefixes and suffixes are applied. However, functions are first-class objects in JavaScript and can possess methods like any other object. Given this, and upon application of an initial prefix and/or suffix, the interceptee gains 10 methods that AspectJS uses internally, and which are also available to client code. The methods work in the same way as their namesakes that the AJS object supports, but their signatures are those of the addBefore, addAfter etc methods that Affix objects support. unlimited
Affix

addBefore
addAfter

remove

isAttached
getAffixTot

getFirstSib
getLastSib

getPrev
getNext

getFunc
setFunc

getArg
setArg

getExecs
setExecs

getSuspensions

suspend
resume

suspendAll
resumeAll

promote
demote

addPrefix
addSuffix
addWrapper

addBefore
addAfter

An Affix object corresponds to a prefix or suffix function that has been applied to a given interceptee. It is through its Affix object that the actions and properties of an affix function may be manipulated.

Once an affix function has been dissociated (removed) from its interceptee its corresponding Affix object becomes useless in the context of AspectJS, and its methods do nothing and/or return safe values.

unlimited
Wrapper

remove

isAttached

getPrefix
getSuffix

setFunc
setArg
setExecs

suspend
resume

suspendAll
resumeAll

promote
demote

addWrapper

Wrapper objects hold references to the prefix and suffix Affix-objects that the addWrapper method of the AJS object creates, and allow those Affixes to be treated collectively. A Wrapper's individual Affix objects are also accessible, allowing them to be manipulated individually should the need arise.

The Wrapper interface is designed to be an equivalent subset of the Affix type's interface.

unlimited
interceptee-property [

onInterceptionRemoval]

user/platform

An interceptee-property is any member (including the prototype etc references) of an intercepted function.

unlimited
AJS_Logger

enable

suspend
resume

Automatic
execution of
statically-defined
function
AJS_Logger is a singleton object that allows the instrumentation of calls to, and returns from, the methods of the AJS object, methods of the objects that they generate, and interceptee methods. 1
Global aJS_DbC Platform The Global object is the principal object in the JavaScript execution space. It is cited here because a few elements of AspectJS are defined as global members. 1