Class Referencer

Defined in: src/util/referencer.coffee

Overview

Public: Responsible for resolving class references.

Instance Method Summary

Constructor Details

::constructor(classes, mixins, options) Source

Public: Construct a referencer. classes - All known classes mixins - All known mixins options - the parser options (a Object)

Parameters:

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

Instance Method Details

Array ::getConcernMethods(clazz) Source

Public: Get all concerns methods. clazz - The parent class (a Class) Returns an Array of concern Methods.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

Array ::getDirectSubClasses(clazz) Source

Public: Get all direct subclasses. clazz - The parent class (a Class) Returns an Array of Classes.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

Array ::getExtendedMethods(clazz) Source

Public: Get all extended mixins in the class hierarchy. clazz - The parent class (a Class) Returns an Array of Mixins.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

Array ::getIncludedMethods(clazz) Source

Public: Get all included mixins in the class hierarchy. clazz - The parent class (a Class) Returns an Array of Mixins.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

Array ::getInheritedConstants(clazz) Source

Public: Get all inherited constants. clazz - The parent class (a Class) Returns an Array of Variables that are constants.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

::getInheritedMethods(clazz) Source

Public: Get all inherited methods. clazz - The parent class (a Class) Returns the inherited methods.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

  • Returns the inherited methods.

Array ::getInheritedProperties(clazz) Source

Public: Get all inherited properties. clazz - The parent class (a Class) Returns an Array of Property types.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

Array ::getInheritedVariables(clazz) Source

Public: Get all inherited variables. clazz - The parent class (a Class) Returns an Array of Variables.

Parameters:

  • (Class) clazzThe parent class (a Class)

Returns:

Public: Get the link to classname. See ::linkTypes. classname - The class name (a String) path - The path prefix (a String) Returns the link (if any)

Parameters:

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

Returns:

  • Returns the link (if any)

String ::linkType(text = '', path) Source

Public: Create browsable links to a known entity. See ::getLink. text - The text to parse (a String) path - The path prefix (a String) Returns the processed text (a String)

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) Source

Public: Creates browsable links for known entities. See ::getLink. text - The text to parse (a String) path - The path prefix (a String) Returns the processed text (a String)

Parameters:

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

Returns:

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

Object ::readStandardJSON() Source

Public: Constructs the documentation links for the standard JS objects. Returns a JSON Object.

Returns:

  • (Object) — Returns a JSON Object.

::resolveDelegation(origin, ref, entity) Source

Public: Resolves delegations; that is, methods whose source content come from another file. These are basically conrefs.

Object ::resolveDoc(data, entity, path) Source

Public: Resolve all tags on class and method json output. data - The JSON data (a Object) entity - The entity context (a Class) path - The path to the asset root (a String) Returns the JSON data with resolved references (a Object)

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) Source

Public: Get a list of all methods from the given mixin name name - The full name of the Mixin Returns the mixin methods as an Array.

Parameters:

  • (Mixin) nameThe full name of the Mixin

Returns:

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

::resolveParamReferences() Source

Public: Resolve parameter references. This goes through all method parameter and see if a param doc references another method. If so, copy over the doc meta data.

Object ::resolveSee(see, entity, path) Source

Public: Resolves curly-bracket reference links. see - The reference object (a Object) entity - The entity context (a Class) path - The path to the asset root (a String) Returns the resolved see (a Object).

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) Source

Public: Search a text to find see links wrapped in curly braces. Examples "To get a list of all customers, go to {Customers.getAll}" text - The text to search (a String) Returns the text with hyperlinks (a String)

Examples:

"To get a list of all customers, go to {Customers.getAll}"

Boolean ::verifyExternalObjReference(name) Source

Public: Checks to make sure that an object that's referenced exists in *standardObjs.json*. Returns a Boolean.

Returns: