XDoclet description

zhaozj2021-02-12  135

XDoclet description

XDoclet is an extended Javadoc Doclet engine. It is a common Java tool that allows you to create your own javadoc @tags and use the Templet Engening in the XDoclet to generate source code or other files (eg XML Deployment Descriptors) based on the TEMPLET ENGING in the xdoclet. XDoclet has supported some common tasks, such as generating web.xml and ejb-jar.xml, etc., users can create other Templets and @Tags to increase support for other technology

Amazing goal is to allow you to "Continuous Integration" in the component-based development project. The point is to specify their "original data" (Meta-Data) while you write each component code, which is set to set the distribution meta-data of each component. You don't have to worry about these distribution properties, because you can touch the code, these distribution properties and code are simultaneously modified. This will continue to integrate, and the whole process is natural is Round-Trip. We call it "Continuous Reconfiguration". XDoclets are well suited to become part of the build process such as apache-ant.

The entire system is scalable. If you need, you can write special Templet for your specific task (such as supporting new App Server, defining or mapping schema for Toplink, or even servlet as components). XDoclet has supported some pre-written Templet and @tags, such as what is provided for EJB.

, To automatically generate web.xml

and many more.

XDoclets are based on the following parts:

Apache Ant Task:

with

Is an example of this task. In your build.xml file, define before the TAGet of the compiled code.

Task Nested Elements: This is where the source code needs to be executed. E.g

with

. Each sub-task can be configured separately.

Template file: Submission can generate an output based on the Template file. Template can be included

Text file for xml elements. The Template file is similar to the JSP file,

Similar to JSP tags, actually implementation is located in subtracks, a base class defines some common TAG special javadoc @tags: define settings for each component by using special javadoc @tags. For example, define a @Web: servlet name = "the simple servlet" in simpleServlet.java.

Subsites know that SimpleServlet.java contains a definition of a servlet, which can be used to generate the corresponding web.xml description using the information in the @Web: Servlet Tag.

The mege system: To avoid too much Tags, xdoclets can also use a Merge System. For example, in order to avoid writing @JBoss: table-name account in the EJBean source code, you can define a jaws-db-setting-accountn.xml file, which contains the actual XML code, which can be

Submission merged into the finally generated jaws.xml file

Refer to Sample Code and Sample Build.xml files

XDoclet is the successor of EJBDoclet, and EJBDoclet is a pioneer of Rickard Oberg - one of the best programmers in the world. The project initiated by the Pioneer-initiated project. During the development of this project, it gradually discovered not only to use not only In EJB, then a new project has started with a broader application as a goal. You can download it from http://sourceforge.net/projects/xdoclet.

转载请注明原文地址:https://www.9cbs.com/read-6750.html

New Post(0)