Look at our `extend/pathname.rb`, there should be a helper function in there to generate this kind of jar wrapper.