I thought I understood Java generics pretty well, but then I came across the following in java.lang.Enum:
class Enum> >
class Enum>
According to wikipedia, this pattern is called Curiously recurring template pattern. Basically, by using the CRTP pattern, we can easily refer to subclass type without type casting, which means by using the pattern, we can imitate virtual function.