Type Info

Classes
Location: igium / Igium.Web / gotype.js / Type Info
Examples: Igium.Web Examples

System.Type Class

Public Methods

Member Test Description
is(t: Function): Boolean N Returns true if this type represents either of the same native type as the native type t or the same gotype as the gotype t, else returns false, with the following exceptions: typeinfo(o).is(Object) == true for every o that is a gotype or a gotype instance; typeinfo(f1).is(f1) == true for every f1 that is a non-gotype-constructor function and f2 that is function
getAttributeCount(): Number N see Attributes
hasAttribute(attribute: System.Type): Boolean N see Attributes
getAttributeAsFunctions(attribute: System.Type): [Function] N see Attributes
getAttributeAsObjects(attribute: System.Type): [{}] N see Attributes
getAttributeFirstFunction(attribute: System.Type): Function N see Attributes
getAttributeFirstObject(attribute: System.Type): {} N see Attributes
getAttributeLastFunction(attribute: System.Type): Function N see Attributes
getAttributeLastObject(attribute: System.Type): {} N see Attributes

Public Fields

Member Has Value Test Description
typeId: Number ALWAYS N A unique type runtime identifier
typeName: String ALWAYS N The name of the type
namespaceName: String Only if the type is defined as part of a named namespace N The name of the namespace where the type is declared
fullName: String ALWAYS N The full name of the type in the form <namespaceName>.<typeId>, e.g. "System.Object"
baseType: System.Type Only if has a base type N A reference to the base type
isNativeType: Boolean ALWAYS N true if the type instance represents a native JavaScript type, else false
isAttributeType: Boolean ALWAYS N true if the type is an attribute type, else false
isEnumType: Boolean ALWAYS N true if the type is an enum type, else false
constructors.instanceConstructor: System.TypeEntry ALWAYS Y Reflection info about the instance constructor
constructors.staticConstructor: System.TypeEntry Only if a static constructor is defined N Reflection info about the static constructor
instanceMethods.list: [System.TypeEntry] ALWAYS N A list of reflection infos about all instance methods (property accessors and events are NOT included)
instanceMethods.map: [<name: String>: System.TypeEntry] ALWAYS N A dictionary of reflection infos about all instance methods (property accessors and events are NOT included)
staticMethods.list: [System.TypeEntry] ALWAYS N A list of reflection infos about all static methods (constructors, property accessors and events are NOT included)
staticMethods.map: [<name: String>: System.TypeEntry] ALWAYS N A dictionary of reflection infos about all static methods (constructors, property accessors and events are NOT included)
instanceProperties.list: [{name: String, getter: System.TypeEntry, setter: System.TypeEntry, isStatic: Boolean}] ALWAYS N A list of reflection infos about all instance properties
instanceProperties.map: [<name: String>: {name: String, getter: System.TypeEntry, setter: System.TypeEntry, isStatic: Boolean}] ALWAYS N A dictionary of reflection infos about all instance properties
staticProperties.list: [{name: String, getter: System.TypeEntry, setter: System.TypeEntry, isStatic: Boolean}] ALWAYS N A list of reflection infos about all static properties
staticProperties.map: [<name: String>: {name: String, getter: System.TypeEntry, setter: System.TypeEntry, isStatic: Boolean}] ALWAYS N A dictionary of reflection infos about all static properties
instanceFields.list: [System.TypeEntry] ALWAYS N A list of reflection infos about all instance fields
instanceFields.map: [<name: String>: System.TypeEntry] ALWAYS N A dictionary of reflection infos about all instance fields
staticFields.list: [System.TypeEntry] ALWAYS N A list of reflection infos about all static fields
staticFields.map: [<name: String>: System.TypeEntry] ALWAYS N A dictionary of reflection infos about all static fields
instanceEvents.list: [System.TypeEntry] ALWAYS N A list of reflection infos about all instance events
instanceEvents.map: [<name: String>: System.TypeEntry] ALWAYS N A dictionary of reflection infos about all instance events
staticEvents.list: [System.TypeEntry] ALWAYS N A list of reflection infos about all static events
staticEvents.map: [<name: String>: System.TypeEntry] ALWAYS N A dictionary of reflection infos about all static events

Private Fields

Member Has Value Test Description
attributes: [<name: String>: [Function]] ALWAYS n/a An internal collection containing the type attributes; use the pulbic typeinfo(<Type>).(get/has)Attribute*() api to examine type's attributes

System.TypeEntry Class

Public Fields

Member Test Description
type: System.Type N A reference to the containing type
name: String N The name of the entry; for constructors matches the type name
entry: any N For constructors, methods, property accessors: the declaring function; for events: the multicast function; for fields: the declaring object.

Private Fields

Member Has Value Test Description
attributes: [<name: String>: [Function]] ALWAYS n/a An internal collection containing the type entry's attributes; use the pulbic <typeEntry>.(get/has)Attribute*() api to examine type entry's attributes

Public Methods

Member Test Description
getAttributeCount(): Number N see Attributes
hasAttribute(attribute: System.Type): Boolean N see Attributes
getAttributeAsFunctions(attribute: System.Type): [Function] N see Attributes
getAttributeAsObjects(attribute: System.Type): [{}] N see Attributes
getAttributeFirstFunction(attribute: System.Type): Function N see Attributes
getAttributeFirstObject(attribute: System.Type): {} N see Attributes
getAttributeLastFunction(attribute: System.Type): Function N see Attributes
getAttributeLastObject(attribute: System.Type): {} N see Attributes

Unit tests: TODO