We investigate an application of twisted boundary conditions for study of low-energy hadron-hadron interactions with Lushcers finite size method. It allows us to calculate the phase shifts for elastic scattering of two hadrons at any small value of the scattering momentum even in a finite volume. We then can extract model independent information of low-energy scattering parameters such as the scattering length, the effective range and the effective volume from the $S$-wave and $P$-wave scattering phase shifts through the effective range expansion. This approach also enables us to examine the existence of near-threshold and narrow resonance states, of which characteristic is observed in many of newly discovered charmonium-like $XYZ$ mesons. As a simple example, we demonstrate our method for low-energy $J/psi$-$phi$ scatterings to search for Y(4140) resonance using 2+1 flavor PACS-CS gauge configurations at the lightest pion mass, $m_{pi}=156$ MeV.