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

Datei anzeigen Open project: boo-lang/boo Class Usage Examples

Public Properties

Property Type Description
ArrayType IType
BoolType IType
BuiltinsType IType
ByteType IType
CharType IType
ConditionalAttribute IType
DateTimeType IType
DecimalType IType
DelegateType IType
DoubleType IType
DuckType IType
EnumType IType
ErrorEntity IType
HashType IType
IAstGeneratorMacroType IType
IAstMacroType IType
ICallableType IType
ICollectionGenericType IType
ICollectionType IType
IDisposableType IType
IEnumerableGenericType IType
IEnumerableType IType
IEnumeratorGenericType IType
IEnumeratorType IType
IListGenericType IType
IListType IType
IQuackFuType IType
IntPtrType IType
IntType IType
ListType IType
LongType IType
MulticastDelegateType IType
ObjectArrayType IArrayType
ObjectType IType
RegexType IType
RuntimeServicesType IType
SByteType IType
ShortType IType
SingleType IType
StringType IType
SystemAttribute IType
TimeSpanType IType
TypeType IType
UIntPtrType IType
UIntType IType
ULongType IType
UShortType IType
ValueTypeType IType
VoidType IType

Public Methods

Method Description
AddCompilerGeneratedType ( Boo.Lang.Compiler.Ast.TypeDefinition type ) : void
CanBeExplicitlyCastToPrimitiveNumber ( IType type ) : bool
CanBeReachedByDownCastOrPromotion ( IType expectedType, IType actualType ) : bool
CanBeReachedByPromotion ( IType expectedType, IType actualType ) : bool
CanBeReachedFrom ( IType expectedType, IType actualType ) : bool
CanBeReachedFrom ( IType expectedType, IType actualType, bool &byDowncast ) : bool
CanBeReachedFrom ( IType expectedType, IType actualType, bool considerExplicitConversionOperators, bool &byDowncast ) : bool
CheckOverrideSignature ( IMethod impl, IMethod baseMethod ) : bool
CheckOverrideSignature ( IParameter implParameters, IParameter baseParameters ) : bool
ContainsMethodsOnly ( ICollection members ) : bool
FindExplicitConversionOperator ( IType fromType, IType toType ) : IMethod
FindImplicitConversionOperator ( IType fromType, IType toType ) : IMethod
GetAccess ( IAccessibleMember member ) : TypeMemberModifiers
GetCallableType ( CallableSignature signature ) : ICallableType
GetCallableType ( IMethodBase method ) : ICallableType
GetCompilerGeneratedTypesModule ( ) : Module
GetConcreteCallableType ( Node sourceNode, AnonymousCallableType anonymousType ) : IType
GetConcreteCallableType ( Node sourceNode, CallableSignature signature ) : IType
GetConcreteExpressionType ( Expression expression ) : IType
GetDefaultConstructor ( IType type ) : IConstructor
GetDefaultMember ( IType type ) : IEntity
GetEntity ( Node node ) : IEntity
GetEnumeratorItemType ( IType iteratorType ) : IType
GetExpressionType ( Expression node ) : IType
GetGenericEnumerableItemType ( IType iteratorType ) : IType
GetMostGenericType ( Boo.Lang.Compiler.Ast.ExpressionCollection args ) : IType
GetMostGenericType ( IType current, IType candidate ) : IType
GetNullableUnderlyingType ( IType type ) : IType
GetOverriddenSignature ( IMethod baseMethod, IMethod impl ) : CallableSignature
GetPromotedNumberType ( IType left, IType right ) : IType
GetReferencedType ( Expression typeref ) : IType
GetSignature ( IEntityWithParameters method ) : string
GetStringExceptionConstructor ( ) : IConstructor
GetType ( Node node ) : IType
IsAnyType ( IType type ) : bool

Returns true if the type can be either a reference type or a value type. Currently it returns true only for an unconstrained generic parameter type.

IsAttribute ( IType type ) : bool
IsBuiltin ( IEntity entity ) : bool
IsCallable ( IType type ) : bool
IsCallableTypeAssignableFrom ( ICallableType lhs, IType rhs ) : bool
IsDuckType ( IType type ) : bool
IsDuckTyped ( Expression expression ) : bool
IsError ( Expression node ) : bool
IsError ( IEntity entity ) : bool
IsErrorAny ( Boo.Lang.Compiler.Ast.ExpressionCollection collection ) : bool
IsFloatingPointNumber ( IType type ) : bool
IsGenericGeneratorReturnType ( IType returnType ) : bool
IsIntegerNumber ( IType type ) : bool
IsIntegerOrBool ( IType type ) : bool
IsLiteralPrimitive ( IType type ) : bool
IsMacro ( IType type ) : bool
IsNullable ( IType type ) : bool
IsNumber ( IType type ) : bool
IsNumberOrBool ( IType type ) : bool
IsPointerCompatible ( IType type ) : bool
IsPrimitive ( string name ) : bool
IsPrimitiveNumber ( IType type ) : bool
IsQuackBuiltin ( Expression node ) : bool
IsQuackBuiltin ( IEntity entity ) : bool
IsReadOnlyField ( IField field ) : bool
IsReferenceType ( IType type ) : bool

Returns true if the type is a reference type or a generic parameter type that is constrained to represent a reference type.

IsSignedNumber ( IType type ) : bool
IsSystemObject ( IType type ) : bool

checks if the passed type will be equivalente to System.Object in runtime (accounting for the presence of duck typing).

IsUnknown ( Expression node ) : bool
IsUnknown ( IType type ) : bool
IsValidException ( IType type ) : bool
KnowsQuackFu ( IType type ) : bool
Map ( ConstructorInfo constructor ) : IConstructor
Map ( MemberInfo members ) : IEntity
Map ( MethodInfo method ) : IMethod
Map ( ParameterInfo parameters ) : IParameter[]
Map ( Type type ) : IType
MapToConcreteExpressionTypes ( Boo.Lang.Compiler.Ast.ExpressionCollection items ) : void
MapWildcardType ( IType type ) : IType
ResolvePrimitive ( string name ) : IEntity
SizeOf ( IType type ) : int
TypeSystemServices ( ) : System
TypeSystemServices ( CompilerContext context ) : System

Protected Methods

Method Description
AddBuiltin ( BuiltinFunction function ) : void
AddLiteralPrimitiveType ( string name, IType type ) : void
AddPrimitiveType ( string name, IType type ) : void
PrepareBuiltinFunctions ( ) : void
PreparePrimitives ( ) : void

Private Methods

Method Description
CanBeReachedByPromotionImpl ( IType expectedType, IType actualType ) : bool
ClearScopeDependentMemoizedFunctions ( ) : void
CompatibleReturnTypes ( CallableSignature lvalue, CallableSignature rvalue ) : bool
DowncastPermissions ( ) : DowncastPermissions
FindConversionOperator ( string name, IType fromType, IType toType ) : IMethod
FindConversionOperator ( string name, IType fromType, IType toType, IEnumerable candidates ) : IMethod
FindExtension ( IType fromType, string name ) : IEntity[]
GetEnumeratorItemTypeFromAttribute ( IType iteratorType ) : IType
GetExternalEnumeratorItemType ( IType iteratorType ) : IType
GetOptionalEntity ( Node node ) : IEntity
InStrictMode ( ) : bool
InvalidNode ( Node node ) : void
IsAssignableFrom ( IType expectedType, IType actualType ) : bool
IsCallableType ( IType type ) : bool
IsConversionOperator ( IMethod method, IType fromType, IType toType ) : bool
IsSignedInteger ( IType right ) : bool
IsUnsignedInteger ( IType type ) : bool
NewModule ( string nameSpace ) : Module
NewModule ( string nameSpace, string moduleName ) : Module
TypeSystemProvider ( ) : IReflectionTypeSystemProvider

Method Details

AddBuiltin() protected method

protected AddBuiltin ( BuiltinFunction function ) : void
function BuiltinFunction
return void

AddCompilerGeneratedType() public method

public AddCompilerGeneratedType ( Boo.Lang.Compiler.Ast.TypeDefinition type ) : void
type Boo.Lang.Compiler.Ast.TypeDefinition
return void

AddLiteralPrimitiveType() protected method

protected AddLiteralPrimitiveType ( string name, IType type ) : void
name string
type IType
return void

AddPrimitiveType() protected method

protected AddPrimitiveType ( string name, IType type ) : void
name string
type IType
return void

CanBeExplicitlyCastToPrimitiveNumber() public method

public CanBeExplicitlyCastToPrimitiveNumber ( IType type ) : bool
type IType
return bool

CanBeReachedByDownCastOrPromotion() public method

public CanBeReachedByDownCastOrPromotion ( IType expectedType, IType actualType ) : bool
expectedType IType
actualType IType
return bool

