C# 클래스 Fan.Sys.Type

Type models a static type definition for an Obj class. A Type lifecycle: 1) Hollow: in this state we know basic identity of the type, and it's inheritance hierarchy. A type is setup to be hollow during Pod.load(). 2) Reflected: in this state we read all the slot definitions from the fcode to populate the slot tables used to for reflection. At this point clients can discover the signatures of the Type. 3) Emitted: the final state of loading a Type is to emit to a Java class called "fan.{pod}.{type}". Once emitted we can instantiate the type or call it's methods. 4) Finished: once we have reflected the slots into memory and emitted the Java class, the last stage is to bind the all the java.lang.reflect representations to the Slots for dynamic dispatch. We delay this until needed by Method or Field for a reflection invocation Type models sys::Type. Implementation classes are: - ClassType - GenericType (ListType, MapType, FuncType) - NullableType
상속: FanObj, Literal
파일 보기 프로젝트 열기: xored/f4 1 사용 예제들

공개 메소드들

메소드 설명
@base ( ) : Type
@is ( Type type ) : bool
@params ( ) : Map
@typeof ( ) : Type
common ( object objs, int n ) : Type

Given a list of objects, compute the most specific type which they all share,or at worst return sys::Obj. This method does not take into account interfaces, only extends class inheritance.

doc ( ) : string
dotnetRepr ( ) : bool
emptyList ( ) : List
encode ( ObjEncoder @out ) : void
facet ( Type t ) : Facet
facet ( Type t, bool c ) : Facet
facets ( ) : List
field ( string name ) : Field
field ( string name, bool check ) : Field
fields ( ) : List
find ( string sig ) : Type
find ( string sig, bool check ) : Type
finish ( ) : void
fits ( Type type ) : bool
getRawType ( ) : Type

If this type is a generic parameter (V, L, etc), then return the actual type used in the Java method. For example V is Obj, and L is List. This is the type we actually use when constructing a signature for the invoke opcode.

hasFacet ( Type t ) : bool
inheritance ( ) : List
isAbstract ( ) : bool
isClass ( ) : bool
isConst ( ) : bool
isEnum ( ) : bool
isFacet ( ) : bool
isFinal ( ) : bool
isGeneric ( ) : bool
isGenericInstance ( ) : bool

A generic instance is a type which has "instantiated" a generic type and replaced all the generic parameter types with generic argument types. The type string[] is a generic instance of the generic type List (V is replaced with string). A generic instance always has a signature which different from the qname.

isGenericParameter ( ) : bool

Return if this type is a generic parameter (such as V or K) in a generic type (List, Map, or Method). Generic parameters serve as place holders for the parameterization of the generic type. Fantom has a predefined set of generic parameters which are always defined in the sys pod with a one character name.

isGenericType ( ) : bool

A generic type means that one or more of my slots contain signatures using a generic parameter (such as V or K). Fantom supports three built-in generic types: List, Map, and Method. A generic instance (such as string[]) is NOT a generic type (all of its generic parameters have been filled in). User defined generic types are not supported in Fan.

isInternal ( ) : bool
isMixin ( ) : bool
isNullable ( ) : bool
isPublic ( ) : bool
isSynthetic ( ) : bool
isVal ( ) : bool
make ( ) : object
make ( List args ) : object
method ( string name ) : Method
method ( string name, bool check ) : Method
methods ( ) : List
mixins ( ) : List
name ( ) : string
of ( object obj ) : Type
parameterize ( Map pars ) : Type
pod ( ) : Pod
qname ( ) : string
reflect ( ) : Type
signature ( ) : string
slot ( string name ) : Slot
slot ( string name, bool check ) : Slot
slots ( ) : List
toLocale ( ) : string
toNonNullable ( ) : Type
toNullable ( ) : Type
toStr ( ) : string
trap ( string name, List args ) : object

비공개 메소드들

메소드 설명
flags ( ) : int
toListOf ( ) : Type

메소드 상세

@base() 공개 추상적인 메소드

public abstract @base ( ) : Type
리턴 Type

@is() 공개 추상적인 메소드

public abstract @is ( Type type ) : bool
type Type
리턴 bool

@params() 공개 메소드

public @params ( ) : Map
리턴 Map

@typeof() 공개 메소드

public @typeof ( ) : Type
리턴 Type

common() 공개 정적인 메소드

Given a list of objects, compute the most specific type which they all share,or at worst return sys::Obj. This method does not take into account interfaces, only extends class inheritance.
public static common ( object objs, int n ) : Type
objs object
n int
리턴 Type

doc() 공개 추상적인 메소드

public abstract doc ( ) : string
리턴 string

dotnetRepr() 공개 추상적인 메소드

public abstract dotnetRepr ( ) : bool
리턴 bool

emptyList() 공개 메소드

public emptyList ( ) : List
리턴 List

encode() 공개 메소드

public encode ( ObjEncoder @out ) : void
@out Fanx.Serial.ObjEncoder
리턴 void

facet() 공개 메소드

public facet ( Type t ) : Facet
t Type
리턴 Facet

facet() 공개 추상적인 메소드

public abstract facet ( Type t, bool c ) : Facet
t Type
c bool
리턴 Facet

