code: private static boolean typesEquivalent(Type typeToMatch, GenericArrayType type, ResolutionContext ctx) {
          if (typeToMatch instanceof GenericArrayType) {
              GenericArrayType aGat = (GenericArrayType) typeToMatch;
              return typesEquivalent(aGat.getGenericComponentType(),
                                     ctx.resolve(type.getGenericComponentType()),
                                     ctx);
          }
  
          if (typeToMatch instanceof Class) {
              Class<?> aClazz = (Class<?>) typeToMatch;
              if (aClazz.isArray()) {
                  return typesEquivalent(aClazz.getComponentType(), ctx.resolve(type.getGenericComponentType()), ctx);
              }
          }
  
          return false;
      }
docs: Computes whether a type is equivalent to a GenericArrayType.
  <p>
  This method will check that {@code typeToMatch} is either a {@link GenericArrayType} or an array and then recursively compare the component types of both arguments using
  {@link #typesEquivalent(Type, Type, ResolutionContext)}.
  
  @param typeToMatch the type to match against
  @param type the type to check, type variable resolution will be performed for this type
  @param ctx the resolution context to use to perform type variable resolution
  @return {@code true} if {@code type} is equivalent to {@code typeToMatch} after type resolution, otherwise {@code false}