CanBeReachedByPromotion() public method

public CanBeReachedByPromotion ( IType expectedType, IType actualType ) : bool
expectedType IType
actualType IType
return bool

CanBeReachedFrom() public method

public CanBeReachedFrom ( IType expectedType, IType actualType ) : bool
expectedType IType
actualType IType
return bool

CanBeReachedFrom() public method

public CanBeReachedFrom ( IType expectedType, IType actualType, bool &byDowncast ) : bool
expectedType IType
actualType IType
byDowncast bool
return bool

CanBeReachedFrom() public method

public CanBeReachedFrom ( IType expectedType, IType actualType, bool considerExplicitConversionOperators, bool &byDowncast ) : bool
expectedType IType
actualType IType
considerExplicitConversionOperators bool
byDowncast bool
return bool

CheckOverrideSignature() public static method

public static CheckOverrideSignature ( IMethod impl, IMethod baseMethod ) : bool
impl IMethod
baseMethod IMethod
return bool

CheckOverrideSignature() public static method

public static CheckOverrideSignature ( IParameter implParameters, IParameter baseParameters ) : bool
implParameters IParameter
baseParameters IParameter
return bool

ContainsMethodsOnly() public static method

public static ContainsMethodsOnly ( ICollection members ) : bool
members ICollection
return bool

FindExplicitConversionOperator() public method

public FindExplicitConversionOperator ( IType fromType, IType toType ) : IMethod
fromType IType
toType IType
return IMethod

FindImplicitConversionOperator() public method

public FindImplicitConversionOperator ( IType fromType, IType toType ) : IMethod
fromType IType
toType IType
return IMethod

GetAccess() public static method

public static GetAccess ( IAccessibleMember member ) : TypeMemberModifiers
member IAccessibleMember
return TypeMemberModifiers

GetCallableType() public method

public GetCallableType ( CallableSignature signature ) : ICallableType
signature CallableSignature
return ICallableType

GetCallableType() public method

public GetCallableType ( IMethodBase method ) : ICallableType
method IMethodBase
return ICallableType

GetCompilerGeneratedTypesModule() public method

public GetCompilerGeneratedTypesModule ( ) : Module
return Boo.Lang.Compiler.Ast.Module

GetConcreteCallableType() public method

public GetConcreteCallableType ( Node sourceNode, AnonymousCallableType anonymousType ) : IType
sourceNode Node
anonymousType AnonymousCallableType
return IType

GetConcreteCallableType() public method

public GetConcreteCallableType ( Node sourceNode, CallableSignature signature ) : IType
sourceNode Node
signature CallableSignature
return IType

GetConcreteExpressionType() public method

public GetConcreteExpressionType ( Expression expression ) : IType
expression Boo.Lang.Compiler.Ast.Expression
return IType

GetDefaultConstructor() public method

public GetDefaultConstructor ( IType type ) : IConstructor
type IType
return IConstructor

GetDefaultMember() public method

public GetDefaultMember ( IType type ) : IEntity
type IType
return IEntity

GetEntity() public static method

public static GetEntity ( Node node ) : IEntity
node Node
return IEntity

GetEnumeratorItemType() public method

public GetEnumeratorItemType ( IType iteratorType ) : IType
iteratorType IType
return IType

GetExpressionType() public static method

public static GetExpressionType ( Expression node ) : IType
node Boo.Lang.Compiler.Ast.Expression
return IType

GetGenericEnumerableItemType() public method

public GetGenericEnumerableItemType ( IType iteratorType ) : IType
iteratorType IType
return IType

GetMostGenericType() public method

public GetMostGenericType ( Boo.Lang.Compiler.Ast.ExpressionCollection args ) : IType
args Boo.Lang.Compiler.Ast.ExpressionCollection
return IType

GetMostGenericType() public method

public GetMostGenericType ( IType current, IType candidate ) : IType
current IType
candidate IType
return IType

GetNullableUnderlyingType() public method

public GetNullableUnderlyingType ( IType type ) : IType
type IType
return IType

GetOverriddenSignature() public static method

public static GetOverriddenSignature ( IMethod baseMethod, IMethod impl ) : CallableSignature
baseMethod IMethod
impl IMethod
return CallableSignature

GetPromotedNumberType() public method

public GetPromotedNumberType ( IType left, IType right ) : IType
left IType
right IType
return IType

GetReferencedType() public static method

