Skip to content

class Crystal::GenericClassInstanceType
inherits Crystal::GenericInstanceType

An instantiated generic type, like Array(String).

Included modules

Crystal::DefInstanceContainer Crystal::InstanceVarContainer Crystal::InstanceVarInitializerContainer Crystal::SubclassObservable

Direct known subclasses

Crystal::NamedTupleInstanceType Crystal::PointerInstanceType Crystal::ProcInstanceType Crystal::StaticArrayInstanceType Crystal::TupleInstanceType

Class methods

.new(program, generic_type, superclass, type_vars, generic_nest = nil)

View source

Methods

#abstract?

View source

#abstract?(*args, **options)

View source

#add_subclass(subclass)

View source

#after_initialize

View source

#class?

View source

#common_ancestor(other : VirtualType)

View source

#common_ancestor(other : ClassType | GenericClassInstanceType)

View source

#defs

View source

#defs(*args, **options)

View source

#depth(*args, **options)

View source

#depth

View source

#double_variadic?

View source

#double_variadic?(*args, **options)

View source

#filter_by_responds_to(name)

View source

#generic_nest : Int32

View source

#lookup_new_in_ancestors?(*args, **options)

View source

#lookup_new_in_ancestors?

View source

#macros(*args, **options)

View source

#macros

View source

#metaclass

Returns this type's metaclass, which holds class methods for this type.

View source

#namespace(*args, **options)

View source

#namespace

View source

#restriction_of?(other : GenericClassType, owner, strict = false)

View source

#splat_index

View source

#splat_index(*args, **options)

View source

#struct?

View source

#struct?(*args, **options)

View source

#subclasses : Array(Crystal::Type)

Returns direct subclasses of this type.

View source

#superclass

View source

#superclass(*args, **options)

View source

#superclass : Type?

Returns this type's superclass, or nil if it doesn't have one

View source

#superclass=(superclass : Type?)

View source

#type_desc

View source

#type_desc(*args, **options)

View source

#virtual_type

View source

#virtual_type!

View source