Given a Java application that was written in terms of performance (that is, methods are not intentionally declared "strictfp" in the source code), is it possible to allow users to run the entire application in strict mode?
It seems like a rude approach would be to simply add the strictfp attribute to all methods of all classes using a custom class loader written with javassist. It will be like:
http://www.verious.com/qa/no-strictfp-in-scala-workarounds/
However, the class loader will need to add the strictpf attribute to all class methods in the application, including private ones. (The application is simply too large and complex to explicitly list all possible methods that may require the strictfp attribute.)
The javassist reflection API does not seem to support listing private methods:
http://www.csg.ci.iu-tokyo.ac.jp/~chiba/javassist/html/javassist/CtClass.html#getMethods ()
I want to do this in javassist (or generally using a user-friendly approach to loading classes)?
source share