Class

Xojo.Introspection.ConstructorInfo


Warning

This item was deprecated in version 2020r2. Please use ConstructorInfo as a replacement.

Description

Provides information on the constructors of a class instance using introspection.

Properties

Name

Type

Read-Only

Shared

IsPrivate

Boolean

IsProtected

Boolean

IsPublic

Boolean

Name

Text

Methods

Name

Parameters

Returns

Shared

GetAttributes

AttributeInfo

Invoke

Optional params() As Variant

Variant

Parameters

ParameterInfo

Property descriptions


Xojo.Introspection.ConstructorInfo.IsPrivate

IsPrivate As Boolean

Checks if the item has private scope.

This property is read-only.


Xojo.Introspection.ConstructorInfo.IsProtected

IsProtected As Boolean

Checks if the item has protected scope.

This property is read-only.


Xojo.Introspection.ConstructorInfo.IsPublic

IsPublic As Boolean

Checks if the item has public scope.

This property is read-only.


Xojo.Introspection.ConstructorInfo.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.ConstructorInfo.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.ConstructorInfo.Invoke

Invoke(Optional params() As Variant) As Variant

Creates a new instance and invokes the target constructor on the class instance, passing in the specified parameters. Returns an Auto containing the data type of the object.


Xojo.Introspection.ConstructorInfo.Parameters

Parameters As ParameterInfo

Gets the parameters for the member.

Compatibility

All project types on all supported operating systems.