As of 1.0.1, TypeElementImpl considers type parameters to be "enclosed elements" that are to be returned by the getEnclosedElement() method. But the implementation used by javac (I tested openjdk and oracle versions, jdk 7 and 8) does not return type parameters as enclosed elements.