Frege/native-gen — pull request #2 by cytb (2014-04-08 18:27:11+00:00)
Title: fix issue of classFor. (causes ExceptionInInitializerError)

When I used native-gen to the eclipse-jdt jars (AST Parsers), following error occured:
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:259)
> at frege.nativegen.java.Lang.eval(Lang.java:831)
> ...

"ExceptionInInitializerError" is raised when the static initializer failed.
And above dump is caused by Class.forName in function classFor.

According to http://stackoverflow.com/a/7099453, the method "java.lang.Class.forName" calls
static initializer 'clinit' on loading the classes, and the native-gen uses 'java.lang.Class' object
only for metainfo, thus, I think this behavior won't be necessary.
In contrast, the "java.lang.ClassLoader.loadClass" doesn't call 'clinit', and I suppose it will be better.

Thank you for reading this.