C# 클래스 Fanx.Util.FanUtil

Utilites for dealing with type names in .NET.
파일 보기 프로젝트 열기: xored/f4 1 사용 예제들

공개 메소드들

메소드 설명
box ( object obj ) : object

If the given object is a .NET primitive, make it as a Fantom type, otherwise return obj.

getPodName ( string qname ) : string

If the qualifed type name is a Fantom type, then return the pod name the type should belong to, which should also be the assembly name. If the type name does not appear to be a Fantom type, return null.

isDotnetImmutable ( Type dotnetType ) : bool

Return if the specified .NET type represents an immutable type.

isDotnetRepresentation ( Fan t ) : bool

Return if the Fantom Type is represented as a .NET class such as sys::Int as Fan.Sys.Long.

splitQName ( string qname ) : string[]

Split a qualifed type name into two strings, where s[0] is the namespace, and s[1] is the simple type name. If qname represents a nested class, then s[0] will be the qualified type name of the parent, and s[1] will simply be the nested class name. If qname represnets a generic class, then s[0] will be the qualified type name of the class, and s[1] will be the generic param.

toDotnetImplTypeName ( string ntype ) : string

Given a .NET type signature, return the implementation class signature for methods and fields:

toDotnetImplTypeName ( string podName, string typeName ) : string

Given a Fantom qname, get the .NET implementation class name:

toDotnetMethodName ( string fanName ) : string

Return the .NET method name for this Fantom method name.

toDotnetStackType ( Fan t ) : int

Given a Fantom type, get its stack type: 'A', 'I', 'J', etc

toDotnetTypeName ( Fan type ) : string

Return the .NET type name for this Fantom type.

toDotnetTypeName ( string podName, string typeName, bool nullable ) : string

Return the .NET type name for this Fantom pod and type.

toFanMethodName ( string dotnetName ) : string

Return the Fantom method name for this .NET method name.

toFanType ( Type dotnetType, bool check ) : Fan.Sys.Type

Convert .NET type to Fantom type.

upper ( string str ) : string

Return a new string, where the first letter is uppercase. If the string is a fully qualified type name, make each character following a '.' uppercase as well.

upper ( string str, bool recurse ) : string

비공개 메소드들

메소드 설명
FanUtil ( ) : System

메소드 상세

box() 공개 정적인 메소드

If the given object is a .NET primitive, make it as a Fantom type, otherwise return obj.
public static box ( object obj ) : object
obj object
리턴 object

getPodName() 공개 정적인 메소드

If the qualifed type name is a Fantom type, then return the pod name the type should belong to, which should also be the assembly name. If the type name does not appear to be a Fantom type, return null.
public static getPodName ( string qname ) : string
qname string
리턴 string

isDotnetImmutable() 공개 정적인 메소드

Return if the specified .NET type represents an immutable type.
public static isDotnetImmutable ( Type dotnetType ) : bool
dotnetType System.Type
리턴 bool

isDotnetRepresentation() 공개 정적인 메소드

Return if the Fantom Type is represented as a .NET class such as sys::Int as Fan.Sys.Long.
public static isDotnetRepresentation ( Fan t ) : bool
t Fan
리턴 bool

splitQName() 공개 정적인 메소드

Split a qualifed type name into two strings, where s[0] is the namespace, and s[1] is the simple type name. If qname represents a nested class, then s[0] will be the qualified type name of the parent, and s[1] will simply be the nested class name. If qname represnets a generic class, then s[0] will be the qualified type name of the class, and s[1] will be the generic param.
public static splitQName ( string qname ) : string[]
qname string
리턴 string[]

toDotnetImplTypeName() 공개 정적인 메소드

Given a .NET type signature, return the implementation class signature for methods and fields:
public static toDotnetImplTypeName ( string ntype ) : string
ntype string
리턴 string

toDotnetImplTypeName() 공개 정적인 메소드

Given a Fantom qname, get the .NET implementation class name:
public static toDotnetImplTypeName ( string podName, string typeName ) : string
podName string
typeName string
리턴 string

toDotnetMethodName() 공개 정적인 메소드

Return the .NET method name for this Fantom method name.
public static toDotnetMethodName ( string fanName ) : string
fanName string
리턴 string

toDotnetStackType() 공개 정적인 메소드

Given a Fantom type, get its stack type: 'A', 'I', 'J', etc
public static toDotnetStackType ( Fan t ) : int
t Fan
리턴 int

toDotnetTypeName() 공개 정적인 메소드

Return the .NET type name for this Fantom type.
public static toDotnetTypeName ( Fan type ) : string
type Fan
리턴 string

toDotnetTypeName() 공개 정적인 메소드

Return the .NET type name for this Fantom pod and type.
public static toDotnetTypeName ( string podName, string typeName, bool nullable ) : string
podName string
typeName string
nullable bool
리턴 string

toFanMethodName() 공개 정적인 메소드

Return the Fantom method name for this .NET method name.
public static toFanMethodName ( string dotnetName ) : string
dotnetName string
리턴 string

toFanType() 공개 정적인 메소드

Convert .NET type to Fantom type.
public static toFanType ( Type dotnetType, bool check ) : Fan.Sys.Type
dotnetType System.Type
check bool
리턴 Fan.Sys.Type

upper() 공개 정적인 메소드

Return a new string, where the first letter is uppercase. If the string is a fully qualified type name, make each character following a '.' uppercase as well.
public static upper ( string str ) : string
str string
리턴 string

upper() 공개 정적인 메소드

public static upper ( string str, bool recurse ) : string
str string
recurse bool
리턴 string