User: rinkrank
Date: 02/05/30 11:39:03
Modified: modules/ejb/src/xdoclet/modules/ejb/lookup
LookupObjectSubTask.java LookupUtilTagsHandler.java
Log:
Refactoring which removes redundant subtask names (both in @xdoclet.subtask
name="blabla" and in code)
-Removed the static SUBTASK_NAME and overridden getSubTaskName() from all SubTasks
(it's final now in SubTask)
-DocletTask stores all subtask names in a Class->String Map, using the name from
xdoclet.xml (which in turn comes from @xdoclet.subtask name="blabla"
-All references to SomeSubTask.SUBTASK_NAME replaced by a call to
DocletTask.getSubTaskName(Class subTaskClass)
-Improved error reporting in DocletTask
-Reverted the ejbjarxml/webxml to deploymentdescriptor
-Added omit.docs flag in xdoclet/build.xml set it to true in ANT_OPTS for faster
build
Revision Changes Path
1.4 +1 -13
xdoclet/modules/ejb/src/xdoclet/modules/ejb/lookup/LookupObjectSubTask.java
Index: LookupObjectSubTask.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/lookup/LookupObjectSubTask.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- LookupObjectSubTask.java 28 May 2002 22:35:20 -0000 1.3
+++ LookupObjectSubTask.java 30 May 2002 18:39:03 -0000 1.4
@@ -21,12 +21,10 @@
* @author Konstantin Pribluda
* @created October 3, 2001
* @xdoclet:subtask display-name="Lookup Object" name="utilobject"
parent="xdoclet.modules.ejb.EjbDocletTask"
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class LookupObjectSubTask extends AbstractEjbCodeGeneratorSubTask
{
- public final static String SUBTASK_NAME = "utilObject";
-
public final static String DEFAULT_UTIL_CLASS_PATTERN = "{0}Util";
private static String DEFAULT_TEMPLATE_FILE = "resources/lookup.xdt";
@@ -74,16 +72,6 @@
public String getKind()
{
return kind;
- }
-
- /**
- * Gets the SubTaskName attribute of the UtilObjectSubTask object
- *
- * @return The SubTaskName value
- */
- public String getSubTaskName()
- {
- return SUBTASK_NAME;
}
/**
1.3 +5 -4
xdoclet/modules/ejb/src/xdoclet/modules/ejb/lookup/LookupUtilTagsHandler.java
Index: LookupUtilTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/lookup/LookupUtilTagsHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- LookupUtilTagsHandler.java 28 May 2002 21:44:52 -0000 1.2
+++ LookupUtilTagsHandler.java 30 May 2002 18:39:03 -0000 1.3
@@ -10,6 +10,7 @@
import xjavadoc.XClass;
import xdoclet.DocletContext;
+import xdoclet.DocletTask;
import xdoclet.XDocletException;
import xdoclet.XDocletTagSupport;
import xdoclet.modules.ejb.EjbTagsHandler;
@@ -21,7 +22,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 15, 2001
* @xdoclet:taghandler namespace="EjbUtilObj"
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class LookupUtilTagsHandler extends EjbTagsHandler
{
@@ -70,7 +71,7 @@
}
// Fix package name
- fileName = choosePackage(fileName, packagePattern,
LookupObjectSubTask.SUBTASK_NAME);
+ fileName = choosePackage(fileName, packagePattern,
DocletTask.getSubTaskName(LookupObjectSubTask.class));
fileName += '.' + ejbName;
return fileName;
@@ -83,7 +84,7 @@
*/
protected static String getUtilClassPattern()
{
- LookupObjectSubTask utilSubtask = ((LookupObjectSubTask)
DocletContext.getInstance().getSubTaskBy(LookupObjectSubTask.SUBTASK_NAME));
+ LookupObjectSubTask utilSubtask = ((LookupObjectSubTask)
DocletContext.getInstance().getSubTaskBy(DocletTask.getSubTaskName(LookupObjectSubTask.class)));
if (utilSubtask != null) {
return utilSubtask.getUtilClassPattern();
@@ -114,7 +115,7 @@
//if explicitly specified then use it, otherwise use the kind config param
of <utilobject/>
if (kind == null) {
- kind = (String)
getDocletContext().getConfigParam(LookupObjectSubTask.SUBTASK_NAME + ".kind");
+ kind = (String)
getDocletContext().getConfigParam(DocletTask.getSubTaskName(LookupObjectSubTask.class)
+ ".kind");
}
if (kind.equals("physical")) {
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel