Indirect methods in nuclear astrophysics