From: Konstantin P. <ko...@us...> - 2006-09-16 15:10:00
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-web/src/main/java/org/xdoclet/plugin/web In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9417/src/main/java/org/xdoclet/plugin/web Modified Files: TaglibPlugin.java Log Message: fix for XDP-184 ( Thanks Ulrich ) test coverage for this improvement m, as well reworking of test classes to get rid of dependency to testapp-web Index: TaglibPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-web/src/main/java/org/xdoclet/plugin/web/TaglibPlugin.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TaglibPlugin.java 15 Jan 2006 18:22:58 -0000 1.20 --- TaglibPlugin.java 16 Sep 2006 15:09:11 -0000 1.21 *************** *** 118,127 **** } ! /** ! * @return a collection of JavaMethod from a given class, ! * which have a jsp.attribute tag. */ public Collection getAttributeMethods(JavaClass clazz) { Collection attributeMethods = new ArrayList(); JavaMethod[] meths = clazz.getMethods(); for (int i = 0; i < meths.length; i++) { --- 118,141 ---- } ! /** ! * This method returns a collection of JavaMethod from a given class, which have a jsp.attribute tag recursively ! * up to java.kang.Object. ! * @param clazz the java class to inspect. ! * @param attributeMethods a collection of attributes methods ! * @return a collection of JavaMethod from a given class, which have a jsp.attribute tag. */ public Collection getAttributeMethods(JavaClass clazz) { Collection attributeMethods = new ArrayList(); + getAllAttributeMethods(clazz, attributeMethods); + return attributeMethods; + } + + /** + * This method returns a collection of JavaMethod from a given class, which have a jsp.attribute tag. + * @param clazz the java class to inspect. + * @param attributeMethods a collection of attributes methods + * @return a collection of JavaMethod from a given class, which have a jsp.attribute tag. + */ + private Collection getAllAttributeMethods(JavaClass clazz, Collection attributeMethods) { JavaMethod[] meths = clazz.getMethods(); for (int i = 0; i < meths.length; i++) { *************** *** 131,137 **** } } return attributeMethods; } ! public WebUtils getWebUtils() throws ClassNotFoundException { String servletVersion = (String) servletVersions.get(jspversion); --- 145,154 ---- } } + if (!(clazz.getSuperClass().getJavaClass().getName().equals("Object"))) { + getAllAttributeMethods(clazz.getSuperClass().getJavaClass(), attributeMethods); + } return attributeMethods; } ! public WebUtils getWebUtils() throws ClassNotFoundException { String servletVersion = (String) servletVersions.get(jspversion); |