1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.clazz;
17
18 /***
19 * Describes a Property of instances of a Clazz.
20 *
21 * @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
22 * @author <a href="mailto:scolebourne@apache.org">Stephen Colebourne</a>
23 * @version $Id: ClazzProperty.java,v 1.6 2004/02/19 23:58:37 scolebourne Exp $
24 */
25 public interface ClazzProperty extends ClazzFeature {
26 /***
27 * Returns the name of the property.
28 *
29 * @return String
30 */
31 String getName();
32
33 /***
34 * Returns the property type.
35 */
36 Clazz getClazz();
37
38 /***
39 * Returns true if the property is a collection.
40 */
41 boolean isCollection();
42
43 /***
44 * Returns true if the property is a map.
45 */
46 boolean isMap();
47
48 /***
49 * Gets the type of the item if the property <code>isCollection()</code> or
50 * <code>isMap()</code>.
51 *
52 * @return the type of the item
53 */
54 Clazz getContentClazz();
55
56 /***
57 * Gets the type of the key if the property <code>isMap()</code>.
58 *
59 * @return the type of the key
60 */
61 Clazz getKeyClazz();
62
63 /***
64 * @return true if the property can not be changed
65 */
66 boolean isReadOnly();
67
68 /***
69 * @todo
70 */
71 Object get(Object instance);
72
73 /***
74 * @todo
75 */
76 void set(Object instance, Object value);
77 }