Classes can be inside methods and, strangely enough, inside constructors:
private <T> MainClass() {
class Foo {
private T elem;
}
}
As in the example, there might be type information to get from there. This issue is about extending TypeVariableResolver#registerTypes to not just consider the enclosing class but enclosing methods and constructors, too.
Note that initializer blocks may also contain local classes.
Classes can be inside methods and, strangely enough, inside constructors:
As in the example, there might be type information to get from there. This issue is about extending TypeVariableResolver#registerTypes to not just consider the enclosing class but enclosing methods and constructors, too.
Note that initializer blocks may also contain local classes.