public static GetReferencedType ( Expression typeref ) : IType
typeref Boo.Lang.Compiler.Ast.Expression
return IType

GetSignature() public static method

public static GetSignature ( IEntityWithParameters method ) : string
method IEntityWithParameters
return string

GetStringExceptionConstructor() public method

public GetStringExceptionConstructor ( ) : IConstructor
return IConstructor

GetType() public static method

public static GetType ( Node node ) : IType
node Node
return IType

IsAnyType() public static method

Returns true if the type can be either a reference type or a value type. Currently it returns true only for an unconstrained generic parameter type.
public static IsAnyType ( IType type ) : bool
type IType
return bool

IsAttribute() public method

public IsAttribute ( IType type ) : bool
type IType
return bool

IsBuiltin() public method

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

IsCallable() public method

public IsCallable ( IType type ) : bool
type IType
return bool

IsCallableTypeAssignableFrom() public method

public IsCallableTypeAssignableFrom ( ICallableType lhs, IType rhs ) : bool
lhs ICallableType
rhs IType
return bool

IsDuckType() public method

public IsDuckType ( IType type ) : bool
type IType
return bool

IsDuckTyped() public method

public IsDuckTyped ( Expression expression ) : bool
expression Boo.Lang.Compiler.Ast.Expression
return bool

IsError() public static method

public static IsError ( Expression node ) : bool
node Boo.Lang.Compiler.Ast.Expression
return bool

IsError() public static method

public static IsError ( IEntity entity ) : bool
entity IEntity
return bool

IsErrorAny() public static method

public static IsErrorAny ( Boo.Lang.Compiler.Ast.ExpressionCollection collection ) : bool
collection Boo.Lang.Compiler.Ast.ExpressionCollection
return bool

IsFloatingPointNumber() public method

public IsFloatingPointNumber ( IType type ) : bool
type IType
return bool

IsGenericGeneratorReturnType() public method

public IsGenericGeneratorReturnType ( IType returnType ) : bool
returnType IType
return bool

IsIntegerNumber() public method

public IsIntegerNumber ( IType type ) : bool
type IType
return bool

IsIntegerOrBool() public method

public IsIntegerOrBool ( IType type ) : bool
type IType
return bool

IsLiteralPrimitive() public method

public IsLiteralPrimitive ( IType type ) : bool
type IType
return bool

IsMacro() public method

public IsMacro ( IType type ) : bool
type IType
return bool

IsNullable() public static method

public static IsNullable ( IType type ) : bool
type IType
return bool

IsNumber() public method

public IsNumber ( IType type ) : bool
type IType
return bool

IsNumberOrBool() public method

public IsNumberOrBool ( IType type ) : bool
type IType
return bool

IsPointerCompatible() public method

public IsPointerCompatible ( IType type ) : bool
type IType
return bool

IsPrimitive() public method

public IsPrimitive ( string name ) : bool
name string
return bool

IsPrimitiveNumber() public method

public IsPrimitiveNumber ( IType type ) : bool
type IType
return bool

IsQuackBuiltin() public method

public IsQuackBuiltin ( Expression node ) : bool
node Boo.Lang.Compiler.Ast.Expression
return bool

IsQuackBuiltin() public method

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

IsReadOnlyField() public static method

public static IsReadOnlyField ( IField field ) : bool
field IField
return bool

IsReferenceType() public static method

Returns true if the type is a reference type or a generic parameter type that is constrained to represent a reference type.
public static IsReferenceType ( IType type ) : bool
type IType
return bool

IsSignedNumber() public method

public IsSignedNumber ( IType type ) : bool
type IType
return bool

IsSystemObject() public method

checks if the passed type will be equivalente to System.Object in runtime (accounting for the presence of duck typing).
public IsSystemObject ( IType type ) : bool
type IType
return bool

IsUnknown() public static method

public static IsUnknown ( Expression node ) : bool
node Boo.Lang.Compiler.Ast.Expression
return bool

IsUnknown() public static method

public static IsUnknown ( IType type ) : bool
type IType
return bool

IsValidException() public method

public IsValidException ( IType type ) : bool
type IType
return bool

KnowsQuackFu() public method

public KnowsQuackFu ( IType type ) : bool
type IType
return bool

Map() public method

public Map ( ConstructorInfo constructor ) : IConstructor
constructor System.Reflection.ConstructorInfo
return IConstructor

Map() public method

public Map ( MemberInfo members ) : IEntity
members System.Reflection.MemberInfo
return IEntity

Map() public method

public Map ( MethodInfo method ) : IMethod
method System.Reflection.MethodInfo
return IMethod

Map() public method

public Map ( ParameterInfo parameters ) : IParameter[]
parameters System.Reflection.ParameterInfo
return IParameter[]

Map() public method

public Map ( Type type ) : IType
type System.Type
return IType

MapToConcreteExpressionTypes() public method

public MapToConcreteExpressionTypes ( Boo.Lang.Compiler.Ast.ExpressionCollection items ) : void
items Boo.Lang.Compiler.Ast.ExpressionCollection
return void

MapWildcardType() public method

public MapWildcardType ( IType type ) : IType
type IType
return IType

PrepareBuiltinFunctions() protected method

protected PrepareBuiltinFunctions ( ) : void
return void

PreparePrimitives() protected method

protected PreparePrimitives ( ) : void
return void

ResolvePrimitive() public method

public ResolvePrimitive ( string name ) : IEntity
name string
return IEntity

SizeOf() public method

public SizeOf ( IType type ) : int
type IType
return int

TypeSystemServices() public method

public TypeSystemServices ( ) : System
return System

TypeSystemServices() public method

public TypeSystemServices ( CompilerContext context ) : System
context CompilerContext
return System

Property Details

ArrayType public_oe property

public IType ArrayType
return IType

BoolType public_oe property

public IType BoolType
return IType

BuiltinsType public_oe property

public IType BuiltinsType
return IType

ByteType public_oe property

public IType ByteType
return IType

CharType public_oe property

public IType CharType
return IType

ConditionalAttribute public_oe property

public IType ConditionalAttribute
return IType

DateTimeType public_oe property

public IType DateTimeType
return IType

DecimalType public_oe property

public IType DecimalType
return IType

DelegateType public_oe property

public IType DelegateType
return IType

DoubleType public_oe property

public IType DoubleType
return IType

DuckType public_oe property

public IType DuckType
return IType

EnumType public_oe property

public IType EnumType
return IType

ErrorEntity public_oe static_oe property

public static IType ErrorEntity
return IType

HashType public_oe property

public IType HashType
return IType

IAstGeneratorMacroType public_oe property

public IType IAstGeneratorMacroType
return IType

IAstMacroType public_oe property

public IType IAstMacroType
return IType

ICallableType public_oe property

public IType ICallableType
return IType

ICollectionGenericType public_oe property

public IType ICollectionGenericType
return IType

ICollectionType public_oe property

public IType ICollectionType
return IType

IDisposableType public_oe property

public IType IDisposableType
return IType

IEnumerableGenericType public_oe property

public IType IEnumerableGenericType
return IType

IEnumerableType public_oe property

public IType IEnumerableType
return IType

IEnumeratorGenericType public_oe property

public IType IEnumeratorGenericType
return IType

IEnumeratorType public_oe property

public IType IEnumeratorType
return IType

IListGenericType public_oe property

public IType IListGenericType
return IType

IListType public_oe property

public IType IListType
return IType

IQuackFuType public_oe property

public IType IQuackFuType
return IType

IntPtrType public_oe property

public IType IntPtrType
return IType

IntType public_oe property

public IType IntType
return IType

ListType public_oe property

public IType ListType
return IType

LongType public_oe property

public IType LongType
return IType

MulticastDelegateType public_oe property

public IType MulticastDelegateType
return IType

ObjectArrayType public_oe property

public IArrayType ObjectArrayType
return IArrayType

ObjectType public_oe property

public IType ObjectType
return IType

RegexType public_oe property

public IType RegexType
return IType

RuntimeServicesType public_oe property

public IType RuntimeServicesType
return IType

SByteType public_oe property

public IType SByteType
return IType

ShortType public_oe property

public IType ShortType
return IType

SingleType public_oe property

public IType SingleType
return IType

StringType public_oe property

public IType StringType
return IType

SystemAttribute public_oe property

public IType SystemAttribute
return IType

TimeSpanType public_oe property

public IType TimeSpanType
return IType

TypeType public_oe property

public IType TypeType
return IType

UIntPtrType public_oe property

public IType UIntPtrType
return IType

UIntType public_oe property

public IType UIntType
return IType

ULongType public_oe property

public IType ULongType
return IType

UShortType public_oe property

public IType UShortType
return IType

ValueTypeType public_oe property

public IType ValueTypeType
return IType

VoidType public_oe property

public IType VoidType
return IType