|
@@ -81,6 +81,9 @@ import java.util.Properties; |
|
|
*/ |
|
|
*/ |
|
|
public class AntTagsHandler extends XDocletTagSupport { |
|
|
public class AntTagsHandler extends XDocletTagSupport { |
|
|
|
|
|
|
|
|
|
|
|
/** Default category for tasks without a category attribute. */ |
|
|
|
|
|
public static final String DEFAULT_CATEGORY = "other"; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @todo add check for execute method |
|
|
* @todo add check for execute method |
|
|
*/ |
|
|
*/ |
|
@@ -163,6 +166,7 @@ public class AntTagsHandler extends XDocletTagSupport { |
|
|
* Provides the Ant task name. |
|
|
* Provides the Ant task name. |
|
|
* |
|
|
* |
|
|
* @see getTaskName |
|
|
* @see getTaskName |
|
|
|
|
|
* @doc:tag type="content" |
|
|
*/ |
|
|
*/ |
|
|
public String taskName() throws XDocletException { |
|
|
public String taskName() throws XDocletException { |
|
|
return getTaskName(getCurrentClass()); |
|
|
return getTaskName(getCurrentClass()); |
|
@@ -197,6 +201,33 @@ public class AntTagsHandler extends XDocletTagSupport { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Provides the Ant category name. |
|
|
|
|
|
* |
|
|
|
|
|
* @see getCategoryName |
|
|
|
|
|
*/ |
|
|
|
|
|
public String categoryName() throws XDocletException { |
|
|
|
|
|
return getCategoryName(getCurrentClass()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Provides the Ant category name as the Value of the category attribute, |
|
|
|
|
|
* <code>@ant:task category="..."</code>. This attribute is mandatory. |
|
|
|
|
|
*/ |
|
|
|
|
|
public static final String getCategoryName(ClassDoc clazz) throws XDocletException { |
|
|
|
|
|
String tagValue = getTagValue(clazz, "ant:task", "category", -1, |
|
|
|
|
|
null, null, null, null, |
|
|
|
|
|
null, false, XDocletTagSupport.FOR_CLASS, true); |
|
|
|
|
|
if (tagValue != null) { |
|
|
|
|
|
tagValue = tagValue.toLowerCase(); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
tagValue = DEFAULT_CATEGORY; |
|
|
|
|
|
} |
|
|
|
|
|
return tagValue; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Returns true if the method corresponds to an Ant task attribute using |
|
|
* Returns true if the method corresponds to an Ant task attribute using |
|
|
* the rules from IntrospectionHelper |
|
|
* the rules from IntrospectionHelper |
|
|