You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.`parameters` - `table<userdata [class]>`: The parameters of the constructor.
51
+
2.`access` - `table?`: Access flags for the constructor. See [Access Modifier Table](#access-modifier-table)
52
+
3.`definedFields` - `boolean?`: Whether or not to define instance fields on this constructor.
53
+
54
+
55
+
#### Usage
56
+
57
+
If the constructor has a parameter match with a constructor in the parent class, the function to define it is optional. If `definedFields` is set, instance fields created by `classBuilder:field()` are initialized in it. If the access table is nil, the constructor defaults to public access.
@@ -30,15 +68,14 @@ Override an existing method of the parent class.
30
68
31
69
1.`methodName` - `string`: The name of the method to override.
32
70
2.`parameters` - `table<userdata [class]>`: The parameters of the method to override.
33
-
3.`access` - `{ static = boolean? }`: Access flags for the overriding method. Set `static` if the method to override is static.
34
-
4.`func` - `function`: The function to call for handling when the method is invoked.
71
+
3.`access` - `table`: Access flags for the overriding method. See [Access Modifier Table](#access-modifier-table)
35
72
36
73
#### Usage
37
74
38
75
In addition to overriding the method we must supply a function to the builder on the index matching `methodName`.
39
76
If the overriding method is not static then the first parameter to the submitted function is `this`, followed by the rest of the parameters specified in `parameters`.
@@ -51,15 +88,14 @@ Create an entirely new method on the class.
51
88
1.`methodName` - `string`: The method name. Must not exist in any parent classes.
52
89
2.`parameters` - `table<userdata [class]>`: A table representing the parameter types in order.
53
90
3.`returnClass` - `userdata [class]`: The class to be returned by this method.
54
-
4.`access` - `{ abstract = boolean?, static = boolean? }`: Access flags for overriding the method.
55
-
5.`func` - `function`: The function to call for handling when the method is invoked. If the parameter `access.abstract` is `true`, this parameter is ignored.
91
+
4.`access` - `table`: Access flags for the overriding method. See [Access Modifier Table](#access-modifier-table)
56
92
57
93
#### Usage
58
94
59
95
If the method to be created is abstract, a function does not have to be submitted.
60
96
If the method is not static then the first parameter to the submitted function is `this`, followed by the rest of the parameters specified in `parameters`.
0 commit comments