lundi 25 septembre 2017

Method Invocation Through Java Reflection

The following is mentioned in oracle documentation:

Reflection provides a means for invoking methods on a class. Typically, this would only be necessary if it is not possible to cast an instance of the class to the desired type in non-reflective code.

I need an explanation/example of how would it be not possible to "cast an instance of the class to the desired type in non-reflective code" ?





Aucun commentaire:

Enregistrer un commentaire