C# Класс Boo.Lang.Compiler.TypeSystem.GenericConstructionChecker

Checks a generic construction for several kinds of errors.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GenericConstructionChecker ( TypeSystemServices tss, Node constructionNode, IType typeArguments, CompilerErrorCollection errorCollection ) : System
IncorrectGenerity ( IEntity definition ) : bool

Checks if the number of generic parameters on a specified definition does not match the number of supplied type arguments.

NotGenericDefinition ( IEntity entity ) : bool

Checks if a specified entity is not a generic definition.

ViolatesParameterConstraints ( IEntity definition ) : bool

Checks if the given type arguments violate any constraints declared on the type parameters of a specified generic definition.

ViolatesParameterConstraints ( IGenericParameter parameter, IType argument ) : bool

Checks if a specified type argument violates the constraints declared on a specified type paramter.

Приватные методы

Метод Описание
HasDefaultConstructor ( IType argument ) : bool

Checks whether a given type has a default (parameterless) consructor.

Описание методов

GenericConstructionChecker() публичный Метод

public GenericConstructionChecker ( TypeSystemServices tss, Node constructionNode, IType typeArguments, CompilerErrorCollection errorCollection ) : System
tss TypeSystemServices
constructionNode Node
typeArguments IType
errorCollection CompilerErrorCollection
Результат System

IncorrectGenerity() публичный Метод

Checks if the number of generic parameters on a specified definition does not match the number of supplied type arguments.
public IncorrectGenerity ( IEntity definition ) : bool
definition IEntity
Результат bool

NotGenericDefinition() публичный Метод

Checks if a specified entity is not a generic definition.
public NotGenericDefinition ( IEntity entity ) : bool
entity IEntity
Результат bool

ViolatesParameterConstraints() публичный Метод

Checks if the given type arguments violate any constraints declared on the type parameters of a specified generic definition.
public ViolatesParameterConstraints ( IEntity definition ) : bool
definition IEntity
Результат bool

ViolatesParameterConstraints() публичный Метод

Checks if a specified type argument violates the constraints declared on a specified type paramter.
public ViolatesParameterConstraints ( IGenericParameter parameter, IType argument ) : bool
parameter IGenericParameter
argument IType
Результат bool