code: private static IType findActualDeclaringType( IType ownersType, IType declaringType )
    {
      if( ownersType == null )
      {
        return null;
      }
  
      if( declaringType.isParameterizedType() && !declaringType.isGenericType() )
      {
        return declaringType;
      }
  
      if( ownersType == declaringType )
      {
        return declaringType;
      }
  
      if( ownersType.getGenericType() == declaringType )
      {
        return ownersType;
      }
  
      IType actualDeclaringType = findActualDeclaringType( ownersType.getSupertype(), declaringType );
      if( actualDeclaringType != null && actualDeclaringType != declaringType )
      {
        return actualDeclaringType;
      }
  
      for( IType iface : ownersType.getInterfaces() )
      {
        actualDeclaringType = findActualDeclaringType( iface, declaringType );
        if( actualDeclaringType != null && actualDeclaringType != declaringType )
        {
          return actualDeclaringType;
        }
      }
  
      return declaringType;
    }
docs: parameterized type for Base<T>.