The theory of multipoles in classical electromagnetism