User: ara_e_w Date: 02/06/13 12:16:49 Modified: modules/ejb/src/xdoclet/modules/ejb/home HomeTagsHandler.java Log: - MethodImpl.buildStringId() is ued for hashcode/equals, but also uses modifiers of the method, which is wrong, because if you override an abstract method then it thinks they are two different methods, which really are not, and that leads to problems in some of the superclass/override sensitive templates. I removed modifiers from the calculation. - CustomerBean had missing imports, which leads to overriding code to fail. I also added a long description about why you should explicitly import to CustomerBean's import section. - cleanup Revision Changes Path 1.6 +27 -35 xdoclet/modules/ejb/src/xdoclet/modules/ejb/home/HomeTagsHandler.java Index: HomeTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/home/HomeTagsHandler.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- HomeTagsHandler.java 12 Jun 2002 23:31:31 -0000 1.5 +++ HomeTagsHandler.java 13 Jun 2002 19:16:49 -0000 1.6 @@ -35,7 +35,7 @@ * @author Ara Abrahamian ([EMAIL PROTECTED]) * @created Oct 15, 2001 * @xdoclet.taghandler namespace="EjbHome" - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ */ public class HomeTagsHandler extends EjbTagsHandler { @@ -44,8 +44,8 @@ private String currentExceptions; /** - * Similar to {@link src.xdoclet.modules.ejb.intf.InterfaceTagsHandler#getComponentInterface}. Relies on the - * ejb:home tag, which has the following relevant properties: + * Similar to {@link xdoclet.modules.ejb.intf.InterfaceTagsHandler#getComponentInterface}. Relies on the ejb:home + * tag, which has the following relevant properties: * <ul> * <li> remote-class: The fully qualified name of the remote class - overrides all set patterns * <li> local-class: The fully qualified name of the local class - overrides all set patterns @@ -131,9 +131,8 @@ * * @param method Description of Parameter * @return The RemoveMethod value - * @exception XDocletException */ - public static boolean isRemoveMethod(XMethod method) throws XDocletException + public static boolean isRemoveMethod(XMethod method) { return method.getName().equals("ejbRemove"); } @@ -143,9 +142,8 @@ * * @param method Description of Parameter * @return The CreateMethod value - * @exception XDocletException */ - public static boolean isCreateMethod(XMethod method) throws XDocletException + public static boolean isCreateMethod(XMethod method) { return method.getDoc().hasTag("ejb:create-method"); } @@ -155,9 +153,8 @@ * * @param method Description of Parameter * @return The HomeMethod value - * @exception XDocletException */ - public static boolean isHomeMethod(XMethod method) throws XDocletException + public static boolean isHomeMethod(XMethod method) { return method.getDoc().hasTag("ejb:home-method"); } @@ -186,9 +183,8 @@ * * @param method Description of Parameter * @return The FinderMethod value - * @exception XDocletException */ - public static boolean isFinderMethod(XMethod method) throws XDocletException + public static boolean isFinderMethod(XMethod method) { return method.getName().startsWith("ejbFind"); } @@ -250,9 +246,8 @@ * * @param methodName Description of Parameter * @return Description of the Returned Value - * @exception XDocletException */ - public static String toHomeMethod(String methodName) throws XDocletException + public static String toHomeMethod(String methodName) { // Remove "ejbHome" prefix and lower case first char in rest: "ejbHomeFoo"->"foo" return Character.toLowerCase(methodName.charAt(7)) + methodName.substring(8); @@ -263,9 +258,8 @@ * * @param methodName Description of Parameter * @return Description of the Returned Value - * @exception XDocletException */ - public static String toCreateMethod(String methodName) throws XDocletException + public static String toCreateMethod(String methodName) { if (methodName.length() > 9) { // Remove "ejbCreate" prefix and lower case first char in rest: "ejbCreateFoo"->"createFoo", EJB 2 only @@ -281,9 +275,8 @@ * * @param clazz Describe what the parameter does * @return Describe the return value - * @exception XDocletException */ - public static XMethod findFirstCreateMethodFor(XClass clazz) throws XDocletException + public static XMethod findFirstCreateMethodFor(XClass clazz) { XMethod[] methods = clazz.getMethods(); @@ -307,9 +300,8 @@ * * @param methodName Description of Parameter * @return Description of the Returned Value - * @exception XDocletException */ - public static String toFinderMethod(String methodName) throws XDocletException + public static String toFinderMethod(String methodName) { // Remove "ejb" prefix and lower case first char in rest: "ejbFindByPrimaryKey"->"findByPrimaryKey" return Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
_______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel