  We revisit the compositeness theorem proposed by Weinberg in an effective
field theory (EFT) and explore criteria which are sensitive to the structure of
$S$-wave threshold states. On a general basis, we show that the wave function
renormalization constant $Z$, which is the probability of finding an elementary
component in the wave function of a threshold state, can be explicitly
introduced in the description of the threshold state. As an application of this
EFT method, we describe the near-threshold line shape of the $D^{\ast 0}\bar
D^0$ invariant mass spectrum in $B\rightarrow D^{\ast 0}\bar D^0 K$ and
determine a nonvanishing value of $Z$. It suggests that the $X(3872)$ as a
candidate of the $D^{\ast 0}\bar D^0$ molecule may still contain a small
$c\bar{c}$ core. This elementary component, on the one hand, explains its
production in the $B$ meson decay via a short-distance mechanism, and on the
other hand, is correlated with the $D^{\ast 0}\bar D^0$ threshold enhancement
observed in the $D^{\ast 0}\bar D^0$ invariant mass distributions. Meanwhile,
we also show that if $Z$ is non-zero, the near-threshold enhancement of the
$D^{\ast 0}\bar D^0$ mass spectrum in the $B$ decay will be driven by the
short-distance production mechanism. This conclusion is still true even if the
long-distance production is enhanced by some unexpected mechanism.
