User: vharcq
Date: 02/04/17 23:16:02
Modified: core/src/xdoclet DocletContext.java DocletTask.java
Log:
Move out xdoclet-generate generattion to a new ant property "addedtags" that can
take multiple comma separated tags to add to generated class javadoc.
Let ant take car of TODAY adding for example.
This permits more flexibility.
See samples build for an example.
Revision Changes Path
1.15 +137 -121 xdoclet/core/src/xdoclet/DocletContext.java
Index: DocletContext.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletContext.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -w -r1.14 -r1.15
--- DocletContext.java 4 Apr 2002 01:03:07 -0000 1.14
+++ DocletContext.java 18 Apr 2002 06:16:02 -0000 1.15
@@ -12,9 +12,14 @@
/**
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created June 19, 2001
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
-public class DocletContext implements java.io.Serializable {
+public class DocletContext implements java.io.Serializable
+{
+ /**
+ * @todo-javadoc Describe the field
+ */
+ private static DocletContext singleInstance = null;
/**
* @todo-javadoc Describe the field
*/
@@ -44,6 +49,8 @@
*/
private boolean force;
+ private String addedTags;
+
/**
* @todo-javadoc Describe the field
*/
@@ -52,11 +59,6 @@
* @todo-javadoc Describe the field
*/
private SubTask activeSubTask;
- /**
- * @todo-javadoc Describe the field
- */
- private static DocletContext singleInstance = null;
-
/**
* Describe what the DocletContext constructor does
@@ -68,6 +70,7 @@
* @param properties Describe what the parameter does
* @param configs Describe what the parameter does
* @param force Describe what the parameter does
+ * @param addedTags
* @todo-javadoc Write javadocs for constructor
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
@@ -84,8 +87,10 @@
SubTask[] subTasks,
Hashtable properties,
HashMap configs,
- boolean force
- ) {
+ boolean force,
+ String addedTags
+ )
+ {
this.destDir = destDir;
this.mergeDir = mergeDir;
this.excludedTags = excludedTags;
@@ -93,84 +98,101 @@
this.properties = properties;
this.configs = configs;
this.force = force;
+ this.addedTags = addedTags;
}
-
/**
- * Sets the ActiveSubTask attribute of the DocletContext object
+ * Gets the Instance attribute of the DocletContext class
*
- * @param activeSubTask The new ActiveSubTask value
+ * @return The Instance value
*/
- public void setActiveSubTask(SubTask activeSubTask) {
- this.activeSubTask = activeSubTask;
+ public static DocletContext getInstance()
+ {
+ return singleInstance;
}
+ /**
+ * Sets the SingleInstance attribute of the DocletContext class
+ *
+ * @param singleInstance The new SingleInstance value
+ */
+ public static void setSingleInstance( DocletContext singleInstance )
+ {
+ DocletContext.singleInstance = singleInstance;
+ }
/**
* Gets the ActiveSubTask attribute of the DocletContext object
*
* @return The ActiveSubTask value
*/
- public SubTask getActiveSubTask() {
+ public SubTask getActiveSubTask()
+ {
return activeSubTask;
}
-
/**
* Gets the DestDir attribute of the DocletContext object
*
* @return The DestDir value
*/
- public String getDestDir() {
+ public String getDestDir()
+ {
return destDir;
}
-
/**
* Gets the MergeDir attribute of the DocletContext object
*
* @return The MergeDir value
*/
- public String getMergeDir() {
+ public String getMergeDir()
+ {
return mergeDir;
}
-
/**
* Gets the Force attribute of the DocletContext object
*
* @return The Force value
*/
- public boolean isForce() {
+ public boolean isForce()
+ {
return force;
}
+ public String getAddedTags()
+ {
+ return addedTags;
+ }
/**
* Gets the ExcludedTags attribute of the DocletContext object
*
* @return The ExcludedTags value
*/
- public String getExcludedTags() {
- if (excludedTags == null) {
+ public String getExcludedTags()
+ {
+ if( excludedTags == null )
+ {
return "";
}
- else {
+ else
+ {
return excludedTags;
}
}
-
/**
* Gets the SubTasks attribute of the DocletContext object
*
* @return The SubTasks value
*/
- public SubTask[] getSubTasks() {
+ public SubTask[] getSubTasks()
+ {
return subTasks;
}
-
/**
* Gets the Property attribute of the DocletContext object
*
@@ -178,27 +200,28 @@
* @return The Property value
* @todo-javadoc Write javadocs for method parameter
*/
- public String getProperty(String name) {
+ public String getProperty( String name )
+ {
return (String)properties.get(name);
}
-
/**
* Gets the Properties attribute of the DocletContext object
*
* @return The Properties value
*/
- public Map getProperties() {
+ public Map getProperties()
+ {
//create one unmodifiableProperties instance and serve the world. It's
a safe bet because there's no
//DocletContext.setProperty method
- if (unmodifiableProperties == null) {
+ if( unmodifiableProperties == null )
+ {
unmodifiableProperties =
Collections.unmodifiableMap(properties);
}
return unmodifiableProperties;
}
-
/**
* Gets the ConfigParam attribute of the DocletContext object
*
@@ -206,11 +229,11 @@
* @return The ConfigParam value
* @todo-javadoc Write javadocs for method parameter
*/
- public Object getConfigParam(String name) {
+ public Object getConfigParam( String name )
+ {
return configs.get(name.toLowerCase());
}
-
/**
* Gets the SubTaskDefined attribute of the DocletContext object
*
@@ -218,11 +241,11 @@
* @return The SubTaskDefined value
* @todo-javadoc Write javadocs for method parameter
*/
- public boolean isSubTaskDefined(String subtask_name) {
+ public boolean isSubTaskDefined( String subtask_name )
+ {
return getSubTaskBy(subtask_name) != null;
}
-
/**
* Gets the SubTaskBy attribute of the DocletContext object
*
@@ -230,9 +253,12 @@
* @return The SubTaskBy value
* @todo-javadoc Write javadocs for method parameter
*/
- public SubTask getSubTaskBy(String subtask_name) {
- for (int i = 0; i < subTasks.length; i++) {
- if (subTasks[i] != null &&
subTasks[i].getSubTaskName().toLowerCase().equals(subtask_name.toLowerCase())) {
+ public SubTask getSubTaskBy( String subtask_name )
+ {
+ for( int i = 0; i < subTasks.length; i++ )
+ {
+ if( subTasks[i] != null &&
subTasks[i].getSubTaskName().toLowerCase().equals( subtask_name.toLowerCase() ) )
+ {
return subTasks[i];
}
}
@@ -240,24 +266,14 @@
return null;
}
-
/**
- * Sets the SingleInstance attribute of the DocletContext class
- *
- * @param singleInstance The new SingleInstance value
- */
- public static void setSingleInstance(DocletContext singleInstance) {
- DocletContext.singleInstance = singleInstance;
- }
-
-
- /**
- * Gets the Instance attribute of the DocletContext class
+ * Sets the ActiveSubTask attribute of the DocletContext object
*
- * @return The Instance value
+ * @param activeSubTask The new ActiveSubTask value
*/
- public static DocletContext getInstance() {
- return singleInstance;
+ public void setActiveSubTask( SubTask activeSubTask )
+ {
+ this.activeSubTask = activeSubTask;
}
}
1.38 +15 -2 xdoclet/core/src/xdoclet/DocletTask.java
Index: DocletTask.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/DocletTask.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -w -r1.37 -r1.38
--- DocletTask.java 16 Apr 2002 23:01:05 -0000 1.37
+++ DocletTask.java 18 Apr 2002 06:16:02 -0000 1.38
@@ -36,7 +36,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created June 19, 2001
- * @version $Revision: 1.37 $
+ * @version $Revision: 1.38 $
*/
public class DocletTask extends Task
{
@@ -84,6 +84,8 @@
*/
private boolean force = false;
+ private String addedTags;
+
/**
* @todo-javadoc Describe the field
*/
@@ -173,6 +175,11 @@
return force;
}
+ public String getAddedTags()
+ {
+ return addedTags;
+ }
+
/**
* Sets the Classpath attribute of the DocletTask object
*
@@ -277,6 +284,11 @@
this.force = force;
}
+ public void setAddedTags( String addedTags )
+ {
+ this.addedTags = addedTags;
+ }
+
/**
* Describe what the method does
*
@@ -480,7 +492,8 @@
( SubTask[] ) subtasks.toArray( new SubTask[0] ),
project.getProperties(),
configs,
- force
+ force,
+ addedTags
);
//now register this single instance
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel