In my practice as a Java programmer, I would have found the methods provided by classes such as sun.reflect.Reflection
or sun.misc.Unsafe
very useful in some cases, for example the ability to write caller-sensitive code. However, the use of sun.reflect
and related packages by application code is strongly advised against as it is not public API. What are the reasons that this functionality is not added to the Java Standard Library? Sometimes I get the impression that the Java API developers mistrust a programmer's ability to consider potential risks of these methods and make a conscious decision on when their use is reasonable.
lundi 5 septembre 2016
Why are classes such as sun.reflect.Reflection not public API?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire