I use ModelMapper and I found construction like this:
Type listType = new TypeToken<List<String>>() {}.getType();
I understand that there is generic type <List<String>>
but what about this {}.getType()
?
Is it some kind of lambda? Why there is no =>?
>() {}` is an instance of an anonymous subclass.
– khelwood Aug 26 '20 at 10:18