TypeDef class
Represents a TypeDef in the Windows Metadata file
- Inheritance
-
- Object
- TokenObject
- TypeDef
- Mixed-in types
Constructors
- TypeDef(Scope scope, [int token = 0, String name = '', int _attributes = 0, int baseTypeToken = 0, TypeIdentifier? typeSpec])
- Create a typedef.
- TypeDef.fromToken(Scope scope, int token)
-
Creates a typedef object from a provided token.
factory
- TypeDef.fromTypeDefToken(Scope scope, int typeDefToken)
-
Instantiate a typedef from a TypeDef token.
factory
- TypeDef.fromTypeRefToken(Scope scope, int typeRefToken)
-
Instantiate a typedef from a TypeRef token.
factory
- TypeDef.fromTypeSpecToken(Scope scope, int typeSpecToken)
-
Instantiate a typedef from a TypeSpec token.
factory
Properties
- baseTypeToken → int
-
final
- classLayout → ClassLayout
-
Retrieve class layout information.
no setter
-
customAttributes
→ List<
CustomAttribute> -
Enumerate all attributes that this object has.
no setterinherited
- enclosingClass → TypeDef?
-
Returns the type that encloses the current type (if the type is nested).
latefinal
-
events
→ List<
Event> -
Enumerate all events contained within this type.
no setter
-
fields
→ List<
Field> -
Enumerate all fields contained within this type.
no setter
-
genericParams
→ List<
GenericParam> -
Returns a list of generic parameters on this object.
no setterinherited
- guid → String?
-
Get the GUID for this type.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
interfaces
→ List<
TypeDef> -
Enumerate all interfaces that this type implements.
no setter
- isAbstract → bool
-
Returns true if this type may not be directly instantiated.
no setter
- isBeforeFieldInit → bool
-
Returns true if the CLI need not initialize the type before a static
method is called.
no setter
- isClass → bool
-
Returns true if the type is a class.
no setter
- isDelegate → bool
-
Returns true if the type is a delegate.
no setter
- isEnum → bool
-
Returns true if the type is an enumeration.
no setter
- isForwarder → bool
-
Returns true if the type is exported, and a type forwarder.
no setter
- isGlobal → bool
-
Returns true if the token is marked as global.
no setterinherited
- isImported → bool
-
Returns true if the type is imported.
no setter
- isInterface → bool
-
Returns trus if the type is an interface.
no setter
- isNested → bool
-
Returns true if the type is nested in an enclosing class (e.g. a struct
within a struct).
no setter
- isResolvedToken → bool
-
Returns true if the token maps to an entry in the WinMD database.
no setterinherited
- isRTSpecialName → bool
-
Returns true if the name of the item has special significance to the CLI.
no setter
- isSealed → bool
-
Returns true if this type may not have derived types.
no setter
- isSerializable → bool
-
Returns true if the fields of the type are to be serialized into a data
stream.
no setter
- isSpecialName → bool
-
Returns true if the name of the item may have special significance to
tools other than the CLI.
no setter
- isUnion → bool
-
Returns true if the type is a union.
no setter
- isWindowsRuntime → bool
-
Returns true if the type is a Windows Runtime type.
no setter
-
methods
→ List<
Method> -
Enumerate all methods contained within this type.
no setter
- name → String
-
final
- parent → TypeDef?
-
Gets the type referencing this type's superclass (the class this type
inherits from).
no setter
-
properties
→ List<
Property> -
Enumerate all properties contained within this type.
no setter
- reader → IMetaDataImport2
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → Scope
-
The Scope that contains this token.
finalinherited
- stringFormat → StringFormat
-
no setter
- supportedArchitectures → Architecture
-
Get platform architectures on which this type is supported.
no setterinherited
- token → int
-
A unique identifier for this token in the metadata file.
finalinherited
- tokenType → TokenType
-
no setterinherited
- typeLayout → TypeLayout
-
no setter
- typeSpec → TypeIdentifier?
-
final
- typeVisibility → TypeVisibility
-
no setter
Methods
-
attributeAsString(
String attrName) → String -
Retrieve the string associated with a specific attribute name.
inherited
-
existsAttribute(
String attrName) → bool -
Tests whether this object has an attribute matching the given name.
inherited
-
findAttribute(
String attrName) → CustomAttribute? -
Returns the first attribute matching the given attribute name.
inherited
-
findField(
String fieldName) → Field? - Get a field matching the name, if one exists.
-
findMethod(
String methodName) → Method? - Get a method matching the name, if one exists.
-
getCustomGUIDAttribute(
String guidAttributeName) → String? - Gets a named custom attribute that is stored as a GUID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processInterfaceToken(
int token) → TypeDef - Converts an individual interface into a type.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited