Class
Xojo.Introspection.TypeInfo
Warning
This item was deprecated in version 2020r2. Please use Introspection as a replacement.
Description
Contains type information for objects, arrays, simple data types and structures.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
c As TypeInfo |
|||
Property descriptions
Xojo.Introspection.TypeInfo.BaseType
BaseType As TypeInfo
Gets parent (or Super) of the current object. Allows you to navigate the type hierarchy from child to parent.
This property is read-only.
Xojo.Introspection.TypeInfo.FullName
FullName As Text
The fully qualified name used as a unique identifier. This can differ from the simple name whenever the type lives in a namespace.
This property is read-only.
Xojo.Introspection.TypeInfo.HasElementType
HasElementType As Boolean
Compound data types have their own attributes as well as an element type.
This property is read-only.
Xojo.Introspection.TypeInfo.IsArray
IsArray As Boolean
Indicates the item is an array.
This property is read-only.
Xojo.Introspection.TypeInfo.IsClass
IsClass As Boolean
Indicates the item is a class.
This property is read-only.
Xojo.Introspection.TypeInfo.IsEnum
IsEnum As Boolean
Indicates the item is an enumeration.
This property is read-only.
Xojo.Introspection.TypeInfo.IsInterface
IsInterface As Boolean
Indicates the item is a class interface.
This property is read-only.
Xojo.Introspection.TypeInfo.IsPointer
IsPointer As Boolean
Indicates the item is a Ptr or another external pointer type.
This property is read-only.
Xojo.Introspection.TypeInfo.IsPrimitive
IsPrimitive As Boolean
Indicates the item is a primitive type, which are: Boolean, String, String, Color, Integer, Double, Single, Currency and other numeric types.
This property is read-only.
Xojo.Introspection.TypeInfo.IsPrivate
IsPrivate As Boolean
Checks if the item has private scope.
This property is read-only.
Xojo.Introspection.TypeInfo.IsProtected
IsProtected As Boolean
Checks if the item has protected scope.
This property is read-only.
Xojo.Introspection.TypeInfo.IsPublic
IsPublic As Boolean
Checks if the item has public scope.
This property is read-only.
Xojo.Introspection.TypeInfo.IsValueType
IsValueType As Boolean
Indicates the item is a value type, which means it is not a reference. With value types, assignments copy the value itself rather than the reference to the value. Primitive, pointer, structure and enum types are all value types.
This property is read-only.
Xojo.Introspection.TypeInfo.Name
Name As Text
The name of the item.
This property is read-only.
Gets the names of methods on a class:
Using Xojo.Introspection
Var obj As New Class1
Var info As TypeInfo = GetType(obj)
Var methods() As MethodInfo = info.Methods
Var methodNames() As Text
For Each m As MethodInfo In methods
methodNames.AddRow(m.Name)
Next
Method descriptions
Xojo.Introspection.TypeInfo.ArrayElementType
ArrayElementType As TypeInfo
Returns the type information for the array.
Xojo.Introspection.TypeInfo.ArrayRank
ArrayRank As Integer
The number of dimensions of an array. For arrays only (IsArray = True).
Xojo.Introspection.TypeInfo.Constructors
Constructors As ConstructorInfo
Note
Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.
Xojo.Introspection.TypeInfo.GetAttributes
GetAttributes As AttributeInfo
Gets the attributes for the associated item.
The following code gets the attributes for the window containing the code:
Var myAttributes() As Introspection.AttributeInfo
myAttributes = GetType(Self).GetAttributes
Xojo.Introspection.TypeInfo.IsSubClassOf
IsSubClassOf(c As TypeInfo) As Boolean
Returns True if this item a subclass of the specified type c. False if not.
Xojo.Introspection.TypeInfo.Methods
Methods As MethodInfo
Returns an array of methods for the item, which must be a class instance.
Xojo.Introspection.TypeInfo.Parameters
Parameters As ParameterInfo
Gets the parameters for the member.
Xojo.Introspection.TypeInfo.Properties
Properties As PropertyInfo
Returns an array of the properties for the item, which must be a class instance.
Notes
Xojo.Introspection.TypeInfo automatically converts to standard Introspection.TypeInfo.
Compatibility
All project types on all supported operating systems.