GenericParamConstraint class

A generic parameter constraint.

Each generic parameter can be constrained to derive from zero or one classes, or to implement zero or more interfaces. This class implements a single constraint. Generic constraints are described in §II.22.21 of the ECMA-335 spec.

Inheritance
Mixed in types

Constructors

GenericParamConstraint(Scope scope, int token, int _parentToken, int _constraintType)
GenericParamConstraint.fromToken(Scope scope, int token)
Creates a generic parameter constraint object from a provided token.
factory

Properties

constraintType TypeDef
The type of the constraint.
no setter
customAttributes Iterable<CustomAttribute>
latefinalinherited
hashCode int
The hash code for this object.
no setterinherited
isGlobal bool
Returns true if the token is marked as global.
no setterinherited
isResolvedToken bool
Returns true if the token maps to an entry in the WinMD database.
no setterinherited
parent GenericParam
The generic parameter that is constrained by this object.
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
token int
A unique identifier for this token in the metadata file.
finalinherited
tokenType TokenType
no setterinherited

Methods

attributeAsString(String attrName) String
Retrieve the string associated with a specific attribute name.
inherited
existsAttribute(String attrName) bool
Whether this object has an attribute matching the given name.
inherited
findAttribute(String attrName) CustomAttribute?
Returns the first attribute matching the given name.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited