Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
PropertyDescriptor | 32 | 0 | - | 0 | 0 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | package org.xwiki.properties; | |
21 | ||
22 | import java.lang.reflect.Field; | |
23 | import java.lang.reflect.Method; | |
24 | import java.lang.reflect.Type; | |
25 | ||
26 | /** | |
27 | * Describe a property in a bean. | |
28 | * | |
29 | * @version $Id: 11f1829ebda7cce0c34c64b3ae27dbee4e87beb0 $ | |
30 | * @since 2.0M2 | |
31 | */ | |
32 | public interface PropertyDescriptor | |
33 | { | |
34 | /** | |
35 | * @return the identifier of the property. | |
36 | * @since 2.1M1 | |
37 | */ | |
38 | String getId(); | |
39 | ||
40 | /** | |
41 | * @return the display name of the property. | |
42 | * @since 2.1M1 | |
43 | */ | |
44 | String getName(); | |
45 | ||
46 | /** | |
47 | * @return the description of the property. | |
48 | */ | |
49 | String getDescription(); | |
50 | ||
51 | /** | |
52 | * @return the type of the property. | |
53 | * @deprecated since 3.0M1 use {@link #getPropertyType()} instead | |
54 | */ | |
55 | @Deprecated | |
56 | Class<?> getPropertyClass(); | |
57 | ||
58 | /** | |
59 | * @return the type of the property. | |
60 | * @since 3.0M1 | |
61 | */ | |
62 | Type getPropertyType(); | |
63 | ||
64 | /** | |
65 | * @return the default value of the property. | |
66 | */ | |
67 | Object getDefaultValue(); | |
68 | ||
69 | /** | |
70 | * @return indicate if the property is mandatory. | |
71 | */ | |
72 | boolean isMandatory(); | |
73 | ||
74 | /** | |
75 | * @return the read method. If null it generally mean that the property is a public field. | |
76 | */ | |
77 | Method getReadMethod(); | |
78 | ||
79 | /** | |
80 | * @return the write method. If null it generally mean that the property is a public field. | |
81 | */ | |
82 | Method getWriteMethod(); | |
83 | ||
84 | /** | |
85 | * @return the field. If null if generally mean that the property is based on getter/setter. | |
86 | * @deprecated since 4.2M1 use {@link #getField()} instead | |
87 | */ | |
88 | @Deprecated | |
89 | Field getFied(); | |
90 | ||
91 | /** | |
92 | * @return the field. If null if generally mean that the property is based on getter/setter. | |
93 | * @since 4.2M1 | |
94 | */ | |
95 | Field getField(); | |
96 | } |