User: pathoss
Date: 02/05/12 06:53:30
Modified: modules/ejb/src/xdoclet/modules/ejb/mdb Tag:
MODULE_REFACTORING_BRANCH MdbTagsHandler.java
Log:
Refactored. Fixed compilation errors and warnings.
Revision Changes Path
No revision
No revision
1.1.2.4 +95 -86
xdoclet/modules/ejb/src/xdoclet/modules/ejb/mdb/Attic/MdbTagsHandler.java
Index: MdbTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/mdb/Attic/MdbTagsHandler.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -w -r1.1.2.3 -r1.1.2.4
--- MdbTagsHandler.java 28 Apr 2002 22:25:22 -0000 1.1.2.3
+++ MdbTagsHandler.java 12 May 2002 13:53:30 -0000 1.1.2.4
@@ -4,33 +4,61 @@
*/
package xdoclet.modules.ejb.mdb;
-import xjavadoc.XJavaDoc;
import xjavadoc.XClass;
+
+import xjavadoc.XJavaDoc;
import xjavadoc.XJavaDocException;
import xdoclet.DocletSupport;
import xdoclet.XDocletException;
+import xdoclet.modules.ejb.EjbTagsHandler;
import xdoclet.tagshandler.ClassTagsHandler;
import xdoclet.tagshandler.TypeTagsHandler;
-import xdoclet.modules.ejb.EjbTagsHandler;
/**
- * @xdoclet:taghandler namespace="EjbMdb"
- *
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 16, 2001
- * @version $Revision: 1.1.2.3 $
+ * @xdoclet:taghandler namespace="EjbMdb"
+ * @version $Revision: 1.1.2.4 $
*/
-public class MdbTagsHandler extends EjbTagsHandler {
+public class MdbTagsHandler extends EjbTagsHandler
+{
+
+ /**
+ * Returns true if clazz is a messgae-driven bean, false otherwise.
+ *
+ * @param clazz Description of Parameter
+ * @return The MessageDriven value
+ * @exception XDocletException
+ */
+ public static boolean isMessageDriven(XClass clazz) throws XDocletException
+ {
+ return TypeTagsHandler.isOfType(clazz, "javax.ejb.MessageDrivenBean",
TypeTagsHandler.TYPE_HIERARCHY);
+ }
+
+
+ /**
+ * Gets the MessageDrivenClassFor attribute of the MdbTagsHandler class
+ *
+ * @param clazz Describe what the parameter does
+ * @return The MessageDrivenClassFor value
+ * @todo-javadoc Write javadocs for method parameter
+ */
+ public static String getMessageDrivenClassFor(XClass clazz)
+ {
+ return clazz.qualifiedName();
+ }
+
/**
* Evaluates the body block for each EJBean derived from MessageDrivenBean.
*
* @param template The body of the block tag
- * @exception xdoclet.XDocletException Description of Exception
+ * @exception XDocletException
* @see #isMessageDriven(xjavadoc.XClass)
* @doc:tag type="block"
*/
- public void forAllMDBeans(String template) throws XDocletException {
+ public void forAllMDBeans(String template) throws XDocletException
+ {
try {
XClass[] classes = XJavaDoc.getInstance().sourceClasses();
@@ -45,20 +73,23 @@
generate(template);
}
}
- } catch (XJavaDocException e) {
+ }
+ catch (XJavaDocException e) {
throw new XDocletException(e, e.getMessage());
}
}
/**
- * Evaluate the body block if current class is of a message driven bean type.
+ * Evaluate the body block if current class is of a message driven bean
+ * type.
*
* @param template The body of the block tag
- * @exception xdoclet.XDocletException Description of Exception
+ * @exception XDocletException
* @doc:tag type="block"
*/
- public void ifMessageDriven(String template) throws XDocletException {
+ public void ifMessageDriven(String template) throws XDocletException
+ {
if (isMessageDriven(getCurrentClass())) {
generate(template);
}
@@ -68,36 +99,14 @@
/**
* Returns the name of message-driven bean class.
*
- * @return The name of generated message-driven bean class.
- * @exception xdoclet.XDocletException Description of Exception
+ * @return The name of generated message-driven bean
+ * class.
+ * @exception XDocletException
* @doc:tag type="content"
*/
- public String messageDrivenClass() throws XDocletException {
+ public String messageDrivenClass() throws XDocletException
+ {
return getMessageDrivenClassFor(getCurrentClass());
}
-
-
- /**
- * Returns true if clazz is a messgae-driven bean, false otherwise.
- *
- * @param clazz Description of Parameter
- * @return The MessageDriven value
- * @exception xdoclet.XDocletException Description of Exception
- */
- public static boolean isMessageDriven(XClass clazz) throws XDocletException {
- return TypeTagsHandler.isOfType(clazz, "javax.ejb.MessageDrivenBean",
TypeTagsHandler.TYPE_HIERARCHY);
- }
-
-
- /**
- * Gets the MessageDrivenClassFor attribute of the MdbTagsHandler class
- *
- * @param clazz Describe what the parameter does
- * @return The MessageDrivenClassFor value
- * @todo-javadoc Write javadocs for method parameter
- */
- public static String getMessageDrivenClassFor(XClass clazz) {
- return ClassTagsHandler.getFullClassNameFor(clazz);
- }
}
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel