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

Наследование: AbstractCompilerComponent
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AreOfSameGenerity ( IMethod lhs, IMethod rhs ) : bool
CheckGenericConstruction ( Node node, IEntity definition, IType argumentTypes, CompilerErrorCollection errors ) : bool

Checks whether a given set of arguments can be used to construct a generic type or method from a specified definition.

ConstructEntity ( Node constructionNode, IEntity definition, IType typeArguments ) : IEntity

Constructs an entity from a generic definition and arguments, after ensuring the construction is valid.

FindConstructedType ( IType type, IType definition ) : IType

Finds a single constructed occurance of a specified generic definition in the specified type's inheritence hierarchy.

FindConstructedTypes ( IType type, IType definition ) : IEnumerable

Finds types constructed from the specified definition in the specified type's interfaces and base types.

GenericsServices ( CompilerContext context ) : System
GetGenericParameters ( IEntity definition ) : IGenericParameter[]

Gets the generic parameters associated with a generic type or generic method definition.

GetMethodGenerity ( IMethod method ) : int
GetTypeGenerity ( IType type ) : int

Determines the number of open generic parameters in the specified type.

InferMethodGenericArguments ( IMethod method, Boo.Lang.Compiler.Ast.ExpressionCollection arguments ) : IType[]

Attempts to infer the generic parameters of a method from a set of arguments.

IsGenericMethod ( IEntity entity ) : bool
IsGenericParameter ( IEntity entity ) : bool
IsGenericType ( IEntity entity ) : bool
IsOpenGenericType ( IType type ) : bool

Determines whether a specified type is an open generic type - that is, if it contains generic parameters.

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

Метод Описание
ConstructAmbiguousEntity ( Node constructionNode, Ambiguous ambiguousDefinition, IType typeArguments ) : IEntity

Constructs generic entities out of an ambiguous definition.

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

AreOfSameGenerity() публичный статический Метод

public static AreOfSameGenerity ( IMethod lhs, IMethod rhs ) : bool
lhs IMethod
rhs IMethod
Результат bool

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

Checks whether a given set of arguments can be used to construct a generic type or method from a specified definition.
public CheckGenericConstruction ( Node node, IEntity definition, IType argumentTypes, CompilerErrorCollection errors ) : bool
node Node
definition IEntity
argumentTypes IType
errors CompilerErrorCollection
Результат bool

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

Constructs an entity from a generic definition and arguments, after ensuring the construction is valid.
public ConstructEntity ( Node constructionNode, IEntity definition, IType typeArguments ) : IEntity
constructionNode Node The node in which construction occurs.
definition IEntity The generic definition entity.
typeArguments IType The generic type arguments to substitute for generic parameters.
Результат IEntity

FindConstructedType() публичный статический Метод

Finds a single constructed occurance of a specified generic definition in the specified type's inheritence hierarchy.
public static FindConstructedType ( IType type, IType definition ) : IType
type IType
definition IType
Результат IType

FindConstructedTypes() публичный статический Метод

Finds types constructed from the specified definition in the specified type's interfaces and base types.
public static FindConstructedTypes ( IType type, IType definition ) : IEnumerable
type IType The type in whose hierarchy to search for constructed types.
definition IType The generic type definition whose constructed versions to search for.
Результат IEnumerable

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

public GenericsServices ( CompilerContext context ) : System
context CompilerContext
Результат System

GetGenericParameters() публичный статический Метод

Gets the generic parameters associated with a generic type or generic method definition.
public static GetGenericParameters ( IEntity definition ) : IGenericParameter[]
definition IEntity
Результат IGenericParameter[]

GetMethodGenerity() публичный статический Метод

public static GetMethodGenerity ( IMethod method ) : int
method IMethod
Результат int

GetTypeGenerity() публичный статический Метод

Determines the number of open generic parameters in the specified type.
public static GetTypeGenerity ( IType type ) : int
type IType
Результат int

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

Attempts to infer the generic parameters of a method from a set of arguments.
public InferMethodGenericArguments ( IMethod method, Boo.Lang.Compiler.Ast.ExpressionCollection arguments ) : IType[]
method IMethod
arguments Boo.Lang.Compiler.Ast.ExpressionCollection
Результат IType[]

IsGenericMethod() публичный статический Метод

public static IsGenericMethod ( IEntity entity ) : bool
entity IEntity
Результат bool

IsGenericParameter() публичный статический Метод

public static IsGenericParameter ( IEntity entity ) : bool
entity IEntity
Результат bool

IsGenericType() публичный статический Метод

public static IsGenericType ( IEntity entity ) : bool
entity IEntity
Результат bool

IsOpenGenericType() публичный статический Метод

Determines whether a specified type is an open generic type - that is, if it contains generic parameters.
public static IsOpenGenericType ( IType type ) : bool
type IType
Результат bool