forked from qped-eu/MASS-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassSchema.json
533 lines (533 loc) · 25 KB
/
classSchema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
{
"type": "object",
"properties": {
"items": {
"type": "object",
"title": "Class Info Collection",
"description": "Holds information for each expected classes.",
"documentation": "This holds all information about all possible classes inside the given files. Note that not only outer but also inner classes should have infos created here, if you wish to check them for properties.",
"required": [
"classKeywordConfig"
],
"properties": {
"fullyQualifiedName": {
"type": "string",
"title": "Fully Qualified Name of the Class",
"default": "",
"description": "Package names and class name, separated by dots. If you expect the class to be in the default package, just the class name will suffice.",
"documentation": "This is used for matching the classes given in the solution with the provided expected answers here in the configuration. Since this name is unique, this is the preferred way of matching up the classes. Example: com.myCompany.core.functions.AddFunction"
},
"classKeywordConfig": {
"type": "object",
"properties": {
"allowExactModifierMatching": {
"type": "boolean",
"title": "Allow Exact Modifier Matching",
"description": "Set to true, if you wish to match the chosen modifiers exactly. If not, they will only be seen as a possible choice.",
"default": false,
"documentation": "Chosen modifiers can be seen as a possible choice or an exact configuration. By setting this to **true**, all chosen modifiers(marked with yes) will be matched with exactly. Only if all chosen modifiers are present in the solution, will no feedback be generated. If **false** has been chosen, the chosen modifiers will only be seen as an option and any subset of the chosen modifiers can be seen as valid in the solution."
},
"publicModifier": {
"type": "string",
"enum": [
"yes",
"no",
"don't care"
],
"title": "Public Modifier",
"description": "Set to yes, if you expect the public modifier to be present in the solution. Set to no, if you don't want to see the public modifier in the solution.",
"default": "don't care"
},
"protectedModifier": {
"type": "string",
"title": "Protected Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you expect the protected modifier to be present in the solution. Set to no, if you don't want to see the protected modifier in the solution.",
"default": "don't care"
},
"privateModifier": {
"type": "string",
"title": "Private Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you expect the private modifier to be present in the solution. Set to no, if you don't want to see the private modifier in the solution.",
"default": "don't care"
},
"packagePrivateModifier": {
"type": "string",
"title": "Package Private Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you want to allow no modifier to be present in the solution. Set to no, if you don't want to allow no modifier in the solution.",
"default": "don't care",
"documentation": "With this option you can allow, that no modifier is present as an access modifier, indicating that the **package private** modifier can be used."
},
"emptyNonAccessModifier": {
"type": "string",
"title": "Empty Non Access Modifier",
"description": "Set to yes, if you want to allow, that no non access modifier can be used in the solution. Set to no, if you expect at least one non access modifier to be present.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"abstractModifier": {
"type": "string",
"title": "Abstract Modifier",
"description": "Set to yes, if you expect the abstract modifier to be present in the solution. Set to no, if you don't want to see the abstract modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"staticModifier": {
"type": "string",
"title": "Static Modifier",
"description": "Set to yes, if you expect the static modifier to be present in the solution. Set to no, if you don't want to see the static modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"finalModifier": {
"type": "string",
"title": "Final Modifier",
"description": "Set to yes, if you expect the final modifier to be present in the solution. Set to no, if you don't want to see the final modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"classType": {
"type": "string",
"title": "Class Type",
"description": "Set to yes, if you want to allow the type of the class to be class. Set to no, if you do not want to allow the class type to be used.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"interfaceType": {
"type": "string",
"title": "Interface Type",
"description": "Set to yes, if you want to allow the type of the class to be an interface. Set to no, if you do not want to allow the interface type to be used.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"name": {
"type": "string",
"title": "Class Name",
"description": "Set the expected name of the class.",
"default": "TestClass",
"documentation": "This name can be used to match up the classes given with the here expected information. If no fully qualified name has been given beforehand, the checker will try to match up the configuration with this name instead. This may not find the class, if there are multiple classes with the same name, as the name here does not have to be unique."
}
},
"required": [
"name"
],
"description": "Modifiers, type and name can be set here.",
"title": "Class Keyword Config"
},
"inheritsFromConfigs": {
"type": "array",
"documentation": "All expected super classes of the current class declaration. Format:[class/interface] [name]. ### Examples: - interface Employee - abstract class Number",
"items": {
"type": "object",
"properties": {
"classType": {
"type": "string",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you want to allow this inherited class to be of type class. Set to no, if you do not want to allow this inherited class to be of type class.",
"title": "Expected Class Type",
"default": "don't care"
},
"interfaceType": {
"type": "string",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you want to allow this inherited class to be of type interface. Set to no, if you do not want to allow this inherited class to be of type interface.",
"title": "Expected Interface Type",
"default": "don't care"
},
"name": {
"type": "string",
"title": "Class Name of Super Class",
"description": "Set to the expected name of super class, that this class is supposed to inherit."
}
},
"required": [],
"title": "Configuration for Superclasses "
},
"title": "All Information about Expected Super Classes",
"description": "Contains all expected information about the super classes, that this class inherits."
},
"fieldKeywordConfigs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"allowExactModifierMatching": {
"type": "boolean",
"title": "Allow Exact Modifier Matching",
"description": "Set to true, if you wish to match the chosen modifiers exactly. If not, they will only be seen as a possible choice.",
"default": false,
"documentation": "Chosen modifiers can be seen as a possible choice or an exact configuration. By setting this to **true**, all chosen modifiers(marked with yes) will be matched with exactly. Only if all chosen modifiers are present in the solution, will no feedback be generated. If **false** has been chosen, the chosen modifiers will only be seen as an option and any subset of the chosen modifiers can be seen as valid in the solution."
},
"publicModifier": {
"type": "string",
"enum": [
"yes",
"no",
"don't care"
],
"title": "Public Modifier",
"description": "Set to yes, if you expect the public modifier to be present in the solution. Set to no, if you don't want to see the public modifier in the solution.",
"default": "don't care"
},
"protectedModifier": {
"type": "string",
"title": "Protected Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you expect the protected modifier to be present in the solution. Set to no, if you don't want to see the protected modifier in the solution.",
"default": "don't care"
},
"privateModifier": {
"type": "string",
"title": "Private Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you expect the private modifier to be present in the solution. Set to no, if you don't want to see the private modifier in the solution.",
"default": "don't care"
},
"packagePrivateModifier": {
"type": "string",
"title": "Package Private Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you want to allow no modifier to be present in the solution. Set to no, if you don't want to allow no modifier in the solution.",
"default": "don't care",
"documentation": "With this option you can allow, that no modifier is present as an access modifier, indicating that the **package private** modifier can be used."
},
"emptyNonAccessModifier": {
"type": "string",
"title": "Empty Non Access Modifier",
"description": "Set to yes, if you want to allow, that no non access modifier can be used in the solution. Set to no, if you expect at least one non access modifier to be present.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"staticModifier": {
"type": "string",
"title": "Static Modifier",
"description": "Set to yes, if you expect the static modifier to be present in the solution. Set to no, if you don't want to see the static modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"finalModifier": {
"type": "string",
"title": "Final Modifier",
"description": "Set to yes, if you expect the final modifier to be present in the solution. Set to no, if you don't want to see the final modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"transientModifier": {
"type": "string",
"title": "Transient Modifier",
"description": "Set to yes, if you expect the transient modifier to be present in the solution. Set to no, if you don't want to see the transient modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"volatileModifier": {
"type": "string",
"title": "Volatile Modifier",
"description": "Set to yes, if you expect the volatile modifier to be present in the solution. Set to no, if you don't want to see the volatile modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"type": {
"type": "string",
"title": "Field Type",
"description": "Expected type of the field as a word."
},
"name": {
"type": "string",
"title": "Field Name",
"description": "Expected name of the field as a word."
}
},
"title": "Field Keywords Configuration"
},
"description": "Contains all expected information about fields.",
"title": "All Information about Expected Fields"
},
"methodKeywordConfigs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"allowExactModifierMatching": {
"type": "boolean",
"title": "Allow Exact Modifier Matching",
"description": "Set to true, if you wish to match the chosen modifiers exactly. If not, they will only be seen as a possible choice.",
"default": false,
"documentation": "Chosen modifiers can be seen as a possible choice or an exact configuration. By setting this to **true**, all chosen modifiers(marked with yes) will be matched with exactly. Only if all chosen modifiers are present in the solution, will no feedback be generated. If **false** has been chosen, the chosen modifiers will only be seen as an option and any subset of the chosen modifiers can be seen as valid in the solution."
},
"publicModifier": {
"type": "string",
"enum": [
"yes",
"no",
"don't care"
],
"title": "Public Modifier",
"description": "Set to yes, if you expect the public modifier to be present in the solution. Set to no, if you don't want to see the public modifier in the solution.",
"default": "don't care"
},
"protectedModifier": {
"type": "string",
"title": "Protected Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you expect the protected modifier to be present in the solution. Set to no, if you don't want to see the protected modifier in the solution.",
"default": "don't care"
},
"privateModifier": {
"type": "string",
"title": "Private Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you expect the private modifier to be present in the solution. Set to no, if you don't want to see the private modifier in the solution.",
"default": "don't care"
},
"packagePrivateModifier": {
"type": "string",
"title": "Package Private Modifier",
"enum": [
"yes",
"no",
"don't care"
],
"description": "Set to yes, if you want to allow no modifier to be present in the solution. Set to no, if you don't want to allow no modifier in the solution.",
"default": "don't care",
"documentation": "With this option you can allow, that no modifier is present as an access modifier, indicating that the **package private** modifier can be used."
},
"emptyNonAccessModifier": {
"type": "string",
"title": "Empty Non Access Modifier",
"description": "Set to yes, if you want to allow, that no non access modifier can be used in the solution. Set to no, if you expect at least one non access modifier to be present.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"abstractModifier": {
"type": "string",
"title": "Abstract Modifier",
"description": "Set to yes, if you expect the abstract modifier to be present in the solution. Set to no, if you don't want to see the abstract modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"staticModifier": {
"type": "string",
"title": "Static Modifier",
"description": "Set to yes, if you expect the static modifier to be present in the solution. Set to no, if you don't want to see the static modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"finalModifier": {
"type": "string",
"title": "Final Modifier",
"description": "Set to yes, if you expect the final modifier to be present in the solution. Set to no, if you don't want to see the final modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"defaultModifier": {
"type": "string",
"title": "Default Modifier",
"description": "Set to yes, if you expect the default modifier to be present in the solution. Set to no, if you don't want to see the default modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"synchronizedModifier": {
"type": "string",
"title": "Synchronized Modifier",
"description": "Set to yes, if you expect the synchronized modifier to be present in the solution. Set to no, if you don't want to see the synchronized modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"nativeModifier": {
"type": "string",
"title": "Native Modifier",
"description": "Set to yes, if you expect the native modifier to be present in the solution. Set to no, if you don't want to see the native modifier in the solution.",
"enum": [
"yes",
"no",
"don't care"
],
"default": "don't care"
},
"type": {
"type": "string",
"title": "Method Type",
"description": "Expected return type of the method as a word."
},
"name": {
"type": "string",
"title": "Method Name",
"description": "Expected name of the method as a word."
}
},
"title": "Method Keywords Configuration"
},
"description": "Contains all expected information about methods",
"title": "All Information about Expected Methods"
},
"matchExactFieldAmount": {
"type": "boolean",
"description": "Set to true, if you wish to only allow the exact amount of fields specified here. Otherwise the solution can have more fields than here provided.",
"title": "Match Exact Field Amount",
"default": false
},
"matchExactMethodAmount": {
"type": "boolean",
"title": "Match Exact Method Amount",
"default": false,
"description": "Set to true, if you wish to only allow the exact amount of methods specified here. Otherwise the solution can have more methods than here provided."
},
"customFieldFeedback": {
"type": "array",
"items": {
"type": "string",
"title": "Field Feedback Message",
"description": "Any message for field mistakes."
},
"title": "Feedback for Field Errors",
"description": "Include any custom feedback for field mistakes.",
"documentation": "You can include custom feedback for field based mistakes, such as modifier, type or name errors. All messages provided here will be included in the feedback message for the student."
},
"customMethodFeedback": {
"type": "array",
"items": {
"type": "string",
"title": "Method Feedback Message",
"description": "Any message for method mistakes."
},
"title": "Feedback for Method Errors",
"description": "Include any custom feedback for method mistakes.",
"documentation": "You can include custom feedback for method based mistakes, such as modifier, type or name errors. All messages provided here will be included in the feedback message for the student."
},
"customClassFeedback": {
"type": "array",
"items": {
"type": "string",
"title": "Class Feedback Message",
"description": "Any message for class mistakes."
},
"title": "Feedback for Class Errors",
"description": "Include any custom feedback for class mistakes.",
"documentation": "You can include custom feedback for class based mistakes here, such as class type or class name errors. All messages provided here will be included in the feedback message for the student."
},
"customInheritanceFeedback": {
"type": "array",
"items": {
"type": "string",
"title": "Inheritance Feedback Message",
"description": "Any message for inheritance mistakes."
},
"title": "Feedback for Inheritance Errors",
"description": "Include any custom feedback for inheritance mistakes.",
"documentation": "You can include custom feedback for inheritance based mistakes here, such as inherited type errors or missing super class errors. All messages provided here will be included in the feedback message for the student."
}
}
}
},
"title": "Class Infos"
}