I am working on an application that hosts user defined stored procedures that are provided as Java class files. The procedures need to be deterministic, and I want to black list various packages and methods that are sources of non-determinism. I have looked at what is available in java.lang.Class and javax.tools.*.
It looks like I can audit members, method parameters, and return types using java.lang.Class. However to audit the method contents it looks like I would have to analyze the raw class file.
There also corner cases like static intitialization blocks and member variable intialization that I need to audit. There are cases like java.util.Date where the default constructor is non-deterministic, but the others are fine.
Is there a framework or tool that would make analyzing these aspects of a class file easy?