I have a class containing a static create method.
public class TestClass {
public static TestClass create() {
return new TestClass&l
Yeah, that's pretty... unintuitive.
A sidenote from Josh Bloch's presentation of his Effective Java, 2nd Edition about the issue: "God kills a kitten every time you specify an explicit type parameter". I would like to avoid constructs like this but sometimes it cannot be evaded.
The trick is to specify the generic parameter after the . character: TestClass..