Class: Referencer

Defined in: src/util/referencer.coffee

Overview

Responsible for resolving class references.

Class Method Summary

Instance Method Summary

Class Method Details

@getLinkMatch(text)

Constructor Details

.constructor(classes, mixins, options)

Construct a referencer.

Parameters:

  • classesAll known classes
  • mixinsAll known mixins
  • (Object) optionsthe parser options (a {Object})

Instance Method Details

Array .getConcernMethods(clazz)

Get all concerns methods.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of concern {Method}s.

Array .getDirectSubClasses(clazz)

Get all direct subclasses.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of {Class}es.

Array .getExtendedMethods(clazz)

Get all extended mixins in the class hierarchy.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of {Mixin}s.

Array .getIncludedMethods(clazz)

Get all included mixins in the class hierarchy.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of {Mixin}s.

Array .getInheritedConstants(clazz)

Get all inherited constants.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of {Variable}s that are constants.

.getInheritedMethods(clazz)

Get all inherited methods.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • Returns the inherited methods.

Array .getInheritedProperties(clazz)

Get all inherited properties.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of {Property} types.

Array .getInheritedVariables(clazz)

Get all inherited variables.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • (Array) — Returns an {Array} of {Variable}s.

Get the link to classname.

See {::linkTypes}.

Parameters:

  • (String) classnameThe class name (a {String})
  • (String) pathThe path prefix (a {String})

Returns:

  • Returns the link (if any)

String .linkType(text = '', path)

Create browsable links to a known entity.

See {::getLink}.

Parameters:

  • (String) textThe text to parse (a {String})
  • (String) pathThe path prefix (a {String})

Returns:

  • (String) — Returns the processed text (a {String})

String .linkTypes(text = '', path)

Creates browsable links for known entities.

See {::getLink}.

Parameters:

  • (String) textThe text to parse (a {String})
  • (String) pathThe path prefix (a {String})

Returns:

  • (String) — Returns the processed text (a {String})

Object .readStandardJSON()

Constructs the documentation links for the standard JS objects.

Returns:

  • (Object) — Returns a JSON {Object}.

.resolveDelegation(origin, ref, entity)

Resolves delegations; that is, methods whose source content come from

These are basically conrefs.

Object .resolveDoc(data, entity, path)

Resolve all tags on class and method json output.

Parameters:

  • (Object) dataThe JSON data (a {Object})
  • (Class) entityThe entity context (a Class)
  • (String) pathThe path to the asset root (a {String})

Returns:

  • (Object) — Returns the JSON data with resolved references (a {Object})

Array .resolveMixinMethods(name)

Get a list of all methods from the given mixin name

Parameters:

  • (Mixin) nameThe full name of the Mixin

Returns:

  • (Array) — Returns the mixin methods as an {Array}.

.resolveParamReferences()

Resolve parameter references. This goes through all

Object .resolveSee(see, entity, path)

Resolves curly-bracket reference links.

Parameters:

  • (Object) seeThe reference object (a {Object})
  • (Class) entityThe entity context (a Class)
  • (String) pathThe path to the asset root (a {String})

Returns:

  • (Object) — Returns the resolved see (a {Object}).

.resolveTextReferences(text = '', entity, path)

Search a text to find see links wrapped in curly braces.

Examples:

Boolean .verifyExternalObjReference(name)

Checks to make sure that an object that's referenced exists in standardObjs.json.

Returns:

  • (Boolean) — Returns a {Boolean}.