This is the follow up of my question here: Weird Java generic.
If I have a code like this:
Casts. cast(iterable[index]);
<
I'm pretty sure the answer is no--if you want to use a generic method call, you need an object to call it on (foo.
). If the method is static, you need the class ( Foo.
).
This is even true if you're calling the method from elsewhere in the class itself. If you are working in a non-static method (i.e. in an instance method), you would call this.
.