-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
Would it make sense to add "required" or "mandatory" annotation that can be used for "set" methods for JavaBeans to indicate that the property is required. This may or may not reflect in other JavaBeans interfaces.
JUSTIFICATION :
Frameworks such as Spring and JMX can benifit from such annotation and will reduce amount of initialization code. It will also allow to decouple the beans initialization from a specific framework by avoiding implementation of the initialization interfaces.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
class X {
@Required
public setDataSource(DataSource ds) {
...
}
}
Framework (such as Spring), when instatntiating bean, can check if all required bean properties have been configured.
###@###.### 2005-07-19 00:10:59 GMT
Would it make sense to add "required" or "mandatory" annotation that can be used for "set" methods for JavaBeans to indicate that the property is required. This may or may not reflect in other JavaBeans interfaces.
JUSTIFICATION :
Frameworks such as Spring and JMX can benifit from such annotation and will reduce amount of initialization code. It will also allow to decouple the beans initialization from a specific framework by avoiding implementation of the initialization interfaces.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
class X {
@Required
public setDataSource(DataSource ds) {
...
}
}
Framework (such as Spring), when instatntiating bean, can check if all required bean properties have been configured.
###@###.### 2005-07-19 00:10:59 GMT
- relates to
-
JDK-4763438 Replace uses of @beaninfo with meta facility in core j2se
-
- Resolved
-
-
JDK-6176120 RFE: Define annotation to link constructor parameters to getters
-
- Resolved
-