orionis 0.300.0__py3-none-any.whl → 0.301.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.
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.300.0"
8
+ VERSION = "0.301.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -0,0 +1,997 @@
1
+ from abc import ABC, abstractmethod
2
+ import inspect
3
+ from typing import Any, Callable, List, Type
4
+ from orionis.services.introspection.dependencies.entities.class_dependencies import ClassDependency
5
+ from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency
6
+ from orionis.services.introspection.instances.reflection_instance import ReflectionInstance
7
+
8
+ class IReflectionConcrete(ABC):
9
+
10
+ @abstractmethod
11
+ def getInstance(self, *args, **kwargs):
12
+ """
13
+ Returns an instance of the reflected class.
14
+
15
+ Parameters
16
+ ----------
17
+ *args : tuple
18
+ Positional arguments to pass to the class constructor.
19
+ **kwargs : dict
20
+ Keyword arguments to pass to the class constructor.
21
+
22
+ Returns
23
+ -------
24
+ object
25
+ An instance of the class type provided during initialization.
26
+
27
+ Raises
28
+ ------
29
+ ReflectionValueError
30
+ If instantiation fails or if the class defines an asynchronous __str__ method.
31
+ """
32
+ pass
33
+
34
+ @abstractmethod
35
+ def getClass(self) -> Type:
36
+ """
37
+ Returns the class type that this reflection concrete is based on.
38
+
39
+ Returns
40
+ -------
41
+ Type
42
+ The class type provided during initialization.
43
+ """
44
+ pass
45
+
46
+ @abstractmethod
47
+ def getClassName(self) -> str:
48
+ """
49
+ Returns the name of the class type.
50
+
51
+ Returns
52
+ -------
53
+ str
54
+ The name of the class type.
55
+ """
56
+ pass
57
+
58
+ @abstractmethod
59
+ def getModuleName(self) -> str:
60
+ """
61
+ Returns the name of the module where the class is defined.
62
+
63
+ Returns
64
+ -------
65
+ str
66
+ The name of the module.
67
+ """
68
+ pass
69
+
70
+ @abstractmethod
71
+ def getModuleWithClassName(self) -> str:
72
+ """
73
+ Returns the module name concatenated with the class name.
74
+
75
+ Returns
76
+ -------
77
+ str
78
+ The module name followed by the class name.
79
+ """
80
+ pass
81
+
82
+ @abstractmethod
83
+ def getDocstring(self) -> str:
84
+ """
85
+ Returns the docstring of the class.
86
+
87
+ Returns
88
+ -------
89
+ str or None
90
+ The docstring of the class, or None if not defined.
91
+ """
92
+ pass
93
+
94
+ @abstractmethod
95
+ def getBaseClasses(self) -> list:
96
+ """
97
+ Returns a list of base classes of the reflected class.
98
+
99
+ Returns
100
+ -------
101
+ list
102
+ A list of base classes.
103
+ """
104
+ pass
105
+
106
+ @abstractmethod
107
+ def getSourceCode(self) -> str:
108
+ """
109
+ Returns the source code of the class.
110
+
111
+ Returns
112
+ -------
113
+ str
114
+ The source code of the class.
115
+
116
+ Raises
117
+ ------
118
+ ReflectionValueError
119
+ If the source code cannot be retrieved.
120
+ """
121
+ pass
122
+
123
+ @abstractmethod
124
+ def getFile(self) -> str:
125
+ """
126
+ Returns the file path where the class is defined.
127
+
128
+ Returns
129
+ -------
130
+ str
131
+ The file path of the class definition.
132
+
133
+ Raises
134
+ ------
135
+ ReflectionValueError
136
+ If the file path cannot be retrieved.
137
+ """
138
+ pass
139
+
140
+ @abstractmethod
141
+ def getAnnotations(self) -> dict:
142
+ """
143
+ Returns the type annotations of the class.
144
+
145
+ Returns
146
+ -------
147
+ dict
148
+ A dictionary of type annotations.
149
+ """
150
+ pass
151
+
152
+ @abstractmethod
153
+ def hasAttribute(self, attribute: str) -> bool:
154
+ """
155
+ Checks if the class has a specific attribute.
156
+
157
+ Parameters
158
+ ----------
159
+ attribute : str
160
+ The name of the attribute to check.
161
+
162
+ Returns
163
+ -------
164
+ bool
165
+ True if the class has the specified attribute, False otherwise.
166
+ """
167
+ pass
168
+
169
+ @abstractmethod
170
+ def getAttribute(self, attribute: str):
171
+ """
172
+ Returns the value of a specific class attribute.
173
+
174
+ Parameters
175
+ ----------
176
+ attribute : str
177
+ The name of the attribute to retrieve.
178
+
179
+ Returns
180
+ -------
181
+ Any
182
+ The value of the specified class attribute.
183
+
184
+ Raises
185
+ ------
186
+ ReflectionValueError
187
+ If the attribute does not exist or is not accessible.
188
+ """
189
+ pass
190
+
191
+ @abstractmethod
192
+ def setAttribute(self, name: str, value) -> bool:
193
+ """
194
+ Set an attribute value.
195
+
196
+ Parameters
197
+ ----------
198
+ name : str
199
+ The attribute name
200
+ value : Any
201
+ The value to set
202
+
203
+ Raises
204
+ ------
205
+ ReflectionValueError
206
+ If the attribute is read-only or invalid
207
+ """
208
+ pass
209
+
210
+ @abstractmethod
211
+ def removeAttribute(self, name: str) -> bool:
212
+ """
213
+ Remove an attribute from the class.
214
+
215
+ Parameters
216
+ ----------
217
+ name : str
218
+ The name of the attribute to remove.
219
+
220
+ Raises
221
+ ------
222
+ ReflectionValueError
223
+ If the attribute does not exist or cannot be removed.
224
+ """
225
+ pass
226
+
227
+ @abstractmethod
228
+ def getAttributes(self) -> dict:
229
+ """
230
+ Returns a dictionary of all class attributes (not instance attributes).
231
+
232
+ Parameters
233
+ ----------
234
+ None
235
+
236
+ Returns
237
+ -------
238
+ dict
239
+ A dictionary where keys are the names of class attributes and values are their corresponding values.
240
+ Only attributes that are not callable, not static/class methods, not properties, and do not start with
241
+ underscores (including dunder, protected, or private) are included.
242
+ """
243
+ pass
244
+
245
+ @abstractmethod
246
+ def getPublicAttributes(self) -> dict:
247
+ """
248
+ Returns a dictionary of public class attributes (not instance attributes).
249
+
250
+ Parameters
251
+ ----------
252
+ None
253
+
254
+ Returns
255
+ -------
256
+ dict
257
+ A dictionary where keys are the names of public class attributes and values are their corresponding values.
258
+ Only attributes that are not callable, not static/class methods, not properties, and do not start with
259
+ underscores (including dunder, protected, or private) are included.
260
+ """
261
+ pass
262
+
263
+ @abstractmethod
264
+ def getProtectedAttributes(self) -> dict:
265
+ """
266
+ Returns a dictionary of protected class attributes (not instance attributes).
267
+
268
+ Parameters
269
+ ----------
270
+ None
271
+
272
+ Returns
273
+ -------
274
+ dict
275
+ A dictionary where keys are the names of protected class attributes and values are their corresponding values.
276
+ Only attributes that are not callable, not static/class methods, not properties, and start with a single underscore
277
+ (indicating protected visibility) are included.
278
+ """
279
+ pass
280
+
281
+ @abstractmethod
282
+ def getPrivateAttributes(self) -> dict:
283
+ """
284
+ Returns a dictionary of private class attributes (not instance attributes).
285
+
286
+ Parameters
287
+ ----------
288
+ None
289
+
290
+ Returns
291
+ -------
292
+ dict
293
+ A dictionary where keys are the names of private class attributes and values are their corresponding values.
294
+ Only attributes that are not callable, not static/class methods, not properties, and start with double underscores
295
+ (indicating private visibility) are included.
296
+ """
297
+ pass
298
+
299
+ @abstractmethod
300
+ def getDunderAttributes(self) -> dict:
301
+ """
302
+ Returns a dictionary of dunder (double underscore) class attributes (not instance attributes).
303
+
304
+ Parameters
305
+ ----------
306
+ None
307
+
308
+ Returns
309
+ -------
310
+ dict
311
+ A dictionary where keys are the names of dunder class attributes and values are their corresponding values.
312
+ Only attributes that are not callable, not static/class methods, not properties, and start with double underscores
313
+ (indicating dunder visibility) are included.
314
+ """
315
+ pass
316
+
317
+ @abstractmethod
318
+ def getMagicAttributes(self) -> dict:
319
+ """
320
+ Returns a dictionary of magic (dunder) class attributes (not instance attributes).
321
+
322
+ Parameters
323
+ ----------
324
+ None
325
+
326
+ Returns
327
+ -------
328
+ dict
329
+ A dictionary where keys are the names of magic class attributes and values are their corresponding values.
330
+ Only attributes that are not callable, not static/class methods, not properties, and start with double underscores
331
+ (indicating magic visibility) are included.
332
+ """
333
+ pass
334
+
335
+ @abstractmethod
336
+ def hasMethod(self, name: str) -> bool:
337
+ """
338
+ Check if the instance has a specific method.
339
+
340
+ Parameters
341
+ ----------
342
+ name : str
343
+ The method name to check
344
+
345
+ Returns
346
+ -------
347
+ bool
348
+ True if the method exists, False otherwise
349
+ """
350
+ pass
351
+
352
+ @abstractmethod
353
+ def callMethod(self, name: str, *args, **kwargs):
354
+ """
355
+ Call a method of the instance with the provided arguments.
356
+
357
+ Parameters
358
+ ----------
359
+ name : str
360
+ The method name to call
361
+ *args : tuple
362
+ Positional arguments to pass to the method
363
+ **kwargs : dict
364
+ Keyword arguments to pass to the method
365
+
366
+ Returns
367
+ -------
368
+ Any
369
+ The return value of the method call
370
+
371
+ Raises
372
+ ------
373
+ ReflectionValueError
374
+ If the method does not exist or is not callable.
375
+ """
376
+ pass
377
+
378
+ @abstractmethod
379
+ def setMethod(self, name: str, method: Callable) -> bool:
380
+ """
381
+ Set a method on the class.
382
+
383
+ Parameters
384
+ ----------
385
+ name : str
386
+ The method name to set
387
+ method : callable
388
+ The method to set
389
+
390
+ Raises
391
+ ------
392
+ ReflectionValueError
393
+ If the method is not callable or if the name is invalid.
394
+ """
395
+ pass
396
+
397
+ @abstractmethod
398
+ def removeMethod(self, name: str) -> bool:
399
+ """
400
+ Remove a method from the class.
401
+
402
+ Parameters
403
+ ----------
404
+ name : str
405
+ The method name to remove
406
+
407
+ Raises
408
+ ------
409
+ ReflectionValueError
410
+ If the method does not exist or cannot be removed.
411
+ """
412
+ pass
413
+
414
+ @abstractmethod
415
+ def getMethodSignature(self, name: str) -> inspect.Signature:
416
+ """
417
+ Get the signature of a method.
418
+
419
+ Parameters
420
+ ----------
421
+ name : str
422
+ The method name to get the signature for
423
+
424
+ Returns
425
+ -------
426
+ str
427
+ The signature of the method
428
+
429
+ Raises
430
+ ------
431
+ ReflectionValueError
432
+ If the method does not exist or is not callable.
433
+ """
434
+ pass
435
+
436
+ @abstractmethod
437
+ def getMethods(self) -> List[str]:
438
+ """
439
+ Get all method names of the instance.
440
+
441
+ Returns
442
+ -------
443
+ List[str]
444
+ List of method names
445
+ """
446
+ pass
447
+
448
+ @abstractmethod
449
+ def getPublicMethods(self) -> list:
450
+ """
451
+ Returns a list of public class methods (not instance methods).
452
+
453
+ Parameters
454
+ ----------
455
+ None
456
+
457
+ Returns
458
+ -------
459
+ dict
460
+ A list where each element is the name of a public class method.
461
+ """
462
+ pass
463
+
464
+ @abstractmethod
465
+ def getPublicSyncMethods(self) -> list:
466
+ """
467
+ Get all public synchronous method names of the class.
468
+
469
+ Returns
470
+ -------
471
+ list
472
+ List of public synchronous method names
473
+ """
474
+ pass
475
+
476
+ @abstractmethod
477
+ def getPublicAsyncMethods(self) -> list:
478
+ """
479
+ Get all public asynchronous method names of the class.
480
+
481
+ Returns
482
+ -------
483
+ list
484
+ List of public asynchronous method names
485
+ """
486
+ pass
487
+
488
+ @abstractmethod
489
+ def getProtectedMethods(self) -> list:
490
+ """
491
+ Returns a list of protected class methods (not instance methods).
492
+
493
+ Parameters
494
+ ----------
495
+ None
496
+
497
+ Returns
498
+ -------
499
+ dict
500
+ A list where each element is the name of a protected class method.
501
+ """
502
+ pass
503
+
504
+ @abstractmethod
505
+ def getProtectedSyncMethods(self) -> list:
506
+ """
507
+ Get all protected synchronous method names of the class.
508
+
509
+ Returns
510
+ -------
511
+ list
512
+ List of protected synchronous method names
513
+ """
514
+ pass
515
+
516
+ @abstractmethod
517
+ def getProtectedAsyncMethods(self) -> list:
518
+ """
519
+ Get all protected asynchronous method names of the class.
520
+
521
+ Returns
522
+ -------
523
+ list
524
+ List of protected asynchronous method names
525
+ """
526
+ pass
527
+
528
+ @abstractmethod
529
+ def getPrivateMethods(self) -> list:
530
+ """
531
+ Returns a list of private class methods (not instance methods).
532
+
533
+ Parameters
534
+ ----------
535
+ None
536
+
537
+ Returns
538
+ -------
539
+ list
540
+ A list where each element is the name of a private class method.
541
+ """
542
+ pass
543
+
544
+ @abstractmethod
545
+ def getPrivateSyncMethods(self) -> list:
546
+ """
547
+ Get all private synchronous method names of the class.
548
+
549
+ Returns
550
+ -------
551
+ list
552
+ List of private synchronous method names
553
+ """
554
+ pass
555
+
556
+ @abstractmethod
557
+ def getPrivateAsyncMethods(self) -> list:
558
+ """
559
+ Get all private asynchronous method names of the class.
560
+
561
+ Returns
562
+ -------
563
+ list
564
+ List of private asynchronous method names
565
+ """
566
+ pass
567
+
568
+ @abstractmethod
569
+ def getPublicClassMethods(self) -> list:
570
+ """
571
+ Returns a list of public class methods (not instance methods).
572
+
573
+ Parameters
574
+ ----------
575
+ None
576
+
577
+ Returns
578
+ -------
579
+ list
580
+ A list where each element is the name of a public class method.
581
+ """
582
+ pass
583
+
584
+ @abstractmethod
585
+ def getPublicClassSyncMethods(self) -> list:
586
+ """
587
+ Get all public synchronous class method names of the class.
588
+
589
+ Returns
590
+ -------
591
+ list
592
+ List of public synchronous class method names
593
+ """
594
+ pass
595
+
596
+ @abstractmethod
597
+ def getPublicClassAsyncMethods(self) -> list:
598
+ """
599
+ Get all public asynchronous class method names of the class.
600
+
601
+ Returns
602
+ -------
603
+ list
604
+ List of public asynchronous class method names
605
+ """
606
+ pass
607
+
608
+ @abstractmethod
609
+ def getProtectedClassMethods(self) -> list:
610
+ """
611
+ Returns a list of protected class methods (not instance methods).
612
+
613
+ Parameters
614
+ ----------
615
+ None
616
+
617
+ Returns
618
+ -------
619
+ list
620
+ A list where each element is the name of a protected class method.
621
+ """
622
+ pass
623
+
624
+ @abstractmethod
625
+ def getProtectedClassSyncMethods(self) -> list:
626
+ """
627
+ Get all protected synchronous class method names of the class.
628
+
629
+ Returns
630
+ -------
631
+ list
632
+ List of protected synchronous class method names
633
+ """
634
+ pass
635
+
636
+ @abstractmethod
637
+ def getProtectedClassAsyncMethods(self) -> list:
638
+ """
639
+ Get all protected asynchronous class method names of the class.
640
+
641
+ Returns
642
+ -------
643
+ list
644
+ List of protected asynchronous class method names
645
+ """
646
+ pass
647
+
648
+ @abstractmethod
649
+ def getPrivateClassMethods(self) -> list:
650
+ """
651
+ Returns a list of private class methods (not instance methods).
652
+
653
+ Parameters
654
+ ----------
655
+ None
656
+
657
+ Returns
658
+ -------
659
+ list
660
+ A list where each element is the name of a private class method.
661
+ """
662
+ pass
663
+
664
+ @abstractmethod
665
+ def getPrivateClassSyncMethods(self) -> list:
666
+ """
667
+ Get all private synchronous class method names of the class.
668
+
669
+ Returns
670
+ -------
671
+ list
672
+ List of private synchronous class method names
673
+ """
674
+ pass
675
+
676
+ @abstractmethod
677
+ def getPrivateClassAsyncMethods(self) -> list:
678
+ """
679
+ Get all private asynchronous class method names of the class.
680
+
681
+ Returns
682
+ -------
683
+ list
684
+ List of private asynchronous class method names
685
+ """
686
+ pass
687
+
688
+ @abstractmethod
689
+ def getPublicStaticMethods(self) -> list:
690
+ """
691
+ Returns a list of public static methods of the class.
692
+
693
+ Parameters
694
+ ----------
695
+ None
696
+
697
+ Returns
698
+ -------
699
+ list
700
+ A list where each element is the name of a public static method.
701
+ """
702
+ pass
703
+
704
+ @abstractmethod
705
+ def getPublicStaticSyncMethods(self) -> list:
706
+ """
707
+ Get all public synchronous static method names of the class.
708
+
709
+ Returns
710
+ -------
711
+ list
712
+ List of public synchronous static method names
713
+ """
714
+ pass
715
+
716
+ @abstractmethod
717
+ def getPublicStaticAsyncMethods(self) -> list:
718
+ """
719
+ Get all public asynchronous static method names of the class.
720
+
721
+ Returns
722
+ -------
723
+ list
724
+ List of public asynchronous static method names
725
+ """
726
+ pass
727
+
728
+ @abstractmethod
729
+ def getProtectedStaticMethods(self) -> list:
730
+ """
731
+ Returns a list of protected static methods of the class.
732
+
733
+ Parameters
734
+ ----------
735
+ None
736
+
737
+ Returns
738
+ -------
739
+ list
740
+ A list where each element is the name of a protected static method.
741
+ """
742
+ pass
743
+
744
+ @abstractmethod
745
+ def getProtectedStaticSyncMethods(self) -> list:
746
+ """
747
+ Get all protected synchronous static method names of the class.
748
+
749
+ Returns
750
+ -------
751
+ list
752
+ List of protected synchronous static method names
753
+ """
754
+ pass
755
+
756
+ @abstractmethod
757
+ def getProtectedStaticAsyncMethods(self) -> list:
758
+ """
759
+ Get all protected asynchronous static method names of the class.
760
+
761
+ Returns
762
+ -------
763
+ list
764
+ List of protected asynchronous static method names
765
+ """
766
+ pass
767
+
768
+ @abstractmethod
769
+ def getPrivateStaticMethods(self) -> list:
770
+ """
771
+ Returns a list of private static methods of the class.
772
+
773
+ Parameters
774
+ ----------
775
+ None
776
+
777
+ Returns
778
+ -------
779
+ list
780
+ A list where each element is the name of a private static method.
781
+ """
782
+ pass
783
+
784
+ @abstractmethod
785
+ def getPrivateStaticSyncMethods(self) -> list:
786
+ """
787
+ Get all private synchronous static method names of the class.
788
+
789
+ Returns
790
+ -------
791
+ list
792
+ List of private synchronous static method names
793
+ """
794
+ pass
795
+
796
+ @abstractmethod
797
+ def getPrivateStaticAsyncMethods(self) -> list:
798
+ """
799
+ Get all private asynchronous static method names of the class.
800
+
801
+ Returns
802
+ -------
803
+ list
804
+ List of private asynchronous static method names
805
+ """
806
+ pass
807
+
808
+ @abstractmethod
809
+ def getDunderMethods(self) -> list:
810
+ """
811
+ Returns a list of dunder (double underscore) methods of the class.
812
+
813
+ Parameters
814
+ ----------
815
+ None
816
+
817
+ Returns
818
+ -------
819
+ list
820
+ A list where each element is the name of a dunder method.
821
+ """
822
+ pass
823
+
824
+ @abstractmethod
825
+ def getMagicMethods(self) -> list:
826
+ """
827
+ Returns a list of magic (dunder) methods of the class.
828
+
829
+ Parameters
830
+ ----------
831
+ None
832
+
833
+ Returns
834
+ -------
835
+ list
836
+ A list where each element is the name of a magic method.
837
+ """
838
+ pass
839
+
840
+ @abstractmethod
841
+ def getProperties(self) -> List:
842
+ """
843
+ Get all properties of the instance.
844
+
845
+ Returns
846
+ -------
847
+ List[str]
848
+ List of property names
849
+ """
850
+ pass
851
+
852
+ @abstractmethod
853
+ def getPublicProperties(self) -> List:
854
+ """
855
+ Get all public properties of the instance.
856
+
857
+ Returns
858
+ -------
859
+ List:
860
+ List of public property names and their values
861
+ """
862
+ pass
863
+
864
+ @abstractmethod
865
+ def getProtectedProperties(self) -> List:
866
+ """
867
+ Get all protected properties of the instance.
868
+
869
+ Returns
870
+ -------
871
+ List
872
+ List of protected property names and their values
873
+ """
874
+ pass
875
+
876
+ @abstractmethod
877
+ def getPrivateProperties(self) -> List:
878
+ """
879
+ Get all private properties of the instance.
880
+
881
+ Returns
882
+ -------
883
+ List
884
+ List of private property names and their values
885
+ """
886
+ pass
887
+
888
+ @abstractmethod
889
+ def getPropierty(self, name: str) -> Any:
890
+ """
891
+ Get a specific property of the instance.
892
+
893
+ Parameters
894
+ ----------
895
+ name : str
896
+ The name of the property to retrieve
897
+
898
+ Returns
899
+ -------
900
+ Any
901
+ The value of the property
902
+
903
+ Raises
904
+ ------
905
+ ReflectionValueError
906
+ If the property does not exist or is not accessible.
907
+ """
908
+ pass
909
+
910
+ @abstractmethod
911
+ def getPropertySignature(self, name: str) -> inspect.Signature:
912
+ """
913
+ Get the signature of a property.
914
+
915
+ Parameters
916
+ ----------
917
+ name : str
918
+ The property name to get the signature for
919
+
920
+ Returns
921
+ -------
922
+ inspect.Signature
923
+ The signature of the property
924
+
925
+ Raises
926
+ ------
927
+ ReflectionValueError
928
+ If the property does not exist or is not accessible.
929
+ """
930
+ pass
931
+
932
+ @abstractmethod
933
+ def getPropiertyDocstring(self, name: str) -> str:
934
+ """
935
+ Get the docstring of a property.
936
+
937
+ Parameters
938
+ ----------
939
+ name : str
940
+ The property name to get the docstring for
941
+
942
+ Returns
943
+ -------
944
+ str
945
+ The docstring of the property
946
+
947
+ Raises
948
+ ------
949
+ ReflectionValueError
950
+ If the property does not exist or is not accessible.
951
+ """
952
+ pass
953
+
954
+ @abstractmethod
955
+ def getConstructorDependencies(self) -> ClassDependency:
956
+ """
957
+ Get the resolved and unresolved dependencies from the constructor of the instance's class.
958
+
959
+ Returns
960
+ -------
961
+ ClassDependency
962
+ A structured representation of the constructor dependencies, containing:
963
+ - resolved: Dictionary of resolved dependencies with their names and values.
964
+ - unresolved: List of unresolved dependencies (parameter names without default values or annotations).
965
+ """
966
+ pass
967
+
968
+ @abstractmethod
969
+ def getMethodDependencies(self, method_name: str) -> MethodDependency:
970
+ """
971
+ Get the resolved and unresolved dependencies from a method of the instance's class.
972
+
973
+ Parameters
974
+ ----------
975
+ method_name : str
976
+ The name of the method to inspect
977
+
978
+ Returns
979
+ -------
980
+ MethodDependency
981
+ A structured representation of the method dependencies, containing:
982
+ - resolved: Dictionary of resolved dependencies with their names and values.
983
+ - unresolved: List of unresolved dependencies (parameter names without default values or annotations).
984
+ """
985
+ pass
986
+
987
+ @abstractmethod
988
+ def reflectionInstance(self) -> ReflectionInstance:
989
+ """
990
+ Get the reflection instance of the concrete class.
991
+
992
+ Returns
993
+ -------
994
+ ReflectionInstance
995
+ An instance of ReflectionInstance for the concrete class
996
+ """
997
+ pass
@@ -1,18 +1,18 @@
1
+ import abc
1
2
  import inspect
