Add support for generics and annotations