Class AnnotatedType

A type with additional type information.

Import path

import csharp

Direct supertypes

Known direct subtypes

Fields

Predicates

appliesTo

Holds if this annotated type applies to element e.

appliesToTypeArgument

Holds if this annotated type is the ith type argument of constructed generic ‘g’.

appliesToTypeConstraint

Holds if this annotated type applies to type parameter constraints constraints.

getAnnotations

Gets the type annotation set of this annotated type.

getLocation

Gets the location of this annotated type.

getType

Gets the unannotated type, for example string in string?. Note that this might be a nullable value type (System.Nullable).

getUnderlyingType

Gets the underlying type, for example string in string? or int in int?. This also gets the underlying type of nullable value types (System.Nullable).

isNonNullableRefType

Holds if the type is a non-nullable reference, for example, string in a nullable-enabled context.

isNullableRefType

Holds if the type is a nullable reference, for example string?.

isOut

Holds if the type is an out, for example parameter p in void F(out int p).

isReadonlyRef

Holds if the type is a ref readonly, for example the return type of ref readonly int F().

isRef

Holds if the type is a ref, for example the return type of ref int F().

toString

Gets a textual representation of this annotated type.

Charpred