public com.sun.javadoc.Type containingType() {
if (type.getEnclosingType().hasTag(CLASS)) {
// This is the type of an inner class.
return TypeMaker.getType(env, type.getEnclosingType());
}
ClassSymbol enclosing = type.tsym.owner.enclClass();
if (enclosing != null) {
// Nested but not inner. Return the ClassDoc of the enclosing
// class or interface.
// See java.lang.reflect.ParameterizedType.getOwnerType().
return env.getClassDoc(enclosing);