TypeDef class final
Represents a row in the TypeDef
metadata table.
The fields are populated by interpreting the binary metadata as specified in
ECMA-335 §II.22.37
.
The TypeDef
table has the following columns:
- Flags (4-byte bitmask of TypeAttributes)
- TypeName (String Heap Index)
- TypeNamespace (String Heap Index)
- Extends (TypeDefOrRef Coded Index)
- FieldList (Field Table Index)
- MethodList (MethodDef Table Index)
- Inheritance
- Mixed-in types
- Available extensions
Constructors
- TypeDef.new(MetadataIndex metadataIndex, int readerIndex, int index)
Properties
-
attributes
→ List<
CustomAttribute> -
Enumerates all CustomAttributes associated with this row.
latefinalinherited
- category → TypeCategory
-
The category of the type, which could be a class, interface, enum, struct,
delegate, or attribute.
latefinal
- classLayout → ClassLayout?
-
The class layout associated with the type, if any.
latefinal
- enclosingClass → TypeDef?
-
The type that encloses the current type, if the type is nested.
latefinal
-
events
→ List<
Event> -
The list of events defined in the type, if any.
latefinal
- extends$ → TypeDefOrRef?
-
The type that the current type extends, or
null
if there is no base type.latefinal -
fields
→ List<
Field> -
The list of fields defined in the type, if any.
latefinal
- flags → TypeAttributes
-
Type attributes that represents various attributes of the type, such as
visibility, layout, and semantics.
latefinal
-
generics
→ List<
GenericParam> -
The list of generic parameters defined for the type, if any.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
The index of the row within the metadata table, starting from zero.
finalinherited
-
interfaceImpls
→ List<
InterfaceImpl> -
The list of interfaces implemented by the type, if any.
latefinal
- isNested → bool
-
Whether the type is nested, i.e., defined under another type.
latefinal
- metadataIndex → MetadataIndex
-
The metadata index for the current row.
finalinherited
-
methodImpls
→ List<
MethodImpl> -
The list of method implementations defined for the type, if any.
latefinal
-
methods
→ List<
MethodDef> -
The list of methods defined in the type, if any.
latefinal
- name → String
-
The name of the type.
latefinal
- namespace → String
-
The namespace of the type.
latefinal
-
nestedTypes
→ List<
TypeDef> -
The nested types defined under the type, if any.
latefinal
-
properties
→ List<
Property> -
The list of properties defined in the type, if any.
latefinal
- reader → MetadataReader
-
Retrieves the MetadataReader for the current row based on the
readerIndex.
no setterinherited
- readerIndex → int
-
The reader index used to access a specific metadata reader.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringFormat → StringFormat
-
The string format used by the type.
latefinal
- table → MetadataTable
-
The metadata table associated with this row.
no setteroverride
- token → int
-
The metadata token for this row, which is a unique identifier for the row
within the metadata table.
no setteroverride
- typeLayout → TypeLayout
-
The layout of the type.
latefinal
- typeSemantics → TypeSemantics
-
The semantics of the type.
latefinal
- typeVisibility → TypeVisibility
-
The visibility of the type.
latefinal
Methods
-
attributeAsString(
String attributeName) → String? -
Retrieves the first argument of the custom attribute with the given
attributeName
, if it is a string.inherited -
decode<
T extends CodedIndex> (int column) → T -
Decodes a CodedIndex from the specified
column
.inherited -
findAttribute(
String name) → CustomAttribute -
Finds the first CustomAttribute with the specified
name
.inherited -
findEvent(
String name) → Event -
Available on TypeDef, provided by the TypeDefExtension extension
Finds an event by itsname
. -
findField(
String name) → Field -
Available on TypeDef, provided by the TypeDefExtension extension
Finds a field by itsname
. -
findMethod(
String name) → MethodDef -
Available on TypeDef, provided by the TypeDefExtension extension
Finds a method by itsname
. -
findProperty(
String name) → Property -
Available on TypeDef, provided by the TypeDefExtension extension
Finds a property by itsname
. -
getEqualRange<
L extends Row> (int column, int value) → Iterable< L> -
Retrieves rows of
L
with a matchingvalue
in the specifiedcolumn
.inherited -
getList<
R extends Row> (int column) → Iterable< R> -
Retrieves rows of
R
from the specifiedcolumn
.inherited -
getParentRow<
P extends Row> (int column) → P -
Retrieves the parent row of the current row, based on the
P
and thecolumn
.inherited -
hasAttribute(
String name) → bool -
Determines whether an attribute with the specified
name
is attached to this row.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readBlob(
int column) → Blob -
Reads a Blob from the specified
column
.inherited -
readGuid(
int column) → Guid -
Reads a Guid from the specified
column
.inherited -
readRow<
R extends Row> (int column) → R -
Reads a related row of type
R
from the specifiedcolumn
.inherited -
readString(
int column) → String -
Reads a string from the specified
column
.inherited -
readUint(
int column) → int -
Reads an unsigned integer from the specified
column
.inherited -
readUint16(
int column, [int offset = 0]) → int -
Reads an unsigned 16-bit integer from the specified
column
, with an optionaloffset
.inherited -
readUint32(
int column, [int offset = 0]) → int -
Reads an unsigned 32-bit integer from the specified
column
, with an optionaloffset
.inherited -
readUint64(
int column, [int offset = 0]) → int -
Reads an unsigned 64-bit integer from the specified
column
, with an optionaloffset
.inherited -
readUint8(
int column, [int offset = 0]) → int -
Reads an unsigned 8-bit integer from the specified
column
, with an optionaloffset
.inherited -
toString(
) → String -
A string representation of this object.
override
-
tryFindAttribute(
String name) → CustomAttribute? -
Attempts to find the first CustomAttribute with the specified
name
.inherited -
tryFindEvent(
String name) → Event? -
Available on TypeDef, provided by the TypeDefExtension extension
Attempts to find an event by itsname
. -
tryFindField(
String name) → Field? -
Available on TypeDef, provided by the TypeDefExtension extension
Attempts to find a field by itsname
. -
tryFindMethod(
String name) → MethodDef? -
Available on TypeDef, provided by the TypeDefExtension extension
Attempts to find a method by itsname
. -
tryFindProperty(
String name) → Property? -
Available on TypeDef, provided by the TypeDefExtension extension
Attempts to find a property by itsname
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited