I have the following problem:Can Reflection be applied across packages in java? For eg:I have two packages
Package First\src Class A
Class B
Class TestReflection
Package Second\src
Class D
Class E
Now in the class TestReflection,I have written the code to get all the class names given a Package dynamically using Reflection API's. It is working only if I give the package First\src but not with Packge Second\src.Can anybody please help me with this. I need to get the class names of all the packages irrespective of where my code is written?
Aucun commentaire:
Enregistrer un commentaire