2
3
  import keyword
3
- from typing import Any, Callable, Dict, List, Type
4
+ from typing import Any, Callable, List, Type
4
5
  from orionis.services.asynchrony.coroutines import Coroutine
6
+ from orionis.services.introspection.concretes.contracts.reflection_concrete import IReflectionConcrete
5
7
  from orionis.services.introspection.dependencies.entities.class_dependencies import ClassDependency
6
8
  from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency
7
9
  from orionis.services.introspection.dependencies.reflect_dependencies import ReflectDependencies
8
10
  from orionis.services.introspection.exceptions.reflection_attribute_error import ReflectionAttributeError
9
11
  from orionis.services.introspection.exceptions.reflection_type_error import ReflectionTypeError
10
12
  from orionis.services.introspection.exceptions.reflection_value_error import ReflectionValueError
11
- import abc
12
-
13
13
  from orionis.services.introspection.instances.reflection_instance import ReflectionInstance
14
14
 
15
- class ReflectionConcrete:
15
+ class ReflectionConcrete(IReflectionConcrete):
16
16
 
17
17
  def __init__(self, concrete: Type) -> None:
18
18
  """
@@ -88,7 +88,6 @@ class ReflectionConcrete:
88
88
  instance = self._concrete(*args, **kwargs)
89
89
 
90
90
  # Check if __str__ is a coroutine function
91
- import inspect
92
91
  str_method = getattr(instance, '__str__', None)
93
92
  if str_method and inspect.iscoroutinefunction(str_method):
94
93
  raise ReflectionValueError(
@@ -186,7 +185,6 @@ class ReflectionConcrete:
186
185
  ReflectionValueError
187
186
  If the source code cannot be retrieved.
188
187
  """
189
- import inspect
190
188
  try:
191
189
  return inspect.getsource(self._concrete)
192
190
  except OSError as e:
@@ -206,7 +204,6 @@ class ReflectionConcrete:
206
204
  ReflectionValueError
207
205
  If the file path cannot be retrieved.
208
206
  """
209
- import inspect
210
207
  try:
211
208
  return inspect.getfile(self._concrete)
212
209
  except TypeError as e:
@@ -1441,4 +1438,18 @@ class ReflectionConcrete:
1441
1438
  method_name = f"_{class_name}{method_name}"
1442
1439
 
1443
1440
  # Use ReflectDependencies to get method dependencies
1444
- return ReflectDependencies(self._concrete).getMethodDependencies(method_name)
1441
+ return ReflectDependencies(self._concrete).getMethodDependencies(method_name)
1442
+
1443
+ def reflectionInstance(self) -> ReflectionInstance:
1444
+ """
1445
+ Get the reflection instance of the concrete class.
1446
+
1447
+ Returns
1448
+ -------
1449
+ ReflectionInstance
1450
+ An instance of ReflectionInstance for the concrete class
1451
+ """
1452
+ if not self.__instance:
1453
+ raise ReflectionValueError(f"Instance of class '{self.getClassName()}' is not initialized. Use getInstance() to create an instance before calling methods.")
1454
+
1455
+ return ReflectionInstance(self.__instance)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.300.0
3
+ Version: 0.301.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -226,7 +226,7 @@ orionis/foundation/config/testing/entities/testing.py,sha256=AuhPU9O15Aeqs8jQVHW
226
226
  orionis/foundation/config/testing/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
227
227
  orionis/foundation/config/testing/enums/test_mode.py,sha256=IbFpauu7J-iSAfmC8jDbmTEYl8eZr-AexL-lyOh8_74,337
228
228
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
229
- orionis/metadata/framework.py,sha256=R-JsoGLrxcrd1Lg3XxLUWlT6tmNZ4uyXPhYfASmQP3A,4960
229
+ orionis/metadata/framework.py,sha256=PSd7xp-LXOmE0Ig5s-bfvr6VebNpm_oIYp8Ha_inz7s,4960
230
230
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
231
231
  orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
232
232
  orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -250,7 +250,9 @@ orionis/services/environment/exceptions/environment_value_error.py,sha256=Y3QTwz
250
250
  orionis/services/environment/exceptions/environment_value_exception.py,sha256=zlxRFJwi0Yj-xFHQUvZ8X1ZlxRDDVv7Xcw-w4qCocL4,646
251
251
  orionis/services/introspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
252
252
  orionis/services/introspection/concretes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
253
- orionis/services/introspection/concretes/reflection_concrete.py,sha256=5vCwokfKJerpUnFRz_IVDMj-5BdbbIy4OUkTJ7KxB4E,49050
253
+ orionis/services/introspection/concretes/reflection_concrete.py,sha256=NJYzXLlOF1GMakonlwvyZzmAQC3LULvCFIzRzi8x2Wo,49627
254
+ orionis/services/introspection/concretes/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
255
+ orionis/services/introspection/concretes/contracts/reflection_concrete.py,sha256=JiCgsmx-9M2a3PpAUOLeq2c0EkG231FArKYs54SeuRc,25068
254
256
  orionis/services/introspection/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
255
257
  orionis/services/introspection/dependencies/reflect_dependencies.py,sha256=HL2cX7_SSIWeKxzBDUMEdmfjetrZmMfPZvqM34DvJMg,7145
256
258
  orionis/services/introspection/dependencies/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -355,7 +357,7 @@ orionis/test/suites/contracts/test_suite.py,sha256=eluzYwkNBbKjxYStj_tHN_Fm3YDPp
355
357
  orionis/test/suites/contracts/test_unit.py,sha256=l1LQllODyvcSByXMl1lGrUkoLsXbBHZZLWZI4A-mlQg,5881
356
358
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
357
359
  orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
358
- orionis-0.300.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
360
+ orionis-0.301.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
359
361
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
360
362
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
361
363
  tests/example/test_example.py,sha256=vt4UsQ1sDWZU9zFjrO2zcfZNDFj8h9TgnCRGtdNN358,601
@@ -459,8 +461,8 @@ tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py,sha256=
459
461
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
460
462
  tests/testing/test_testing_result.py,sha256=MrGK3ZimedL0b5Ydu69Dg8Iul017AzLTm7VPxpXlpfU,4315
461
463
  tests/testing/test_testing_unit.py,sha256=A6QkiOkP7GPC1Szh_GqsrV7GxjWjK8cIwFez6YfrzmM,7683
462
- orionis-0.300.0.dist-info/METADATA,sha256=RPubn8dwFyV0kTRUWgJOWGixxR86EorukI_6qlaa9BI,4772
463
- orionis-0.300.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
464
- orionis-0.300.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
465
- orionis-0.300.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
466
- orionis-0.300.0.dist-info/RECORD,,
464
+ orionis-0.301.0.dist-info/METADATA,sha256=v2fmT3Ds6Metnra-CcLZj63e87wr2VPpTYbSu1fa1xc,4772
465
+ orionis-0.301.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
466
+ orionis-0.301.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
467
+ orionis-0.301.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
468
+ orionis-0.301.0.dist-info/RECORD,,