C# 클래스 Pchp.CodeAnalysis.FlowAnalysis.TypeRefContext

Context of TypeRefMask and ITypeRef instances. Contains additional information for routine context like current namespace, current type context etc.
파일 보기 프로젝트 열기: iolevel/peachpie 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddToContext void
AddToContextNoCheck int
GetPrimitiveTypeRefMask TypeRefMask
GetPrimitiveTypeRefMaskNoCheck TypeRefMask
GetTypeCtxMask TypeRefMask
GetTypeMaskOfReservedClassName TypeRefMask
GetTypes IList
SetLateStaticBindType void
TypeRefContext System
UpdateMasks void

공개 메소드들

메소드 설명
AddToContext ( TypeRefContext context, TypeRefMask mask ) : TypeRefMask

Adds properly types from another context matching given mask.

AddToContext ( ITypeRef typeRef ) : int

Ensures given type is in the context.

GetArrayTypeMask ( ) : TypeRefMask

Gets type mask of generic array with element of any type.

GetArrayTypeMask ( TypeRefMask elementType ) : TypeRefMask

Gets type mask of array with elements of given type.

GetArraysFromMask ( TypeRefMask mask ) : TypeRefMask

Gets mask representing only array types in given mask. (Only bits corresponding to an array type will be set).

GetBooleanTypeMask ( ) : TypeRefMask

Gets bool type for this context.

GetCallableTypeMask ( ) : TypeRefMask

Gets type mask of all callable types.

GetDoubleTypeMask ( ) : TypeRefMask

Gets double type for this context.

GetElementType ( TypeRefMask mask ) : TypeRefMask

In case of array type, gets its possible element types.

GetLongTypeMask ( ) : TypeRefMask

Gets int type for this context.

GetNullTypeMask ( ) : TypeRefMask

Gets type mask corresponding to System.Object and not including any subclasses.

GetNumberTypeMask ( ) : TypeRefMask

Gets number (int and double) type for this context.

GetObjectTypes ( TypeRefMask mask ) : IList

Gets types of type object (classes, interfaces, traits) referenced by given type mask.

GetObjectsFromMask ( TypeRefMask mask ) : TypeRefMask

Gets mask representing only object types in given mask. (Only bits corresponding to an object type will be set).

GetParentTypeMask ( ) : TypeRefMask

Gets parent type for this context.

GetSelfTypeMask ( ) : TypeRefMask

Gets self type for this context.

GetStaticTypeMask ( ) : TypeRefMask

Gets static type for this context.

GetStringTypeMask ( ) : TypeRefMask

Gets string type for this context.

GetSystemObjectTypeMask ( ) : TypeRefMask

Gets type mask corresponding to System.Object.

GetThisTypeMask ( ) : TypeRefMask

Gets type of $this in current context.

GetTypeIndex ( ITypeRef typeref ) : int

Gets index of the given type within the context. Returns -1 if such type is not present.

GetTypeMask ( Devsense.PHP.Syntax.Ast tref, bool includesSubclasses = true ) : TypeRefMask

Gets type mask corresponding to given TypeRef within this context.

GetTypeMask ( ITypeRef typeref, bool includesSubclasses ) : TypeRefMask

Helper method that builds TypeRefMask for given type in this context.

GetTypeMask ( QualifiedName qname, bool includesSubclasses = true ) : TypeRefMask

Gets type mask corresponding to given qualified name within this context.

GetTypes ( TypeRefMask mask ) : IList

Gets types referenced by given type mask.

GetWritableStringTypeMask ( ) : TypeRefMask

Gets writable string type (a string builder) for this context.

IsAString ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a string type (readonly or writable).

IsArray ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents an array.

IsBoolean ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a boolean.

IsDouble ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a double type.

IsLambda ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a lambda function or callable primitive type.

IsLong ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents an integer type.

IsNullable ( TypeRefMask mask ) : bool

Gets value indicating whether given type can be null.

IsNumber ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a number.

IsObject ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents an object.

IsPrimitiveType ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a primitive type.

IsReadonlyString ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents UTF16 readonly string.

IsWritableString ( TypeRefMask mask ) : bool

Gets value indicating whether given type mask represents a writablke string (string builder).

ToString ( TypeRefMask mask ) : string

Gets string representation of types contained in given type mask.

비공개 메소드들

메소드 설명
AddToContext ( TypeRefContext other ) : void

Adds properly types from another context.

AddToContextNoCheck ( ITypeRef typeRef ) : int
GetPrimitiveTypeRefMask ( PrimitiveTypeRef typeref ) : TypeRefMask
GetPrimitiveTypeRefMaskNoCheck ( PrimitiveTypeRef typeref ) : TypeRefMask

Does not lookup existing types whether there is typeref already.

GetTypeCtxMask ( Devsense.PHP.Syntax.Ast typeCtx ) : TypeRefMask

Gets type mask corresponding to self with includesSubclasses flag set whether type is not final.

GetTypeMaskOfReservedClassName ( Name name ) : TypeRefMask

Gets type mask for reserved class name (self, parent, static).

GetTypes ( TypeRefMask typemask, ulong bitmask ) : IList

Gets enumeration of types matching given masks.

SetLateStaticBindType ( TypeRefMask staticTypeMask ) : void

Explicitly defines late static bind type (type of static).

TypeRefContext ( SourceUnit sourceUnit, SourceTypeSymbol containingType ) : System
UpdateMasks ( ITypeRef typeRef, int index ) : void

Updates internal masks for newly added type.

메소드 상세

AddToContext() 공개 메소드

Adds properly types from another context matching given mask.
public AddToContext ( TypeRefContext context, TypeRefMask mask ) : TypeRefMask
context TypeRefContext Context of .
mask TypeRefMask Type mask representing types in .
리턴 TypeRefMask

AddToContext() 공개 메소드

Ensures given type is in the context.
public AddToContext ( ITypeRef typeRef ) : int
typeRef ITypeRef Type reference to be in the context.
리턴 int

GetArrayTypeMask() 공개 메소드

Gets type mask of generic array with element of any type.
public GetArrayTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetArrayTypeMask() 공개 메소드

Gets type mask of array with elements of given type.
public GetArrayTypeMask ( TypeRefMask elementType ) : TypeRefMask
elementType TypeRefMask
리턴 TypeRefMask

GetArraysFromMask() 공개 메소드

Gets mask representing only array types in given mask. (Only bits corresponding to an array type will be set).
public GetArraysFromMask ( TypeRefMask mask ) : TypeRefMask
mask TypeRefMask
리턴 TypeRefMask

GetBooleanTypeMask() 공개 메소드

Gets bool type for this context.
public GetBooleanTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetCallableTypeMask() 공개 메소드

Gets type mask of all callable types.
public GetCallableTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetDoubleTypeMask() 공개 메소드

Gets double type for this context.
public GetDoubleTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetElementType() 공개 메소드

In case of array type, gets its possible element types.
public GetElementType ( TypeRefMask mask ) : TypeRefMask
mask TypeRefMask
리턴 TypeRefMask

GetLongTypeMask() 공개 메소드

Gets int type for this context.
public GetLongTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetNullTypeMask() 공개 메소드

Gets type mask corresponding to System.Object and not including any subclasses.
public GetNullTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetNumberTypeMask() 공개 메소드

Gets number (int and double) type for this context.
public GetNumberTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetObjectTypes() 공개 메소드

Gets types of type object (classes, interfaces, traits) referenced by given type mask.
public GetObjectTypes ( TypeRefMask mask ) : IList
mask TypeRefMask
리턴 IList

GetObjectsFromMask() 공개 메소드

Gets mask representing only object types in given mask. (Only bits corresponding to an object type will be set).
public GetObjectsFromMask ( TypeRefMask mask ) : TypeRefMask
mask TypeRefMask
리턴 TypeRefMask

GetParentTypeMask() 공개 메소드

Gets parent type for this context.
public GetParentTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetSelfTypeMask() 공개 메소드

Gets self type for this context.
public GetSelfTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetStaticTypeMask() 공개 메소드

Gets static type for this context.
public GetStaticTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetStringTypeMask() 공개 메소드

Gets string type for this context.
public GetStringTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetSystemObjectTypeMask() 공개 메소드

Gets type mask corresponding to System.Object.
public GetSystemObjectTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetThisTypeMask() 공개 메소드

Gets type of $this in current context.
public GetThisTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

GetTypeIndex() 공개 메소드

Gets index of the given type within the context. Returns -1 if such type is not present.
public GetTypeIndex ( ITypeRef typeref ) : int
typeref ITypeRef
리턴 int

GetTypeMask() 공개 메소드

Gets type mask corresponding to given TypeRef within this context.
public GetTypeMask ( Devsense.PHP.Syntax.Ast tref, bool includesSubclasses = true ) : TypeRefMask
tref Devsense.PHP.Syntax.Ast
includesSubclasses bool
리턴 TypeRefMask

GetTypeMask() 공개 메소드

Helper method that builds TypeRefMask for given type in this context.
public GetTypeMask ( ITypeRef typeref, bool includesSubclasses ) : TypeRefMask
typeref ITypeRef
includesSubclasses bool
리턴 TypeRefMask

GetTypeMask() 공개 메소드

Gets type mask corresponding to given qualified name within this context.
public GetTypeMask ( QualifiedName qname, bool includesSubclasses = true ) : TypeRefMask
qname QualifiedName
includesSubclasses bool
리턴 TypeRefMask

GetTypes() 공개 메소드

Gets types referenced by given type mask.
public GetTypes ( TypeRefMask mask ) : IList
mask TypeRefMask
리턴 IList

GetWritableStringTypeMask() 공개 메소드

Gets writable string type (a string builder) for this context.
public GetWritableStringTypeMask ( ) : TypeRefMask
리턴 TypeRefMask

IsAString() 공개 메소드

Gets value indicating whether given type mask represents a string type (readonly or writable).
public IsAString ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsArray() 공개 메소드

Gets value indicating whether given type mask represents an array.
public IsArray ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsBoolean() 공개 메소드

Gets value indicating whether given type mask represents a boolean.
public IsBoolean ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsDouble() 공개 메소드

Gets value indicating whether given type mask represents a double type.
public IsDouble ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsLambda() 공개 메소드

Gets value indicating whether given type mask represents a lambda function or callable primitive type.
public IsLambda ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsLong() 공개 메소드

Gets value indicating whether given type mask represents an integer type.
public IsLong ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsNullable() 공개 메소드

Gets value indicating whether given type can be null.
public IsNullable ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsNumber() 공개 메소드

Gets value indicating whether given type mask represents a number.
public IsNumber ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsObject() 공개 메소드

Gets value indicating whether given type mask represents an object.
public IsObject ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsPrimitiveType() 공개 메소드

Gets value indicating whether given type mask represents a primitive type.
public IsPrimitiveType ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsReadonlyString() 공개 메소드

Gets value indicating whether given type mask represents UTF16 readonly string.
public IsReadonlyString ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

IsWritableString() 공개 메소드

Gets value indicating whether given type mask represents a writablke string (string builder).
public IsWritableString ( TypeRefMask mask ) : bool
mask TypeRefMask
리턴 bool

ToString() 공개 메소드

Gets string representation of types contained in given type mask.
public ToString ( TypeRefMask mask ) : string
mask TypeRefMask
리턴 string