facets() 공개 추상적인 메소드

public abstract facets ( ) : List
리턴 List

field() 공개 메소드

public field ( string name ) : Field
name string
리턴 Field

field() 공개 메소드

public field ( string name, bool check ) : Field
name string
check bool
리턴 Field

fields() 공개 추상적인 메소드

public abstract fields ( ) : List
리턴 List

find() 공개 정적인 메소드

public static find ( string sig ) : Type
sig string
리턴 Type

find() 공개 정적인 메소드

public static find ( string sig, bool check ) : Type
sig string
check bool
리턴 Type

finish() 공개 메소드

public finish ( ) : void
리턴 void

fits() 공개 메소드

public fits ( Type type ) : bool
type Type
리턴 bool

getRawType() 공개 메소드

If this type is a generic parameter (V, L, etc), then return the actual type used in the Java method. For example V is Obj, and L is List. This is the type we actually use when constructing a signature for the invoke opcode.
public getRawType ( ) : Type
리턴 Type

hasFacet() 공개 메소드

public hasFacet ( Type t ) : bool
t Type
리턴 bool

inheritance() 공개 추상적인 메소드

public abstract inheritance ( ) : List
리턴 List

isAbstract() 공개 메소드

public isAbstract ( ) : bool
리턴 bool

isClass() 공개 메소드

public isClass ( ) : bool
리턴 bool

isConst() 공개 메소드

public isConst ( ) : bool
리턴 bool

isEnum() 공개 메소드

public isEnum ( ) : bool
리턴 bool

isFacet() 공개 메소드

public isFacet ( ) : bool
리턴 bool

isFinal() 공개 메소드

public isFinal ( ) : bool
리턴 bool

isGeneric() 공개 메소드

public isGeneric ( ) : bool
리턴 bool

isGenericInstance() 공개 메소드

A generic instance is a type which has "instantiated" a generic type and replaced all the generic parameter types with generic argument types. The type string[] is a generic instance of the generic type List (V is replaced with string). A generic instance always has a signature which different from the qname.
public isGenericInstance ( ) : bool
리턴 bool

isGenericParameter() 공개 메소드

Return if this type is a generic parameter (such as V or K) in a generic type (List, Map, or Method). Generic parameters serve as place holders for the parameterization of the generic type. Fantom has a predefined set of generic parameters which are always defined in the sys pod with a one character name.
public isGenericParameter ( ) : bool
리턴 bool

isGenericType() 공개 메소드

A generic type means that one or more of my slots contain signatures using a generic parameter (such as V or K). Fantom supports three built-in generic types: List, Map, and Method. A generic instance (such as string[]) is NOT a generic type (all of its generic parameters have been filled in). User defined generic types are not supported in Fan.
public isGenericType ( ) : bool
리턴 bool

isInternal() 공개 메소드

public isInternal ( ) : bool
리턴 bool

isMixin() 공개 메소드

public isMixin ( ) : bool
리턴 bool

isNullable() 공개 메소드

public isNullable ( ) : bool
리턴 bool

isPublic() 공개 메소드

public isPublic ( ) : bool
리턴 bool

isSynthetic() 공개 메소드

public isSynthetic ( ) : bool
리턴 bool

isVal() 공개 메소드

public isVal ( ) : bool
리턴 bool

make() 공개 메소드

public make ( ) : object
리턴 object

make() 공개 메소드

public make ( List args ) : object
args List
리턴 object

method() 공개 메소드

public method ( string name ) : Method
name string
리턴 Method

method() 공개 메소드

public method ( string name, bool check ) : Method
name string
check bool
리턴 Method

methods() 공개 추상적인 메소드

public abstract methods ( ) : List
리턴 List

mixins() 공개 추상적인 메소드

public abstract mixins ( ) : List
리턴 List

name() 공개 추상적인 메소드

public abstract name ( ) : string
리턴 string

of() 공개 정적인 메소드

public static of ( object obj ) : Type
obj object
리턴 Type

parameterize() 공개 메소드

public parameterize ( Map pars ) : Type
pars Map
리턴 Type

pod() 공개 추상적인 메소드

public abstract pod ( ) : Pod
리턴 Pod

qname() 공개 추상적인 메소드

public abstract qname ( ) : string
리턴 string

reflect() 공개 메소드

public reflect ( ) : Type
리턴 Type

signature() 공개 추상적인 메소드

public abstract signature ( ) : string
리턴 string

slot() 공개 메소드

public slot ( string name ) : Slot
name string
리턴 Slot

slot() 공개 추상적인 메소드

public abstract slot ( string name, bool check ) : Slot
name string
check bool
리턴 Slot

slots() 공개 추상적인 메소드

public abstract slots ( ) : List
리턴 List

toLocale() 공개 메소드

public toLocale ( ) : string
리턴 string

toNonNullable() 공개 메소드

public toNonNullable ( ) : Type
리턴 Type

toNullable() 공개 추상적인 메소드

public abstract toNullable ( ) : Type
리턴 Type

toStr() 공개 메소드

public toStr ( ) : string
리턴 string

trap() 공개 메소드

public trap ( string name, List args ) : object
name string
args List
리턴 object