User: vharcq
Date: 02/05/14 14:06:26
Modified: modules/ejb/src/xdoclet/modules/ejb Tag:
MODULE_REFACTORING_BRANCH EjbTagsHandler.java
Log:
Do not use comma separated values in TypeTagsHandler.isOfType()
Revision Changes Path
No revision
No revision
1.1.2.6 +39 -56
xdoclet/modules/ejb/src/xdoclet/modules/ejb/Attic/EjbTagsHandler.java
Index: EjbTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/Attic/EjbTagsHandler.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -w -r1.1.2.5 -r1.1.2.6
--- EjbTagsHandler.java 13 May 2002 11:19:22 -0000 1.1.2.5
+++ EjbTagsHandler.java 14 May 2002 21:06:26 -0000 1.1.2.6
@@ -44,7 +44,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 15, 2001
* @xdoclet:taghandler namespace="Ejb"
- * @version $Revision: 1.1.2.5 $
+ * @version $Revision: 1.1.2.6 $
*/
public class EjbTagsHandler extends XDocletTagSupport
{
@@ -157,13 +157,11 @@
}
/**
- * Returns the EJB name of the clazz by seaching for ejb:bean's name
- * parameter. If that is not found, it uses the class' name minus any suffix
- * from the list in the 'ejbClassNameSuffix' config parameter
- * ("Bean,EJB,Ejb" by default).
+ * Returns the EJB name of the clazz by seaching for ejb:bean's name parameter.
If that is not found, it uses the
+ * class' name minus any suffix from the list in the 'ejbClassNameSuffix'
config parameter ("Bean,EJB,Ejb" by
+ * default).
*
- * @param clazz The EJB bean class for which we want the EJB
- * name
+ * @param clazz The EJB bean class for which we want the EJB
name
* @return The EjbName value
* @exception XDocletException
* @see #ejbName(java.util.Properties)
@@ -241,8 +239,7 @@
}
/**
- * Returns the EJB specification version used. The generated files will be
- * compatible with the version specified.
+ * Returns the EJB specification version used. The generated files will be
compatible with the version specified.
*
* @return The Ejbspec value
*/
@@ -311,8 +308,7 @@
}
/**
- * Returns true if clazz is only a local EJB by looking at ejb:bean's
- * view-type parameter.
+ * Returns true if clazz is only a local EJB by looking at ejb:bean's view-type
parameter.
*
* @param clazz Description of Parameter
* @return The OnlyLocalEjb value
@@ -324,8 +320,7 @@
}
/**
- * Returns true if clazz is only a remote EJB by looking at ejb:bean's
- * view-type parameter.
+ * Returns true if clazz is only a remote EJB by looking at ejb:bean's
view-type parameter.
*
* @param clazz Description of Parameter
* @return The OnlyRemoteEjb value
@@ -337,12 +332,10 @@
}
/**
- * Returns modified package name for a package name. If package name ends
- * with one of the toReplace Strings, then it's substituted by the
- * replaceWith String. If package_pattern not null then it's roughly used.
+ * Returns modified package name for a package name. If package name ends with
one of the toReplace Strings, then
+ * it's substituted by the replaceWith String. If package_pattern not null then
it's roughly used.
*
- * @param packageName The name of the package name the new package
- * name will be derived from
+ * @param packageName The name of the package name the new package
name will be derived from
* @param package_pattern The package pattern to use. Can be null
* @param for_subtask
* @return Description of the Returned Value
@@ -448,9 +441,8 @@
* @exception XDocletException
* @see #getEjbNameFor(xjavadoc.XClass)
* @doc:tag type="content"
- * @doc:param name="prefixWithEjbSlash" optional="true"
- * values="true,false" description="Specifies whether to prefix it with
- * ejb/ or not. False by default."
+ * @doc:param name="prefixWithEjbSlash" optional="true"
values="true,false" description="Specifies
+ * whether to prefix it with ejb/ or not. False by default."
*/
public String ejbName(Properties attributes) throws XDocletException
{
@@ -518,8 +510,7 @@
}
/**
- * Returns the symbolic name of the current class. For an EJBean it's the
- * value of ejb:bean's name parameter.
+ * Returns the symbolic name of the current class. For an EJBean it's the value
of ejb:bean's name parameter.
*
* @return The symbolic name of the current class
* @exception XDocletException
@@ -532,8 +523,7 @@
}
/**
- * Returns short version of ejbName(). Example: "foo.bar.MyBean" ->"MyBean",
- * "foo/bar/MyBean" ->"MyBean"
+ * Returns short version of ejbName(). Example: "foo.bar.MyBean" ->"MyBean",
"foo/bar/MyBean" ->"MyBean"
*
* @return Description of the Returned Value
* @exception XDocletException
@@ -546,8 +536,8 @@
}
/**
- * Evaluates the body block for each EJBean derived from one of the three
- * EJB types: EntityBean, SessionBean or MessageDrivenBean.
+ * Evaluates the body block for each EJBean derived from one of the three EJB
types: EntityBean, SessionBean or
+ * MessageDrivenBean.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -580,10 +570,9 @@
}
/**
- * Evaluates the body block if current bean is a concrete bean meaning the
- * generate parameter of ejb:bean is either not specified or equals to
- * "true", otherwise the bean is just an abstract base class bean not meant
- * to be used as a EJBean but serve as the base for other EJBeans.
+ * Evaluates the body block if current bean is a concrete bean meaning the
generate parameter of ejb:bean is either
+ * not specified or equals to "true", otherwise the bean is just an abstract
base class bean not meant to be used as
+ * a EJBean but serve as the base for other EJBeans.
*
* @param template The body of the block tag
* @param attributes The attributes of the template tag
@@ -624,11 +613,10 @@
}
/**
- * Returns the full-qualified name of the current class's concrete class.
- * This is the class that is generated and is derived from current class.
+ * Returns the full-qualified name of the current class's concrete class. This
is the class that is generated and is
+ * derived from current class.
*
- * @return The full-qualified name of the current
- * class's concrete class
+ * @return The full-qualified name of the current class's
concrete class
* @exception XDocletException
* @see
src.xdoclet.modules.ejb.session.SessionTagsHandler#sessionClass()
* @see
src.xdoclet.modules.ejb.entity.BmpTagsHandler#entityBmpClass()
@@ -729,8 +717,7 @@
}
/**
- * Returns true of clazz is an EJB (derived from an EJB type), false
- * otherwise.
+ * Returns true of clazz is an EJB (derived from an EJB type), false otherwise.
*
* @param clazz Description of Parameter
* @return The Ejb value
@@ -738,16 +725,16 @@
*/
protected boolean isEjb(XClass clazz) throws XDocletException
{
- return TypeTagsHandler.isOfType(clazz,
"javax.ejb.SessionBean,javax.ejb.EntityBean,javax.ejb.MessageDrivenBean",
TypeTagsHandler.TYPE_HIERARCHY);
+ return (TypeTagsHandler.isOfType(clazz, "javax.ejb.SessionBean",
TypeTagsHandler.TYPE_HIERARCHY)
+ || (TypeTagsHandler.isOfType(clazz, "javax.ejb.EntityBean",
TypeTagsHandler.TYPE_HIERARCHY))
+ || (TypeTagsHandler.isOfType(clazz, "javax.ejb.MessageDrivenBean",
TypeTagsHandler.TYPE_HIERARCHY)));
}
/**
- * sub-classes which deal with patternized class names return a reasonable
- * value
+ * sub-classes which deal with patternized class names return a reasonable value
*
* @param clazz the class
- * @param type type value used for view-type of
- * remote/local
+ * @param type type value used for view-type of remote/local
* @return dependent class name for the class and type
* @exception XDocletException
*/
@@ -804,8 +791,7 @@
}
/**
- * Returns true if class/method denoted by doc has ejb:transaction tag,
- * false otherwise.
+ * Returns true if class/method denoted by doc has ejb:transaction tag, false
otherwise.
*
* @param doc Description of Parameter
* @return Description of the Returned Value
@@ -820,16 +806,12 @@
* Returns the name of the class pk/etc class extends.
*
* @param clazz the class
- * @param tag_name name of the tag (ejb:bean for example,
- * used for getting generate parameter)
- * @param type type value used for view type of
- * remote/local
- * @param extends_param_name extends parameter name (is "extends" for
- * ejb:bean but is "local-extends" for local)
- * @param default_base_class_name default base class name, returned when
- * not deriving from another base class
- * @return correct value for the extends statement
- * of a generated class
+ * @param tag_name name of the tag (ejb:bean for example, used
for getting generate parameter)
+ * @param type type value used for view type of remote/local
+ * @param extends_param_name extends parameter name (is "extends" for
ejb:bean but is "local-extends" for
+ * local)
+ * @param default_base_class_name default base class name, returned when not
deriving from another base class
+ * @return correct value for the extends statement of a
generated class
* @exception XDocletException
*/
protected String extendsFromFor(XClass clazz, String tag_name, String type,
String extends_param_name, String default_base_class_name) throws XDocletException
@@ -941,7 +923,8 @@
return true;
}
- if (!TypeTagsHandler.isOfType(clazz,
"javax.ejb.EntityBean,javax.ejb.SessionBean", TypeTagsHandler.TYPE_HIERARCHY)) {
+ if (!TypeTagsHandler.isOfType(clazz, "javax.ejb.EntityBean",
TypeTagsHandler.TYPE_HIERARCHY)
+ && !TypeTagsHandler.isOfType(clazz, "javax.ejb.SessionBean",
TypeTagsHandler.TYPE_HIERARCHY)) {
log.debug(clazz.qualifiedName() + " is _not_ of type
javax.ejb.EntityBean,javax.ejb.SessionBean");
return true;
_______________________________________________________________
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