orionis 0.436.0__py3-none-any.whl → 0.438.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. orionis/console/contracts/kernel.py +16 -3
  2. orionis/console/dumper/contracts/dump.py +8 -9
  3. orionis/console/dynamic/progress_bar.py +21 -29
  4. orionis/console/output/console.py +12 -0
  5. orionis/container/context/manager.py +27 -17
  6. orionis/container/context/scope.py +8 -7
  7. orionis/container/contracts/service_provider.py +12 -8
  8. orionis/container/providers/service_provider.py +9 -16
  9. orionis/container/resolver/resolver.py +29 -22
  10. orionis/foundation/contracts/application.py +437 -47
  11. orionis/foundation/contracts/config.py +14 -6
  12. orionis/foundation/providers/console_provider.py +16 -15
  13. orionis/foundation/providers/dumper_provider.py +20 -8
  14. orionis/foundation/providers/logger_provider.py +19 -14
  15. orionis/foundation/providers/path_resolver_provider.py +17 -14
  16. orionis/foundation/providers/progress_bar_provider.py +15 -14
  17. orionis/foundation/providers/testing_provider.py +20 -14
  18. orionis/foundation/providers/workers_provider.py +19 -14
  19. orionis/metadata/framework.py +1 -1
  20. orionis/services/asynchrony/contracts/coroutines.py +1 -0
  21. orionis/services/asynchrony/coroutines.py +2 -0
  22. orionis/services/asynchrony/exceptions/exception.py +2 -0
  23. orionis/services/environment/core/dot_env.py +9 -0
  24. orionis/services/environment/dynamic/caster.py +31 -2
  25. orionis/services/environment/key/key_generator.py +1 -0
  26. orionis/services/environment/validators/key_name.py +1 -0
  27. orionis/services/environment/validators/types.py +5 -1
  28. orionis/services/introspection/abstract/contracts/reflection.py +188 -221
  29. orionis/services/introspection/abstract/reflection.py +311 -178
  30. orionis/services/introspection/callables/contracts/reflection.py +64 -21
  31. orionis/services/introspection/callables/reflection.py +98 -23
  32. orionis/services/introspection/concretes/reflection.py +278 -181
  33. orionis/services/introspection/dependencies/contracts/reflection.py +21 -18
  34. orionis/services/introspection/dependencies/entities/callable_dependencies.py +15 -16
  35. orionis/services/introspection/dependencies/entities/class_dependencies.py +24 -16
  36. orionis/services/introspection/dependencies/entities/known_dependencies.py +19 -13
  37. orionis/services/introspection/dependencies/entities/method_dependencies.py +22 -16
  38. orionis/services/introspection/dependencies/reflection.py +0 -3
  39. orionis/services/introspection/instances/reflection.py +16 -6
  40. orionis/services/log/contracts/log_service.py +4 -0
  41. orionis/services/log/handlers/filename.py +2 -0
  42. orionis/services/paths/contracts/resolver.py +0 -3
  43. orionis/services/paths/resolver.py +0 -3
  44. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/METADATA +1 -1
  45. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/RECORD +68 -67
  46. tests/container/core/__init__.py +0 -0
  47. tests/container/mocks/mock_complex_classes.py +502 -192
  48. tests/container/mocks/mock_simple_classes.py +72 -6
  49. tests/container/validators/test_is_valid_alias.py +1 -1
  50. tests/foundation/config/database/test_foundation_config_database.py +54 -28
  51. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +40 -22
  52. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +75 -48
  53. tests/foundation/config/logging/test_foundation_config_logging_channels.py +49 -37
  54. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +80 -42
  55. tests/foundation/config/logging/test_foundation_config_logging_stack.py +46 -22
  56. tests/foundation/config/root/test_foundation_config_root_paths.py +37 -44
  57. tests/foundation/config/session/test_foundation_config_session.py +65 -20
  58. tests/foundation/config/startup/test_foundation_config_startup.py +37 -33
  59. tests/services/introspection/dependencies/test_reflect_dependencies.py +77 -25
  60. tests/services/introspection/reflection/test_reflection_abstract.py +403 -47
  61. /orionis/services/introspection/concretes/contracts/{concrete.py → reflection.py} +0 -0
  62. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/WHEEL +0 -0
  63. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/licenses/LICENCE +0 -0
  64. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/top_level.txt +0 -0
  65. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/zip-safe +0 -0
  66. /tests/container/{test_container.py → core/test_container.py} +0 -0
  67. /tests/container/{test_singleton.py → core/test_singleton.py} +0 -0
  68. /tests/container/{test_thread_safety.py → core/test_thread_safety.py} +0 -0
@@ -5,134 +5,145 @@ from orionis.services.introspection.dependencies.entities.class_dependencies imp
5
5
  from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency
6
6
 
7
7
  class IReflectionAbstract(ABC):
8
+ """
9
+ Abstract base class for reflection operations on Python classes.
10
+
11
+ This interface defines the contract for introspecting and manipulating
12
+ class attributes, methods, properties, and dependencies through reflection.
13
+ Provides comprehensive functionality for examining class structure,
14
+ metadata, and behavior at runtime.
15
+ """
8
16
 
9
17
  @abstractmethod
10
18
  def getClass(self) -> Type:
11
19
  """
12
- Returns the class type that this reflection concrete is based on.
20
+ Get the class type that this reflection instance is based on.
13
21
 
14
22
  Returns
15
23
  -------
16
24
  Type
17
- The class type provided during initialization.
25
+ The class type provided during reflection initialization.
18
26
  """
19
27
  pass
20
28
 
21
29
  @abstractmethod
22
30
  def getClassName(self) -> str:
23
31
  """
24
- Returns the name of the class type.
32
+ Get the name of the reflected class.
25
33
 
26
34
  Returns
27
35
  -------
28
36
  str
29
- The name of the class type.
37
+ The simple name of the class without module qualification.
30
38
  """
31
39
  pass
32
40
 
33
41
  @abstractmethod
34
42
  def getModuleName(self) -> str:
35
43
  """
36
- Returns the name of the module where the class is defined.
44
+ Get the name of the module where the reflected class is defined.
37
45
 
38
46
  Returns
39
47
  -------
40
48
  str
41
- The name of the module.
49
+ The fully qualified module name where the class is defined.
42
50
  """
43
51
  pass
44
52
 
45
53
  @abstractmethod
46
54
  def getModuleWithClassName(self) -> str:
47
55
  """
48
- Returns the module name concatenated with the class name.
56
+ Get the fully qualified class name including module path.
49
57
 
50
58
  Returns
51
59
  -------
52
60
  str
53
- The module name followed by the class name.
61
+ The module name concatenated with the class name in the format 'module.ClassName'.
54
62
  """
55
63
  pass
56
64
 
57
65
  @abstractmethod
58
66
  def getDocstring(self) -> str:
59
67
  """
60
- Returns the docstring of the class.
68
+ Get the docstring of the reflected class.
61
69
 
62
70
  Returns
63
71
  -------
64
72
  str or None
65
- The docstring of the class, or None if not defined.
73
+ The class docstring if present, None if no docstring is defined.
66
74
  """
67
75
  pass
68
76
 
69
77
  @abstractmethod
70
78
  def getBaseClasses(self) -> list:
71
79
  """
72
- Returns a list of base classes of the reflected class.
80
+ Get all base classes of the reflected class.
73
81
 
74
82
  Returns
75
83
  -------
76
84
  list
77
- A list of base classes.
85
+ A list of base class types that the reflected class inherits from.
78
86
  """
79
87
  pass
80
88
 
81
89
  @abstractmethod
82
90
  def getSourceCode(self) -> str:
83
91
  """
84
- Returns the source code of the class.
92
+ Get the source code of the reflected class.
85
93
 
86
94
  Returns
87
95
  -------
88
96
  str
89
- The source code of the class.
97
+ The complete source code of the class as a string.
90
98
 
91
99
  Raises
92
100
  ------
93
101
  ReflectionValueError
94
- If the source code cannot be retrieved.
102
+ If the source code cannot be retrieved (e.g., built-in classes,
103
+ dynamically created classes, or unavailable source files).
95
104
  """
96
105
  pass
97
106
 
98
107
  @abstractmethod
99
108
  def getFile(self) -> str:
100
109
  """
101
- Returns the file path where the class is defined.
110
+ Get the file path where the reflected class is defined.
102
111
 
103
112
  Returns
104
113
  -------
105
114
  str
106
- The file path of the class definition.
115
+ The absolute file path of the class definition.
107
116
 
108
117
  Raises
109
118
  ------
110
119
  ReflectionValueError
111
- If the file path cannot be retrieved.
120
+ If the file path cannot be retrieved (e.g., built-in classes
121
+ or dynamically created classes).
112
122
  """
113
123
  pass
114
124
 
115
125
  @abstractmethod
116
126
  def getAnnotations(self) -> dict:
117
127
  """
118
- Returns the type annotations of the class.
128
+ Get the type annotations of the reflected class.
119
129
 
120
130
  Returns
121
131
  -------
122
132
  dict
123
- A dictionary of type annotations.
133
+ A dictionary mapping attribute names to their type annotations.
134
+ Returns empty dict if no annotations are present.
124
135
  """
125
136
  pass
126
137
 
127
138
  @abstractmethod
128
139
  def hasAttribute(self, attribute: str) -> bool:
129
140
  """
130
- Checks if the class has a specific attribute.
141
+ Check if the reflected class has a specific attribute.
131
142
 
132
143
  Parameters
133
144
  ----------
134
145
  attribute : str
135
- The name of the attribute to check.
146
+ The name of the attribute to check for existence.
136
147
 
137
148
  Returns
138
149
  -------
@@ -144,7 +155,7 @@ class IReflectionAbstract(ABC):
144
155
  @abstractmethod
145
156
  def getAttribute(self, attribute: str):
146
157
  """
147
- Returns the value of a specific class attribute.
158
+ Get the value of a specific class attribute.
148
159
 
149
160
  Parameters
150
161
  ----------
@@ -166,32 +177,42 @@ class IReflectionAbstract(ABC):
166
177
  @abstractmethod
167
178
  def setAttribute(self, name: str, value) -> bool:
168
179
  """
169
- Set an attribute value.
180
+ Set the value of a class attribute.
170
181
 
171
182
  Parameters
172
183
  ----------
173
184
  name : str
174
- The attribute name
185
+ The name of the attribute to set.
175
186
  value : Any
176
- The value to set
187
+ The value to assign to the attribute.
188
+
189
+ Returns
190
+ -------
191
+ bool
192
+ True if the attribute was successfully set.
177
193
 
178
194
  Raises
179
195
  ------
180
196
  ReflectionValueError
181
- If the attribute is read-only or invalid
197
+ If the attribute is read-only or the operation is invalid.
182
198
  """
183
199
  pass
184
200
 
185
201
  @abstractmethod
186
202
  def removeAttribute(self, name: str) -> bool:
187
203
  """
188
- Remove an attribute from the class.
204
+ Remove an attribute from the reflected class.
189
205
 
190
206
  Parameters
191
207
  ----------
192
208
  name : str
193
209
  The name of the attribute to remove.
194
210
 
211
+ Returns
212
+ -------
213
+ bool
214
+ True if the attribute was successfully removed.
215
+
195
216
  Raises
196
217
  ------
197
218
  ReflectionValueError
@@ -202,137 +223,122 @@ class IReflectionAbstract(ABC):
202
223
  @abstractmethod
203
224
  def getAttributes(self) -> dict:
204
225
  """
205
- Returns a dictionary of all class attributes (not instance attributes).
206
-
207
- Parameters
208
- ----------
209
- None
226
+ Get all non-callable class attributes.
210
227
 
211
228
  Returns
212
229
  -------
213
230
  dict
214
- A dictionary where keys are the names of class attributes and values are their corresponding values.
215
- Only attributes that are not callable, not static/class methods, not properties, and do not start with
216
- underscores (including dunder, protected, or private) are included.
231
+ A dictionary mapping attribute names to their values. Includes only
232
+ class attributes that are not callable, not static/class methods,
233
+ not properties, and do not start with underscores.
217
234
  """
218
235
  pass
219
236
 
220
237
  @abstractmethod
221
238
  def getPublicAttributes(self) -> dict:
222
239
  """
223
- Returns a dictionary of public class attributes (not instance attributes).
224
-
225
- Parameters
226
- ----------
227
- None
240
+ Get all public class attributes.
228
241
 
229
242
  Returns
230
243
  -------
231
244
  dict
232
- A dictionary where keys are the names of public class attributes and values are their corresponding values.
233
- Only attributes that are not callable, not static/class methods, not properties, and do not start with
234
- underscores (including dunder, protected, or private) are included.
245
+ A dictionary mapping public attribute names to their values.
246
+ Includes only class attributes that are not callable, not
247
+ static/class methods, not properties, and do not start with underscores.
235
248
  """
236
249
  pass
237
250
 
238
251
  @abstractmethod
239
252
  def getProtectedAttributes(self) -> dict:
240
253
  """
241
- Returns a dictionary of protected class attributes (not instance attributes).
242
-
243
- Parameters
244
- ----------
245
- None
254
+ Get all protected class attributes.
246
255
 
247
256
  Returns
248
257
  -------
249
258
  dict
250
- A dictionary where keys are the names of protected class attributes and values are their corresponding values.
251
- Only attributes that are not callable, not static/class methods, not properties, and start with a single underscore
252
- (indicating protected visibility) are included.
259
+ A dictionary mapping protected attribute names to their values.
260
+ Includes only class attributes that are not callable, not
261
+ static/class methods, not properties, and start with a single
262
+ underscore (indicating protected visibility).
253
263
  """
254
264
  pass
255
265
 
256
266
  @abstractmethod
257
267
  def getPrivateAttributes(self) -> dict:
258
268
  """
