1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.struts.tiles;
20
21 /***
22 * Common implementation of attribute definition.
23 */
24 public class UntypedAttribute implements AttributeDefinition {
25
26 /***
27 * Role associated to this attribute.
28 */
29 protected String role = null;
30
31 protected Object value=null;
32
33 /***
34 * Constructor.
35 * @param value Object to store.
36 */
37 public UntypedAttribute(Object value) {
38 this.value = value;
39 }
40
41 /***
42 * Constructor.
43 * @param value Object to store.
44 * @param role Asociated role.
45 */
46 public UntypedAttribute(Object value, String role) {
47 this.value = value;
48 this.role = role;
49 }
50
51 /***
52 * Get role.
53 */
54 public String getRole() {
55 return role;
56 }
57
58 /***
59 * Set role.
60 * @param role Associated role.
61 */
62 public void setRole(String role) {
63 this.role = role;
64 }
65
66 /***
67 * Get value.
68 */
69 public Object getValue() {
70 return value;
71 }
72
73 /***
74 * Set value.
75 * @param value New value.
76 */
77 public void setValue(Object value) {
78 this.value = value;
79 }
80
81 /***
82 * Get String representation of this object.
83 */
84 public String toString() {
85 return value.toString();
86 }
87
88 }