C# Class Boo.Lang.Compiler.TypeSystem.GenericMapping

Maps entities onto their constructed counterparts, substituting type arguments for generic parameters.
Show file Open project: boo/boo-lang Class Usage Examples

Public Methods

Method Description
EntityNeedsMapping ( IEntity entity ) : bool
GenericMapping ( TypeSystemServices tss, IMethod constructedMethod, IType arguments ) : System

Constructs a new generic mapping between a generic method and one of its constructed methods.

GenericMapping ( TypeSystemServices tss, IType constructedType, IType arguments ) : System

Constructs a new generic mapping between a generic type and one of its constructed types.

Map ( IConstructor source ) : IConstructor

Maps a constructor on a generic type definition to its constructed counterpart.

Map ( IEntity source ) : IEntity

Maps a type member involving generic arguments to its constructed counterpart, after substituting concrete types for generic arguments.

Map ( IEvent source ) : IEvent

Maps an event on a generic type definition to its constructed counterpart.

Map ( IField source ) : IField

Maps a field on a generic type definition to its constructed counterpart.

Map ( IMethod source ) : IMethod

Maps a method on a generic type definition to its constructed counterpart.

Map ( IParameter source ) : IParameter

Maps a parameter in a generic, constructed or mapped method to its constructed counterpart.

Map ( IParameter sources ) : IParameter[]

Maps an array of parameters in a generic, constructed or mapped method to their constructed counterparts.

Map ( IProperty source ) : IProperty

Maps a property on a generic type definition to its constructed counterpart.

Map ( IType source ) : IType

Maps a type involving generic parameters to its constructed counterpart.

UnMap ( IMethod method ) : IMethod

Gets the method from which the specified method was mapped.

Protected Methods

Method Description
GenericMapping ( TypeSystemServices tss, IGenericParameter parameters, IType arguments ) : System

Constrcuts a new GenericMapping for a specific mapping of generic parameters to type arguments.

MapType ( IType sourceType ) : IType

Maps a type involving generic parameters to the corresponding type after substituting concrete arguments for generic parameters.

If the source type is a generic parameter, it is mapped to the corresponding argument. If the source type is an open generic type using any of the specified generic parameters, it is mapped to a closed constructed type based on the specified arguments.

Private Methods

Method Description
MapAmbiguousEntity ( Ambiguous source ) : IEntity

Method Details

EntityNeedsMapping() public method

public EntityNeedsMapping ( IEntity entity ) : bool
entity IEntity
return bool

GenericMapping() protected method

Constrcuts a new GenericMapping for a specific mapping of generic parameters to type arguments.
protected GenericMapping ( TypeSystemServices tss, IGenericParameter parameters, IType arguments ) : System
tss TypeSystemServices
parameters IGenericParameter The generic parameters that should be mapped.
arguments IType The type arguments to map generic parameters to.
return System

GenericMapping() public method

Constructs a new generic mapping between a generic method and one of its constructed methods.
public GenericMapping ( TypeSystemServices tss, IMethod constructedMethod, IType arguments ) : System
tss TypeSystemServices
constructedMethod IMethod
arguments IType
return System

GenericMapping() public method

Constructs a new generic mapping between a generic type and one of its constructed types.
public GenericMapping ( TypeSystemServices tss, IType constructedType, IType arguments ) : System
tss TypeSystemServices
constructedType IType
arguments IType
return System

Map() public method

Maps a constructor on a generic type definition to its constructed counterpart.
public Map ( IConstructor source ) : IConstructor
source IConstructor
return IConstructor

Map() public method

Maps a type member involving generic arguments to its constructed counterpart, after substituting concrete types for generic arguments.
public Map ( IEntity source ) : IEntity
source IEntity
return IEntity

Map() public method

Maps an event on a generic type definition to its constructed counterpart.
public Map ( IEvent source ) : IEvent
source IEvent
return IEvent

Map() public method

Maps a field on a generic type definition to its constructed counterpart.
public Map ( IField source ) : IField
source IField
return IField

Map() public method

Maps a method on a generic type definition to its constructed counterpart.
public Map ( IMethod source ) : IMethod
source IMethod
return IMethod

Map() public method

Maps a parameter in a generic, constructed or mapped method to its constructed counterpart.
public Map ( IParameter source ) : IParameter
source IParameter
return IParameter

Map() public method

Maps an array of parameters in a generic, constructed or mapped method to their constructed counterparts.
public Map ( IParameter sources ) : IParameter[]
sources IParameter
return IParameter[]

Map() public method

Maps a property on a generic type definition to its constructed counterpart.
public Map ( IProperty source ) : IProperty
source IProperty
return IProperty

Map() public method

Maps a type involving generic parameters to its constructed counterpart.
public Map ( IType source ) : IType
source IType
return IType

MapType() protected method

Maps a type involving generic parameters to the corresponding type after substituting concrete arguments for generic parameters.
If the source type is a generic parameter, it is mapped to the corresponding argument. If the source type is an open generic type using any of the specified generic parameters, it is mapped to a closed constructed type based on the specified arguments.
protected MapType ( IType sourceType ) : IType
sourceType IType
return IType

UnMap() public method

Gets the method from which the specified method was mapped.
public UnMap ( IMethod method ) : IMethod
method IMethod
return IMethod