Clover coverage report - Maven Clover report
Coverage timestamp: Wed Aug 15 2007 21:58:57 GMT+01:00
file stats: LOC: 175   Methods: 1
NCLOC: 144   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ELColumnTagBeanInfo.java - 97.1% 100% 97.2%
coverage coverage
 1    /**
 2    * Licensed under the Artistic License; you may not use this file
 3    * except in compliance with the License.
 4    * You may obtain a copy of the License at
 5    *
 6    * http://displaytag.sourceforge.net/license.html
 7    *
 8    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
 9    * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 10    * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 11    */
 12    package org.displaytag.tags.el;
 13   
 14    import java.beans.IntrospectionException;
 15    import java.beans.PropertyDescriptor;
 16    import java.beans.SimpleBeanInfo;
 17    import java.util.ArrayList;
 18    import java.util.List;
 19   
 20    import org.apache.commons.lang.UnhandledException;
 21   
 22   
 23    /**
 24    * BeanInfo descriptor for the <code>ELColumnTag</code> class. Unevaluated EL expression has to be kept separately
 25    * from the evaluated value, since the JSP compiler can choose to reuse different tag instances if they received the
 26    * same original attribute values, and the JSP compiler can choose to not re-call the setter methods.
 27    * @author Fabrizio Giustina
 28    * @version $Revision: 1081 $ ($Author: fgiust $)
 29    */
 30    public class ELColumnTagBeanInfo extends SimpleBeanInfo
 31    {
 32   
 33    /**
 34    * @see java.beans.BeanInfo#getPropertyDescriptors()
 35    */
 36  1 public PropertyDescriptor[] getPropertyDescriptors()
 37    {
 38  1 List proplist = new ArrayList();
 39   
 40  1 try
 41    {
 42  1 proplist.add(new PropertyDescriptor("autolink", //$NON-NLS-1$
 43    ELColumnTag.class,
 44    null,
 45    "setAutolink")); //$NON-NLS-1$
 46  1 proplist.add(new PropertyDescriptor("escapeXml", //$NON-NLS-1$
 47    ELColumnTag.class,
 48    null,
 49    "setEscapeXml")); //$NON-NLS-1$
 50  1 proplist.add(new PropertyDescriptor("class", //$NON-NLS-1$
 51    ELColumnTag.class,
 52    null,
 53    "setClass")); //$NON-NLS-1$
 54  1 proplist.add(new PropertyDescriptor("decorator", //$NON-NLS-1$
 55    ELColumnTag.class,
 56    null,
 57    "setDecorator")); //$NON-NLS-1$
 58  1 proplist.add(new PropertyDescriptor("group", //$NON-NLS-1$
 59    ELColumnTag.class,
 60    null,
 61    "setGroup")); //$NON-NLS-1$
 62  1 proplist.add(new PropertyDescriptor("headerClass", //$NON-NLS-1$
 63    ELColumnTag.class,
 64    null,
 65    "setHeaderClass")); //$NON-NLS-1$
 66  1 proplist.add(new PropertyDescriptor("href", //$NON-NLS-1$
 67    ELColumnTag.class,
 68    null,
 69    "setHref")); //$NON-NLS-1$
 70  1 proplist.add(new PropertyDescriptor("maxLength", //$NON-NLS-1$
 71    ELColumnTag.class,
 72    null,
 73    "setMaxLength")); //$NON-NLS-1$
 74  1 proplist.add(new PropertyDescriptor("maxWords", //$NON-NLS-1$
 75    ELColumnTag.class,
 76    null,
 77    "setMaxWords")); //$NON-NLS-1$
 78  1 proplist.add(new PropertyDescriptor("media", //$NON-NLS-1$
 79    ELColumnTag.class,
 80    null,
 81    "setMedia")); //$NON-NLS-1$
 82  1 proplist.add(new PropertyDescriptor("nulls", //$NON-NLS-1$
 83    ELColumnTag.class,
 84    null,
 85    "setNulls")); //$NON-NLS-1$
 86  1 proplist.add(new PropertyDescriptor("paramId", //$NON-NLS-1$
 87    ELColumnTag.class,
 88    null,
 89    "setParamId")); //$NON-NLS-1$
 90  1 proplist.add(new PropertyDescriptor("paramName", //$NON-NLS-1$
 91    ELColumnTag.class,
 92    null,
 93    "setParamName")); //$NON-NLS-1$
 94  1 proplist.add(new PropertyDescriptor("paramProperty", //$NON-NLS-1$
 95    ELColumnTag.class,
 96    null,
 97    "setParamProperty")); //$NON-NLS-1$
 98  1 proplist.add(new PropertyDescriptor("paramScope", //$NON-NLS-1$
 99    ELColumnTag.class,
 100    null,
 101    "setParamScope")); //$NON-NLS-1$
 102  1 proplist.add(new PropertyDescriptor("property", //$NON-NLS-1$
 103    ELColumnTag.class,
 104    null,
 105    "setProperty")); //$NON-NLS-1$
 106  1 proplist.add(new PropertyDescriptor("sortable", //$NON-NLS-1$
 107    ELColumnTag.class,
 108    null,
 109    "setSortable")); //$NON-NLS-1$
 110  1 proplist.add(new PropertyDescriptor("sortName", //$NON-NLS-1$
 111    ELColumnTag.class,
 112    null,
 113    "setSortName")); //$NON-NLS-1$
 114  1 proplist.add(new PropertyDescriptor("style", //$NON-NLS-1$
 115    ELColumnTag.class,
 116    null,
 117    "setStyle")); //$NON-NLS-1$
 118  1 proplist.add(new PropertyDescriptor("total", //$NON-NLS-1$
 119    ELColumnTag.class,
 120    null,
 121    "setTotal")); // map //$NON-NLS-1$
 122  1 proplist.add(new PropertyDescriptor("title", //$NON-NLS-1$
 123    ELColumnTag.class,
 124    null,
 125    "setTitle")); //$NON-NLS-1$
 126  1 proplist.add(new PropertyDescriptor("titleKey", //$NON-NLS-1$
 127    ELColumnTag.class,
 128    null,
 129    "setTitleKey")); //$NON-NLS-1$
 130  1 proplist.add(new PropertyDescriptor("url", //$NON-NLS-1$
 131    ELColumnTag.class,
 132    null,
 133    "setUrl")); //$NON-NLS-1$
 134  1 proplist.add(new PropertyDescriptor("sortProperty", //$NON-NLS-1$
 135    ELColumnTag.class,
 136    null,
 137    "setSortProperty")); //$NON-NLS-1$
 138  1 proplist.add(new PropertyDescriptor("comparator", //$NON-NLS-1$
 139    ELColumnTag.class,
 140    null,
 141    "setComparator")); //$NON-NLS-1$
 142  1 proplist.add(new PropertyDescriptor("defaultorder", //$NON-NLS-1$
 143    ELColumnTag.class,
 144    null,
 145    "setDefaultorder")); //$NON-NLS-1$
 146  1 proplist.add(new PropertyDescriptor("headerScope", //$NON-NLS-1$
 147    ELColumnTag.class,
 148    null,
 149    "setHeaderScope")); //$NON-NLS-1$
 150  1 proplist.add(new PropertyDescriptor("scope", //$NON-NLS-1$
 151    ELColumnTag.class,
 152    null,
 153    "setScope")); //$NON-NLS-1$
 154  1 proplist.add(new PropertyDescriptor("format", //$NON-NLS-1$
 155    ELColumnTag.class,
 156    null,
 157    "setFormat")); //$NON-NLS-1$
 158  1 proplist.add(new PropertyDescriptor("value", //$NON-NLS-1$
 159    ELColumnTag.class,
 160    null,
 161    "setValue")); //$NON-NLS-1$
 162   
 163    }
 164    catch (IntrospectionException ex)
 165    {
 166  0 throw new UnhandledException("You got an introspection exception - maybe defining a property that is not"
 167    + " defined in the bean?: "
 168    + ex.getMessage(), ex);
 169    }
 170   
 171  1 PropertyDescriptor[] result = new PropertyDescriptor[proplist.size()];
 172  1 return ((PropertyDescriptor[]) proplist.toArray(result));
 173    }
 174   
 175    }