259
- Returns a dictionary of private class attributes (not instance attributes).
260
-
261
- Parameters
262
- ----------
263
- None
269
+ Get all private class attributes.
264
270
 
265
271
  Returns
266
272
  -------
267
273
  dict
268
- A dictionary where keys are the names of private class attributes and values are their corresponding values.
269
- Only attributes that are not callable, not static/class methods, not properties, and start with double underscores
270
- (indicating private visibility) are included.
274
+ A dictionary mapping private attribute names to their values.
275
+ Includes only class attributes that are not callable, not
276
+ static/class methods, not properties, and start with double
277
+ underscores (indicating private visibility).
271
278
  """
272
279
  pass
273
280
 
274
281
  @abstractmethod
275
282
  def getDunderAttributes(self) -> dict:
276
283
  """
277
- Returns a dictionary of dunder (double underscore) class attributes (not instance attributes).
278
-
279
- Parameters
280
- ----------
281
- None
284
+ Get all dunder (double underscore) class attributes.
282
285
 
283
286
  Returns
284
287
  -------
285
288
  dict
286
- A dictionary where keys are the names of dunder class attributes and values are their corresponding values.
287
- Only attributes that are not callable, not static/class methods, not properties, and start with double underscores
288
- (indicating dunder visibility) are included.
289
+ A dictionary mapping dunder attribute names to their values.
290
+ Includes only class attributes that are not callable, not
291
+ static/class methods, not properties, and follow the dunder
292
+ naming pattern (__attribute__).
289
293
  """
290
294
  pass
291
295
 
292
296
  @abstractmethod
293
297
  def getMagicAttributes(self) -> dict:
294
298
  """
295
- Returns a dictionary of magic (dunder) class attributes (not instance attributes).
296
-
297
- Parameters
298
- ----------
299
- None
299
+ Get all magic (dunder) class attributes.
300
300
 
301
301
  Returns
302
302
  -------
303
303
  dict
304
- A dictionary where keys are the names of magic class attributes and values are their corresponding values.
305
- Only attributes that are not callable, not static/class methods, not properties, and start with double underscores
306
- (indicating magic visibility) are included.
304
+ A dictionary mapping magic attribute names to their values.
305
+ Includes only class attributes that are not callable, not
306
+ static/class methods, not properties, and follow the magic
307
+ method naming pattern (__attribute__).
307
308
  """
308
309
  pass
309
310
 
310
311
  @abstractmethod
311
312
  def hasMethod(self, name: str) -> bool:
312
313
  """
313
- Check if the instance has a specific method.
314
+ Check if the reflected class has a specific method.
314
315
 
315
316
  Parameters
316
317
  ----------
317
318
  name : str
318
- The method name to check
319
+ The name of the method to check for existence.
319
320
 
320
321
  Returns
321
322
  -------
322
323
  bool
323
- True if the method exists, False otherwise
324
+ True if the method exists, False otherwise.
324
325
  """
325
326
  pass
326
327
 
327
328
  @abstractmethod
328
329
  def removeMethod(self, name: str) -> bool:
329
330
  """
330
- Remove a method from the class.
331
+ Remove a method from the reflected class.
331
332
 
332
333
  Parameters
333
334
  ----------
334
335
  name : str
335
- The method name to remove
336
+ The name of the method to remove.
337
+
338
+ Returns
339
+ -------
340
+ bool
341
+ True if the method was successfully removed.
336
342
 
337
343
  Raises
338
344
  ------
@@ -344,17 +350,17 @@ class IReflectionAbstract(ABC):
344
350
  @abstractmethod
345
351
  def getMethodSignature(self, name: str) -> inspect.Signature:
346
352
  """
347
- Get the signature of a method.
353
+ Get the signature of a specific method.
348
354
 
349
355
  Parameters
350
356
  ----------
351
357
  name : str
352
- The method name to get the signature for
358
+ The name of the method to get the signature for.
353
359
 
354
360
  Returns
355
361
  -------
356
- str
357
- The signature of the method
362
+ inspect.Signature
363
+ The signature object containing parameter information for the method.
358
364
 
359
365
  Raises
360
366
  ------
@@ -366,469 +372,425 @@ class IReflectionAbstract(ABC):
366
372
  @abstractmethod
367
373
  def getMethods(self) -> List[str]:
368
374
  """
369
- Get all method names of the instance.
375
+ Get all method names of the reflected class.
370
376
 
371
377
  Returns
372
378
  -------
373
379
  List[str]
374
- List of method names
380
+ A list containing the names of all methods in the class.
375
381
  """
376
382
  pass
377
383
 
378
384
  @abstractmethod
379
385
  def getPublicMethods(self) -> list:
380
386
  """
381
- Returns a list of public class methods (not instance methods).
382
-
383
- Parameters
384
- ----------
385
- None
387
+ Get all public method names of the reflected class.
386
388
 
387
389
  Returns
388
390
  -------
389
- dict
390
- A list where each element is the name of a public class method.
391
+ list
392
+ A list containing the names of all public methods (not starting with underscore).
391
393
  """
392
394
  pass
393
395
 
394
396
  @abstractmethod
395
397
  def getPublicSyncMethods(self) -> list:
396
398
  """
397
- Get all public synchronous method names of the class.
399
+ Get all public synchronous method names of the reflected class.
398
400
 
399
401
  Returns
400
402
  -------
401
403
  list
402
- List of public synchronous method names
404
+ A list containing the names of all public synchronous (non-async) methods.
403
405
  """
404
406
  pass
405
407
 
406
408
  @abstractmethod
407
409
  def getPublicAsyncMethods(self) -> list:
408
410
  """
409
- Get all public asynchronous method names of the class.
411
+ Get all public asynchronous method names of the reflected class.
410
412
 
411
413
  Returns
412
414
  -------
413
415
  list
414
- List of public asynchronous method names
416
+ A list containing the names of all public asynchronous methods.
415
417
  """
416
418
  pass
417
419
 
418
420
  @abstractmethod
419
421
  def getProtectedMethods(self) -> list:
420
422
  """
421
- Returns a list of protected class methods (not instance methods).
422
-
423
- Parameters
424
- ----------
425
- None
423
+ Get all protected method names of the reflected class.
426
424
 
427
425
  Returns
428
426
  -------
429
- dict
430
- A list where each element is the name of a protected class method.
427
+ list
428
+ A list containing the names of all protected methods (starting with single underscore).
431
429
  """
432
430
  pass
433
431
 
434
432
  @abstractmethod
435
433
  def getProtectedSyncMethods(self) -> list:
436
434
  """
437
- Get all protected synchronous method names of the class.
435
+ Get all protected synchronous method names of the reflected class.
438
436
 
439
437
  Returns
440
438
  -------
441
439
  list
442
- List of protected synchronous method names
440
+ A list containing the names of all protected synchronous methods.
443
441
  """
444
442
  pass
445
443
 
446
444
  @abstractmethod
447
445
  def getProtectedAsyncMethods(self) -> list:
448
446
  """
449
- Get all protected asynchronous method names of the class.
447
+ Get all protected asynchronous method names of the reflected class.
450
448
 
451
449
  Returns
452
450
  -------
453
451
  list
454
- List of protected asynchronous method names
452
+ A list containing the names of all protected asynchronous methods.
455
453
  """
456
454
  pass
457
455
 
458
456
  @abstractmethod
459
457
  def getPrivateMethods(self) -> list:
460
458
  """
461
- Returns a list of private class methods (not instance methods).
462
-
463
- Parameters
464
- ----------
465
- None
459
+ Get all private method names of the reflected class.
466
460
 
467
461
  Returns
468
462
  -------
469
463
  list
470
- A list where each element is the name of a private class method.
464
+ A list containing the names of all private methods (starting with double underscore).
471
465
  """
472
466
  pass
473
467
 
474
468
  @abstractmethod
475
469
  def getPrivateSyncMethods(self) -> list:
476
470
  """
477
- Get all private synchronous method names of the class.
471
+ Get all private synchronous method names of the reflected class.
478
472
 
479
473
  Returns
480
474
  -------
481
475
  list
482
- List of private synchronous method names
476
+ A list containing the names of all private synchronous methods.
483
477
  """
484
478
  pass
485
479
 
486
480
  @abstractmethod
487
481
  def getPrivateAsyncMethods(self) -> list:
488
482
  """
489
- Get all private asynchronous method names of the class.
483
+ Get all private asynchronous method names of the reflected class.
490
484
 
491
485
  Returns
492
486
  -------
493
487
  list
494
- List of private asynchronous method names
488
+ A list containing the names of all private asynchronous methods.
495
489
  """
496
490
  pass
497
491
 
498
492
  @abstractmethod
499
493
  def getPublicClassMethods(self) -> list:
500
494
  """
501
- Returns a list of public class methods (not instance methods).
502
-
503
- Parameters
504
- ----------
505
- None
495
+ Get all public class method names of the reflected class.
506
496
 
507
497
  Returns
508
498
  -------
509
499
  list
510
- A list where each element is the name of a public class method.
500
+ A list containing the names of all public class methods (decorated with @classmethod).
511
501
  """
512
502
  pass
513
503
 
514
504
  @abstractmethod
515
505
  def getPublicClassSyncMethods(self) -> list:
516
506
  """
517
- Get all public synchronous class method names of the class.
507
+ Get all public synchronous class method names of the reflected class.
518
508
 
519
509
  Returns
520
510
  -------
521
511
  list
522
- List of public synchronous class method names
512
+ A list containing the names of all public synchronous class methods.
523
513
  """
524
514
  pass
525
515
 
526
516
  @abstractmethod
527
517
  def getPublicClassAsyncMethods(self) -> list:
528
518
  """
529
- Get all public asynchronous class method names of the class.
519
+ Get all public asynchronous class method names of the reflected class.
530
520
 
531
521
  Returns
532
522
  -------
533
523
  list
534
- List of public asynchronous class method names
524
+ A list containing the names of all public asynchronous class methods.
535
525
  """
536
526
  pass
537
527
 
538
528
  @abstractmethod
539
529
  def getProtectedClassMethods(self) -> list:
540
530
  """
541
- Returns a list of protected class methods (not instance methods).
542
-
543
- Parameters
544
- ----------
545
- None
531
+ Get all protected class method names of the reflected class.
546
532
 
547
533
  Returns
548
534
  -------
549
535
  list
550
- A list where each element is the name of a protected class method.
536
+ A list containing the names of all protected class methods (starting with single underscore).
551
537
  """
552
538
  pass
553
539
 
554
540
  @abstractmethod
555
541
  def getProtectedClassSyncMethods(self) -> list:
556
542
  """
557
- Get all protected synchronous class method names of the class.
543
+ Get all protected synchronous class method names of the reflected class.
558
544
 
559
545
  Returns
560
546
  -------
561
547
  list
562
- List of protected synchronous class method names
548
+ A list containing the names of all protected synchronous class methods.
563
549
  """
564
550
  pass
565
551
 
566
552
  @abstractmethod
567
553
  def getProtectedClassAsyncMethods(self) -> list:
568
554
  """
569
- Get all protected asynchronous class method names of the class.
555
+ Get all protected asynchronous class method names of the reflected class.
570
556
 
571
557
  Returns
572
558
  -------
573
559
  list
574
- List of protected asynchronous class method names
560
+ A list containing the names of all protected asynchronous class methods.
575
561
  """
576
562
  pass
577
563
 
578
564
  @abstractmethod
579
565
  def getPrivateClassMethods(self) -> list:
580
566
  """
581
- Returns a list of private class methods (not instance methods).
582
-
583
- Parameters
584
- ----------
585
- None
567
+ Get all private class method names of the reflected class.
586
568
 
587
569
  Returns
588
570
  -------
589
571
  list
590
- A list where each element is the name of a private class method.
572
+ A list containing the names of all private class methods (starting with double underscore).
591
573
  """
592
574
  pass
593
575
 
594
576
  @abstractmethod
595
577
  def getPrivateClassSyncMethods(self) -> list:
596
578
  """
597
- Get all private synchronous class method names of the class.
579
+ Get all private synchronous class method names of the reflected class.
598
580
 
599
581
  Returns
600
582
  -------
601
583
  list
602
- List of private synchronous class method names
584
+ A list containing the names of all private synchronous class methods.
603
585
  """
604
586
  pass
605
587
 
606
588
  @abstractmethod
607
589
  def getPrivateClassAsyncMethods(self) -> list:
608
590
  """
609
- Get all private asynchronous class method names of the class.
591
+ Get all private asynchronous class method names of the reflected class.
610
592
 
611
593
  Returns
612
594
  -------
613
595
  list
614
- List of private asynchronous class method names
596
+ A list containing the names of all private asynchronous class methods.
615
597
  """
616
598
  pass
617
599
 
618
600
  @abstractmethod
619
601
  def getPublicStaticMethods(self) -> list:
620
602
  """
621
- Returns a list of public static methods of the class.
622
-
623
- Parameters
624
- ----------
625
- None
603
+ Get all public static method names of the reflected class.
626
604
 
627
605
  Returns
628
606
  -------
629
607
  list
630
- A list where each element is the name of a public static method.
608
+ A list containing the names of all public static methods (decorated with @staticmethod).
631
609
  """
632
610
  pass
633
611
 
634
612
  @abstractmethod
635
613
  def getPublicStaticSyncMethods(self) -> list:
636
614
  """
637
- Get all public synchronous static method names of the class.
615
+ Get all public synchronous static method names of the reflected class.
638
616
 
639
617
  Returns
640
618
  -------
641
619
  list
642
- List of public synchronous static method names
620
+ A list containing the names of all public synchronous static methods.
643
621
  """
644
622
  pass
645
623
 
646
624
  @abstractmethod
647
625
  def getPublicStaticAsyncMethods(self) -> list:
648
626
  """
649
- Get all public asynchronous static method names of the class.
627
+ Get all public asynchronous static method names of the reflected class.
650
628
 
651
629
  Returns
652
630
  -------
653
631
  list
654
- List of public asynchronous static method names
632
+ A list containing the names of all public asynchronous static methods.
655
633
  """
656
634
  pass
657
635
 
658
636
  @abstractmethod
659
637
  def getProtectedStaticMethods(self) -> list:
660
638
  """
661
- Returns a list of protected static methods of the class.
662
-
663
- Parameters
664
- ----------
665
- None
639
+ Get all protected static method names of the reflected class.
666
640
 
667
641
  Returns
668
642
  -------
669
643
  list
670
- A list where each element is the name of a protected static method.
644
+ A list containing the names of all protected static methods (starting with single underscore).
671
645
  """
672
646
  pass
673
647
 
674
648
  @abstractmethod
675
649
  def getProtectedStaticSyncMethods(self) -> list:
676
650
  """
677
- Get all protected synchronous static method names of the class.
651
+ Get all protected synchronous static method names of the reflected class.
678
652
 
679
653
  Returns
680
654
  -------
681
655
  list
682
- List of protected synchronous static method names
656
+ A list containing the names of all protected synchronous static methods.
683
657
  """
684
658
  pass
685
659
 
686
660
  @abstractmethod
687
661
  def getProtectedStaticAsyncMethods(self) -> list:
688
662
  """
689
- Get all protected asynchronous static method names of the class.
663
+ Get all protected asynchronous static method names of the reflected class.
690
664
 
691
665
  Returns
692
666
  -------
693
667
  list
694
- List of protected asynchronous static method names
668
+ A list containing the names of all protected asynchronous static methods.
695
669
  """
696
670
  pass
697
671
 
698
672
  @abstractmethod
699
673
  def getPrivateStaticMethods(self) -> list:
700
674
  """
701
- Returns a list of private static methods of the class.
702
-
703
- Parameters
704
- ----------
705
- None
675
+ Get all private static method names of the reflected class.
706
676
 
707
677
  Returns
708
678
  -------
709
679
  list
710
- A list where each element is the name of a private static method.
680
+ A list containing the names of all private static methods (starting with double underscore).
711
681
  """
712
682
  pass
713
683
 
714
684
  @abstractmethod
715
685
  def getPrivateStaticSyncMethods(self) -> list:
716
686
  """
717
- Get all private synchronous static method names of the class.
687
+ Get all private synchronous static method names of the reflected class.
718
688
 
719
689
  Returns
720
690
  -------
721
691
  list
722
- List of private synchronous static method names
692
+ A list containing the names of all private synchronous static methods.
723
693
  """
724
694
  pass
725
695
 
726
696
  @abstractmethod
727
697
  def getPrivateStaticAsyncMethods(self) -> list:
728
698
  """
729
- Get all private asynchronous static method names of the class.
699
+ Get all private asynchronous static method names of the reflected class.
730
700
 
731
701
  Returns
732
702
  -------
733
703
  list
734
- List of private asynchronous static method names
704
+ A list containing the names of all private asynchronous static methods.
735
705
  """
736
706
  pass
737
707
 
738
708
  @abstractmethod
739
709
  def getDunderMethods(self) -> list:
740
710
  """
741
- Returns a list of dunder (double underscore) methods of the class.
742
-
743
- Parameters
744
- ----------
745
- None
711
+ Get all dunder (double underscore) method names of the reflected class.
746
712
 
747
713
  Returns
748
714
  -------
749
715
  list
750
- A list where each element is the name of a dunder method.
716
+ A list containing the names of all dunder methods following the __method__ pattern.
751
717
  """
752
718
  pass
753
719
 
754
720
  @abstractmethod
755
721
  def getMagicMethods(self) -> list:
756
722
  """
757
- Returns a list of magic (dunder) methods of the class.
758
-
759
- Parameters
760
- ----------
761
- None
723
+ Get all magic (dunder) method names of the reflected class.
762
724
 
763
725
  Returns
764
726
  -------
765
727
  list
766
- A list where each element is the name of a magic method.
728
+ A list containing the names of all magic methods following the __method__ pattern.
767
729
  """
768
730
  pass
769
731
 
770
732
  @abstractmethod
771
- def getProperties(self) -> List:
733
+ def getProperties(self) -> List[str]:
772
734
  """
773
- Get all properties of the instance.
735
+ Get all property names of the reflected class.
774
736
 
775
737
  Returns
776
738
  -------
777
739
  List[str]
778
- List of property names
740
+ A list containing the names of all properties defined in the class.
779
741
  """
780
742
  pass
781
743
 
782
744
  @abstractmethod
783
- def getPublicProperties(self) -> List:
745
+ def getPublicProperties(self) -> List[str]:
784
746
  """
785
- Get all public properties of the instance.
747
+ Get all public property names of the reflected class.
786
748
 
787
749
  Returns
788
750
  -------
789
- List:
790
- List of public property names and their values
751
+ List[str]
752
+ A list containing the names of all public properties (not starting with underscore).
791
753
  """
792
754
  pass
793
755
 
794
756
  @abstractmethod
795
- def getProtectedProperties(self) -> List:
757
+ def getProtectedProperties(self) -> List[str]:
796
758
  """
797
- Get all protected properties of the instance.
759
+ Get all protected property names of the reflected class.
798
760
 
799
761
  Returns
800
762
  -------
801
- List
802
- List of protected property names and their values
763
+ List[str]
764
+ A list containing the names of all protected properties (starting with single underscore).
803
765
  """
804
766
  pass
805
767
 
806
768
  @abstractmethod
807
- def getPrivateProperties(self) -> List:
769
+ def getPrivateProperties(self) -> List[str]:
808
770
  """
809
- Get all private properties of the instance.
771
+ Get all private property names of the reflected class.
810
772
 
811
773
  Returns
812
774
  -------
813
- List
814
- List of private property names and their values
775
+ List[str]
776
+ A list containing the names of all private properties (starting with double underscore).
815
777
  """
816
778
  pass
817
779
 
818
780
  @abstractmethod
819
781
  def getPropertySignature(self, name: str) -> inspect.Signature:
820
782
  """
821
- Get the signature of a property.
783
+ Get the signature of a specific property.
822
784
 
823
785
  Parameters
824
786
  ----------
825
787
  name : str
826
- The property name to get the signature for
788
+ The name of the property to get the signature for.
827
789
 
828
790
  Returns
829
791
  -------
830
792
  inspect.Signature
831
- The signature of the property
793
+ The signature object containing parameter information for the property.
832
794
 
833
795
  Raises
834
796
  ------
@@ -840,17 +802,17 @@ class IReflectionAbstract(ABC):
840
802
  @abstractmethod
841
803
  def getPropertyDocstring(self, name: str) -> str:
842
804
  """
843
- Get the docstring of a property.
805
+ Get the docstring of a specific property.
844
806
 
845
807
  Parameters
846
808
  ----------
847
809
  name : str
848
- The property name to get the docstring for
810
+ The name of the property to get the docstring for.
849
811
 
850
812
  Returns
851
813
  -------
852
814
  str
853
- The docstring of the property
815
+ The docstring of the specified property if present, None if no docstring is defined.
854
816
 
855
817
  Raises
856
818
  ------
@@ -862,32 +824,37 @@ class IReflectionAbstract(ABC):
862
824
  @abstractmethod
863
825
  def getConstructorDependencies(self) -> ClassDependency:
864
826
  """
865
- Get the resolved and unresolved dependencies from the constructor of the instance's class.
827
+ Get the resolved and unresolved dependencies from the constructor of the reflected class.
866
828
 
867
829
  Returns
868
830
  -------
869
831
  ClassDependency
870
- A structured representation of the constructor dependencies, containing:
871
- - resolved: Dictionary of resolved dependencies with their names and values.
872
- - unresolved: List of unresolved dependencies (parameter names without default values or annotations).
832
+ A structured representation of the constructor dependencies containing:
833
+ - resolved: Dictionary of resolved dependencies with their names and values
834
+ - unresolved: List of unresolved dependencies (parameter names without default values or annotations)
873
835
  """
874
836
  pass
875
837
 
876
838
  @abstractmethod
877
839
  def getMethodDependencies(self, method_name: str) -> MethodDependency:
878
840
  """
879
- Get the resolved and unresolved dependencies from a method of the instance's class.
841
+ Get the resolved and unresolved dependencies from a specific method of the reflected class.
880
842
 
881
843
  Parameters
882
844
  ----------
883
845
  method_name : str
884
- The name of the method to inspect
846
+ The name of the method to inspect for dependencies.
885
847
 
886
848
  Returns
887
849
  -------
888
850
  MethodDependency
889
- A structured representation of the method dependencies, containing:
890
- - resolved: Dictionary of resolved dependencies with their names and values.
891
- - unresolved: List of unresolved dependencies (parameter names without default values or annotations).
851
+ A structured representation of the method dependencies containing:
852
+ - resolved: Dictionary of resolved dependencies with their names and values
853
+ - unresolved: List of unresolved dependencies (parameter names without default values or annotations)
854
+
855
+ Raises
856
+ ------
857
+ ReflectionValueError
858
+ If the method does not exist or is not accessible.
892
859
  """
893
860
  pass