samedi 25 mars 2017

When is using reflection a good practice?

I recently learned about reflection in my course and was given an assignment to create objects from an XML file using reflection in Java. Through searching this site I'm noticing there seems to be a general consensus that using reflection, particularly in this way, is a bad idea. Odd to me because we were told this is one of the most useful things we'll learn this semester.

I have no control over my assignment so I'll just have to complete it this way anyhow. But I was wondering, when is using reflection a good practice? And what are some industry examples you might have where reflection was the best way to go about a problem?





Aucun commentaire:

Enregistrer un commentaire