code: private Map<String, TypeVariableDefinition> getEnclosingTypeVars()
    {
      ICompilableType gsClass = getGosuClass();
      if( gsClass == null )
      {
        return Collections.emptyMap();
      }
      Map<String, TypeVariableDefinition> mapTypeVarDefByName = new HashMap<>( 2 );
      while( !gsClass.isStatic() && gsClass.getEnclosingType() != null )
      {
        // Note we don't resolve type vars defined in outer for static inner classes.
        // This is because we do not maintain separate inner classes for each
        // parameterization of a generic outer class
  
        ICompilableType enclosingType = gsClass.getEnclosingType();
        for( IGenericTypeVariable gtv : enclosingType.getGenericTypeVariables() )
        {
          Map<String, ITypeVariableDefinition> typeVarMap = getTypeVariables();
          if( !typeVarMap.containsKey( gtv.getTypeVariableDefinition().getName() ) )
          {
            getTypeVariables().put( gtv.getName(), gtv.getTypeVariableDefinition() );
          }
        }
        gsClass = enclosingType;
      }
      return mapTypeVarDefByName;
    }
docs: ## do we still need this method since inner class parsing re-uses the enclosing class' owner/parser