Attributes

Classes
Location: igium / Igium.Web / gotype.js / Attributes
Examples: Igium.Web Examples

System.Type and System.TypeEntry Classes: Attribute API

The following members are instance members of every System.Type instance (acquired through a typeinfo() call) and every System.TypeEntry instance (for Ex. typeinfo(System.Type).staticMethods["isNU"] is an instance of System.TypeEntry). Attributes are referenced by type, e.g. typeinfo(<Type>).hasAttribute(typeinfo(Attribute))).

Public Fields

Member Test Description
map: [<name: String>: [Function]] N A hash table containing all attributes applied to the type def entry; an array of attribute functions is specified for every attribute name, reflecting the fact that an attribute can occure multiple times for the same type def entry
list: [Function] N A function list containing all attributes applied to the type def entry

Public Methods

Member Test Description
getAttributeCount(): Number N returns the total number of attributes applied to the type or type member
hasAttribute(attribute: System.Type): Boolean N Tests whether the type or type member has the attribute applied at least once
getAttributeAsFunctions(attribute: System.Type): [Function] N Looks up a type's or type member's attribute; returns null if the attribute has not been applied in the type def entry, else returns an array of attribute funcions
getAttributeAsObjects(attribute: System.Type): [{}] N Looks up a type's or type member's attribute instance; returns null if the attribute has not been applied in the type def entry, else returns an array of attribute instances
getAttributeFirstFunction(attribute: System.Type): Function N Looks up a type's or type member's first attribute function
getAttributeFirstObject(attribute: System.Type): {} N Looks up a type's or type member's first attribute instance
getAttributeLastFunction(attribute: System.Type): Function N Looks up a type's or type member's last attribute function
getAttributeLastObject(attribute: System.Type): {} N Looks up a type's or type member's last attribute instance

Unit tests: TODO