C# 클래스 Simpl.Serialization.GenericTypeVar

This class encapsulates generic type variables declarations on classes and fields. Different uses of this class:

When used for definition before 'extends' (in ClassDescriptor): name + constraintClassDescriptor (+ constraintGenericTypeVarArgs) | constraintGenericTypeVar:

name: the name of the new generic type var,

constraintClassDescriptor: when the constraint is a concrete class, this holds the class descriptor;

constraintGenericTypeVar: when the constraint is another generic type var, this refers to the definition of that generic type var;

constraintGenericTypeVarArgs: when the constraint is parameterized, this holds type arguments.

When used with field types (in FieldDescriptor):

if the field is purely generic, name + referredGenericTypeVar: name: the generic type var name used as the type, referredGenericTypeVar: refers to the definition of this generic type var in class definition.

if the field is parameterized, the FieldDescriptor should already have the class part of the field type, and its genericTypeVars field should have a list of type arguments. each type argument has classDescriptor / referredGenericTypeVar: classDescriptor: if the argument is a concrete class, referredGenericTypeVar: if the argument is parameterized or another generic type var. it should refer to the definition of that generic type var in class definition.

When used with base type after 'extends' (in ClassDescriptor): similar to the parameterized case when it is used for field type.

@author quyin
파일 보기 프로젝트 열기: ecologylab/simplCSharp 1 사용 예제들

공개 메소드들

메소드 설명
AddContraintGenericTypeVarArg ( GenericTypeVar g ) : void
AddGenericTypeVarArg ( GenericTypeVar arg ) : void
CheckBoundParameterizedTypeImpl ( GenericTypeVar g, Type bound ) : void
CheckTypeParameterizedTypeImpl ( GenericTypeVar g, Type type ) : void
GenericTypeVar ( ) : System
GetGenericTypeVarDef ( Type typeVariable, List scope ) : GenericTypeVar

Creates a GenericTypeVar object as the definition of a new generic type var, from a java reflection TypeVariable object. the scope of current generic type vars; used to resolve generic type var names.

GetGenericTypeVarRef ( Type type, List scope ) : GenericTypeVar
IsDef ( ) : bool
ResolveGenericTypeVarDefinitionConstraints ( GenericTypeVar g, Type bounds ) : void
ResolveGenericTypeVarReferenceConstraints ( GenericTypeVar g, Type bounds ) : void
ToString ( ) : string

메소드 상세

AddContraintGenericTypeVarArg() 공개 메소드

public AddContraintGenericTypeVarArg ( GenericTypeVar g ) : void
g GenericTypeVar
리턴 void

AddGenericTypeVarArg() 공개 메소드

public AddGenericTypeVarArg ( GenericTypeVar arg ) : void
arg GenericTypeVar
리턴 void

CheckBoundParameterizedTypeImpl() 공개 정적인 메소드

public static CheckBoundParameterizedTypeImpl ( GenericTypeVar g, Type bound ) : void
g GenericTypeVar
bound System.Type
리턴 void

CheckTypeParameterizedTypeImpl() 공개 정적인 메소드

public static CheckTypeParameterizedTypeImpl ( GenericTypeVar g, Type type ) : void
g GenericTypeVar
type System.Type
리턴 void

GenericTypeVar() 공개 메소드

public GenericTypeVar ( ) : System
리턴 System

GetGenericTypeVarDef() 공개 정적인 메소드

Creates a GenericTypeVar object as the definition of a new generic type var, from a java reflection TypeVariable object. the scope of current generic type vars; used to resolve generic type var names.
public static GetGenericTypeVarDef ( Type typeVariable, List scope ) : GenericTypeVar
typeVariable System.Type
scope List
리턴 GenericTypeVar

GetGenericTypeVarRef() 공개 정적인 메소드

public static GetGenericTypeVarRef ( Type type, List scope ) : GenericTypeVar
type System.Type
scope List
리턴 GenericTypeVar

IsDef() 공개 메소드

public IsDef ( ) : bool
리턴 bool

ResolveGenericTypeVarDefinitionConstraints() 공개 정적인 메소드

public static ResolveGenericTypeVarDefinitionConstraints ( GenericTypeVar g, Type bounds ) : void
g GenericTypeVar
bounds System.Type
리턴 void

ResolveGenericTypeVarReferenceConstraints() 공개 정적인 메소드

public static ResolveGenericTypeVarReferenceConstraints ( GenericTypeVar g, Type bounds ) : void
g GenericTypeVar
bounds System.Type
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string