JDK-5017936 : RFE: Retrofit JavaBeans beaninfo to the new metadata facilities in 1.5
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-03-22
  • Updated: 2014-03-31
  • Resolved: 2014-03-31
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Name: rmT116609			Date: 03/22/2004


A DESCRIPTION OF THE REQUEST :
At present, one specifies bean properties by means of a BeanInfo class.

I'd like to see it made possible to do this with the new metatdata facilities in 1.5. This would involve some metatdata interfaces being created (which should be attached to the class but not loaded at runtime), and java.beans.BeanInfo being updataed to understand these properties.

Since the metadata stuff only returns strings, icons would be returned as URLs or as resources. So metadata interface @java.beans.FeatureDescriptor (or whatever) would have a pair of methods getIconResource() and getIconURL() which would return null or values suitable for

getBeanClass().getResource(xxx.getIconResource())

or

new URL(xxx.getIconURL())

respecitvely.

JUSTIFICATION :
The point of the new metadata facilities is to provide APIs that provide metadata (including but not limited to JavaBeans) witha unifided method for doing it.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Id like to be able to put the values for

attributeNames, getDisplayName, getName, getShortDescription, isExpert, isHidden, isPreferred

etc in the java code
ACTUAL -
You have to make a BeanInfo class


(Incident Review ID: 243858) 
======================================================================

Comments
EVALUATION It is implemented in JSR-273. Now we should move the implementation in the core Java.
08-07-2008

EVALUATION Name: sh120115 Date: 03/22/2004 Very interesting! This has been discussed recently and I think is something we would like to do. ###@###.### 2004-03-22 ======================================================================
22-03-2004