This class contains only the most basic information about a type found in a module or script file.
This class is always instantiated by the system based on the scanning result of script files. The fact that an instance of TypeInfo for certain type exists doesn't guarantee that the corresponding Type would be successfully loaded should such attempt be made. This is because the scanning operation to extract the basic information is only performing syntax check and very limited semantic check. The user must proceed to call load() to actually verify and load the type into the runtime.
Parent Class
Type | Name | Signature |
---|---|---|
method | getFullName | public String getFullName() |
method | getModuleName | public String getModuleName() |
method | getSimpleName | public String getSimpleName() |
method | isClass | public bool isClass() |
method | isInterface | public bool isInterface() |
method | load | public Type load() |
public String getFullName()
Get the fully qualified type name. This will always return canonical name, not language-level alias for certain built-in types.
Returns
public String getModuleName()
Get the module name of this type, i.e. excluding the part for module. For a type with fully qualified name "A.B.C", this method will return "A.B".
Returns
public String getSimpleName()
Get the simple name of this type, i.e. excluding the part for module. For a type with fully qualified name "A.B.C", this method will return "C". This will always return canonical name, not language-level alias for certain built-in types.
Returns
public bool isClass()
Check whether the type is a class type. Interface types, primitive types, Any and Void type is not class type; all the other are.
Returns
public bool isInterface()
Check whether the type is an interface type.
Returns
public Type load()
Load this type into the runtime.
Returns