SyntaxFix
Write A Post
Hire A Developer
Questions
Do what @toolkit says. Do not do anything like this:
return new Object() { }.getClass().getEnclosingClass();
(Edit: Or if you are using a Java version that came out well after this answer was originally written, @Rein.)