[antlr-interest] site back up
Gavin Lambert
antlr at mirality.co.nz
Tue Aug 26 03:48:43 PDT 2008
At 13:10 26/08/2008, Terence Parr wrote:
>Back up...another case of HomePage.class reference in Java not
>executing static initializer...i have to use new HomePage()
dummy
>load to get it to exec static {...} Weird...i pushed .class
files
>compiled with 1.5 and it broke. 3 hours down the drain.
>grrrrrrrrrrrrrrrrrr!
I don't know how much Java and C# are alike in this respect, but
in C# a class's static constructor isn't called until sometime
near when the first reference to that class is made (eg. instance
constructor call or static method call)...
(I say "sometime near" because the standard is a little vague. It
usually seems to work out that it's called when entering the
method that makes the instance constructor or static method call,
rather than at the actual call site.)
More information about the antlr-interest
mailing list