View Javadoc

1   /***
2    * Copyright 2004 Fabrizio Giustina.
3    *
4    * Licensed under the Artistic License; you may not use this file
5    * except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://maven-taglib.sourceforge.net/license.html
9    *
10   * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11   * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13   */
14  package net.sf.maventaglib.checker;
15  
16  import org.apache.commons.lang.builder.ToStringBuilder;
17  import org.apache.commons.lang.builder.ToStringStyle;
18  
19  
20  /***
21   * Javabean representing a tag attribute.
22   * @author Fabrizio Giustina
23   * @version $Revision: 1.3 $ ($Author: fgiust $)
24   */
25  public class TagAttribute
26  {
27  
28      /***
29       * Attribute name.
30       */
31      private String attributeName;
32  
33      /***
34       * Atttribute type (can be null).
35       */
36      private String attributeType;
37  
38      /***
39       * @return Returns the attribute name.
40       */
41      public String getAttributeName()
42      {
43          return this.attributeName;
44      }
45  
46      /***
47       * @param name attribute name.
48       */
49      public void setAttributeName(String name)
50      {
51          this.attributeName = name;
52      }
53  
54      /***
55       * @return Returns the attributeType.
56       */
57      public String getAttributeType()
58      {
59          return this.attributeType;
60      }
61  
62      /***
63       * @param type The attributeType to set.
64       */
65      public void setAttributeType(String type)
66      {
67          this.attributeType = type;
68      }
69  
70      /***
71       * @see java.lang.Object#toString()
72       */
73      public String toString()
74      {
75          return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE)
76              .append("attributeName", this.attributeName)
77              .append("attributeType", this.attributeType)
78              .toString();
79      }
80  }