What is XDoclet?

Source: Internet
Author: User
Http://blog.csdn.net/youge/archive/2005/11/15/529805.aspx
Quote:
What is XDoclet?

If you have used XDoclet or read the first XDoclet tutorial, skip this page.

XDoclet makes it easier to automatically generate deployment descriptors. XDoclet is a code generation utility that allows you to add metadata to language features such as classes, methods, and fields using something like the javadoc tag. Subsequently, it uses the additional metadata to generate related files such as deployment descriptors and source code. This includes a name: Attribute-oriented programming (Aspect-Oriented Programming) (not to be confused with Aspect-oriented programming (Aspect-Oriented Programming), which is another AOP ).

XDoclet parses source files to generate these files. The parsing method is similar to that of javadoc engine to parse source code to create javadoc documents. In fact, early versions of XDoclet depend on javadoc. Like javadoc, XDoclet can not only access the additional metadata that you add to the Code as a javadoc tag, but also access the source code structure, that is, packages, classes, methods, and fields. Then, it applies the layered tree of data to the template. It uses the entire tree and some templates (which you can define) to generate support files. The support files generated by other methods are monotonous. This tutorial focuses on how to use the existing templates that come with XDoclet.

XDoclet provides an ant task that enables you to create web. XML files, ejb-jar.xml files, and more. In this tutorial, you will use XDoclet to generate a web application deployment descriptor using the webdoclet ant task. In addition, you will generate an EJB support file. Note: The XDoclet ant task is not provided with the standard ant distribution. You must download the XDoclet ant task from the http://xdoclet.sourceforge.net.

Therefore, you may ask, "What is my concern? I am a good Java/J2EE Web Developer and I never need XDoclet ." You may also say, "I already use XDoclet. Why do you need to write your own template ?" As I mentioned earlier, you do not know what you are missing. Once you start using XDoclet, you will be relieved. Once you write your own template, you will never repeat the work. If you are writing tedious code, you will probably switch to XDoclet. Allow XDoclet to generate monotonous content and stick to the prepared content. Humans invented computers to let them do boring things, and freed themselves from doing creative things. XDoclet frees developers from monotonous code. XDoclet is a part of your original J2EE and Web Service development process. It can speed up your development. You must understand how to use the XDoclet template.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.