Type (class)
public abstract sealed Type {inherits TypeInfo}
Package: CURL.LANGUAGE.CORE-TYPES
Direct Known Subclasses: NamedType, ProcType

The abstract representation of a Curl® type.


Properties
can-be-null?:true if this type admits null as a value. Otherwise false.
field public-get hidden-set Type.can-be-null?:bool
class?:true if this type is a class (has methods). Otherwise false.
accessor public final inline Type.class?:bool
keyword-type-parameters:The keyword arguments for this type as an array of KeywordTypeParameter objects.
accessor public sealed Type.keyword-type-parameters:{FastArray-of KeywordTypeParameter}
kind-of-units:The KindOfUnits (physical or graphic dimensions) represented by this type. Interesting only if this type is numeric.
accessor public Type.kind-of-units:KindOfUnits
non-null-variant:The non-null variant of this type.
accessor public final Type.non-null-variant:#Type
null-variant:The null variant of this type.
accessor public final Type.null-variant:#Type
positional-type-parameters:The positional arguments for this type as an array of PositionalTypeParameter objects.
accessor public sealed Type.positional-type-parameters:{FastArray-of PositionalTypeParameter}
primitive?:true if this type is primitive: numeric, char, bool, any, or void. Otherwise false.
accessor public final Type.primitive?:bool
takes-rest-args?:true if this is a ProcType that accepts rest (...) arguments. Otherwise false.
field public-get hidden-set Type.takes-rest-args?:bool
template:The template for this type if it is parameterized. Otherwise null.
accessor public sealed Type.template:#ParameterizedTypeTemplate
Properties inherited from TypeInfo: abstract?, final?, name, package, parameterized-class?, public?, sealed?, serializable?, shared?, value-class?
Methods
subtype-of?:Determines if self is a subtype of a specified Type
public abstract sealed {Type.subtype-of? t:Type}:bool
Methods inherited from Object: object-describe, object-describe-for-debugging, object-serialize

Property Details
can-be-null? (field)
public-get hidden-set Type.can-be-null?:bool

true if this type admits null as a value. Otherwise false.

Description

This is true for the type #T, read T or null.

Notes

See Type.non-null-variant and Type.null-variant.


class? (accessor)
accessor public final inline Type.class?:bool

true if this type is a class (has methods). Otherwise false.

Notes

See ClassType.


keyword-type-parameters (accessor)
accessor public sealed Type.keyword-type-parameters:{FastArray-of KeywordTypeParameter}

The keyword arguments for this type as an array of KeywordTypeParameter objects.



kind-of-units (accessor)
accessor public Type.kind-of-units:KindOfUnits

The KindOfUnits (physical or graphic dimensions) represented by this type. Interesting only if this type is numeric.

Notes

See NumericType.


non-null-variant (accessor)
accessor public final Type.non-null-variant:#Type

The non-null variant of this type.

Description

The non-null variant of #T is T.


null-variant (accessor)
accessor public final Type.null-variant:#Type

The null variant of this type.

Description

The null variant of T is #T. Otherwise it is T.


positional-type-parameters (accessor)
accessor public sealed Type.positional-type-parameters:{FastArray-of PositionalTypeParameter}

The positional arguments for this type as an array of PositionalTypeParameter objects.



primitive? (accessor)
accessor public final Type.primitive?:bool

true if this type is primitive: numeric, char, bool, any, or void. Otherwise false.



takes-rest-args? (field)
public-get hidden-set Type.takes-rest-args?:bool

true if this is a ProcType that accepts rest (...) arguments. Otherwise false.

Notes

See ProcType.rest-args-type.


template (accessor)
accessor public sealed Type.template:#ParameterizedTypeTemplate

The template for this type if it is parameterized. Otherwise null.

Notes

See ParameterizedType.


Method Details
subtype-of? (method)
public abstract sealed {Type.subtype-of? t:Type}:bool

Determines if self is a subtype of a specified Type

t: The Type with which you want to compare self.

Returns

A bool. This method returns true if self is a subtype t. Otherwise, it returns false.

Description

self is a subtype of t if any instance of the self type can be stored in a variable of type t without requiring a change of representation.

Notes

Note the following:

Notes

Also see documentation for the isa operator.