C# 클래스 Boo.Lang.Compiler.TypeSystem.Generics.GenericsServices

상속: AbstractCompilerComponent
파일 보기 프로젝트 열기: boo-lang/boo 1 사용 예제들

공개 메소드들

메소드 설명
AreOfSameGenerity ( IMethod lhs, IMethod rhs ) : bool
CheckGenericConstruction ( IEntity definition, IType typeArguments ) : bool

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

CheckGenericConstruction ( Node node, IEntity definition, IType typeArguments, bool reportErrors ) : 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.

FindGenericParameters ( IType type ) : IEnumerable

Yields the generic parameters used in a (bound) type.

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

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

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

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

GetTypeGenerity ( IType type ) : int

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

HasConstructedType ( IType type, IType definition ) : bool

Checks that at least one constructed occurence of a specified generic definition is present in the specified type's inheritance hierarchy.

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

Validates and constructs generic entities out of an ambiguous generic definition entity.

MakeGenericEntity ( IEntity definition, IType typeArguments ) : IEntity

메소드 상세

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 ( IEntity definition, IType typeArguments ) : bool
definition IEntity
typeArguments IType
리턴 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 typeArguments, bool reportErrors ) : bool
node Node
definition IEntity
typeArguments IType
reportErrors bool
리턴 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 The type in whose hierarchy to search for constructed types.
definition IType The generic type definition whose constructed versions to search for.
리턴 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

FindGenericParameters() 공개 정적인 메소드

Yields the generic parameters used in a (bound) type.
public static FindGenericParameters ( IType type ) : IEnumerable
type IType
리턴 IEnumerable

GenericsServices() 공개 메소드

public GenericsServices ( ) : System
리턴 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

GetTypeGenericDepth() 공개 정적인 메소드

Determines the number of total generic parameters in the specified type.
public static GetTypeGenericDepth ( IType type ) : int
type IType
리턴 int

GetTypeGenerity() 공개 정적인 메소드

Determines the number of open generic parameters in the specified type.
public static GetTypeGenerity ( IType type ) : int
type IType
리턴 int

HasConstructedType() 공개 정적인 메소드

Checks that at least one constructed occurence of a specified generic definition is present in the specified type's inheritance hierarchy.
public static HasConstructedType ( IType type, IType definition ) : bool
type IType The type in whose hierarchy to search for constructed type.
definition IType The generic type definition whose constructed versions to search for.
리턴 bool

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