The criticality of the (2+1)-dimensional XY model is investigated with the numerical diagonalization method. So far, it has been considered that the diagonalization method would not be very suitable for analyzing the criticality in large dimensions (d ge 3); in fact, the tractable system size with the diagonalization method is severely restricted. In this paper, we employ Novotnys method, which enables us to treat a variety of system sizes N=6,8,...,20 (N: the number of spins constituting a cluster). For that purpose, we develop an off-diagonal version of Novotnys method to adopt the off-diagonal (quantum-mechanical XY) interaction. Moreover, in order to improve the finite-size-scaling behavior, we tune the coupling-constant parameters to a scale-invariant point. As a result, we estimate the critical indices as u=0.675(20) and gamma/ u=1.97(10).