What XDoclet provides is a higher level code generation framework built on top of a lower level doclet like framework. Would you rather do code generation in
Java using very primitive operations or at a high level using templates and other code generation abstractions? XDoclet brings the framework.
Outside of code generation, you do see some doclets but the ones I have seen all do very low
level tasks. It's an adequate environment for doing documentation centric code generation, but it doesn't have any higher level domain specific functionality that make it well suited for anything in particular.