自定义java注释ind javadoc / doxygen

时间:2012-10-24 12:50:59

标签: annotations javadoc

我已经构建了一个自定义注释,如

    package com.uc4.ucdf.control.xgui;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface XGUIElement {

    public String Name();

    public String Description();

    public XGUIAttribute[] Attributes();

    public String CodeSnipet();
}

package com.uc4.ucdf.control.xgui;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface XGUIAttribute {

    public String Name();

    public String ValueType();

    public String Description();
}

在我的类文件中,我得到了这个注释

@XGUIElement(   Name = "dialog", 
                Description = "this component provides a empty internal window with a title and some properties like if its minimizable, maximizable", 
                CodeSnipet = "<dialog id=\"myDialog\" text=\"Hello World\">", 

                Attributes = {
                    @XGUIAttribute(Description = "Set the width of the Dialog", Name = "width", ValueType = "Integer"),
                    @XGUIAttribute(Description = "Set the height of the Dialog", Name = "height", ValueType = "Integer"),
                    @XGUIAttribute(Description = "1 for true; 0 for false", Name = "top", ValueType = "Integer"),
                    @XGUIAttribute(Description = "Set the left position of this dialog", Name = "left", ValueType = "Integer"),
                    @XGUIAttribute(Description = "Allows you to set the dialog over all not ontop dialogs 1 for true; 0 for false ", Name = "ontop", ValueType = "Integer")
                }

)

这可以创建,我可以读取我的swingComponent中的单个值 但我应该把这个annoation带到Doxygen的javaDoc构建中。

那么为什么我看不到我的javadoc中的注释以及我如何将它变成所有属性的表列表。

0 个答案:

没有答案