Property-related JSRs

JavaBeans (no JSR - not developed under the JCP)

https://java.sun.com/products/javabeans/docs/spec.html

The default reflecting BeanInfo implementation (returned by Introspector.getBeanInfo()) will have to be updated to include first-class properties.

Some additional suggestions follow.

Indexed properties

Forget about indexed properties for now.

Bound and Constrained properties

No language support for that. These still need to be coded in the setter.

PropertyChange and VetoableChange events can be defined easier using the first-class event syntax illustrated next.

Add support for events:

public event DataChangeListener dataChange;

becomes

private ListenerList<DataChangeListener> $dataChange;

 public void $addDataChangeListener(DataChangeListener listener) { ... }
 public void $removeDataChangeListener(DataChangeListener listener) { ... }

The following syntax is supported:

my.dataChange += x; // addDataChangeListener(x);
 my.dataChange -= x; // removeDataChangeListener(x);
 my.dataChange.fire(EventObject/*or DataChangeEvent*/ e); // Tricky to determine the data type of e

To enable use of first-class events in custom AWT/Swing components, the Component class will have to change. See this page for details:

https://java.sun.com/products/javabeans/docs/getListeners.html

JavaBeans Annotations (no more BeanInfo)

Something along those lines is already being worked on at the JBDT project

@Bean(customizerClass=MyBeanCustomizer.class, iconUrl="com/my/MyBean.ico")
 public class MyBean {

   @Editor(editorClass = MyPropEditor.class)
   public property String prop;

 }

Unified Expression Language

The BeanELResolver uses the JavaBeans framework APIs. No changes are needed to the Unified EL framework for it to support first-class properties.

JSR 3: JavaTM Management Extensions (JMXTM) Specification

http://jcp.org/en/jsr/detail?id=3

Standard MBean attributes follow the standard property getter/setter naming convention.

The StandardMBean class will have to be updated to recognize first-class properties.

JSR 57: Long-Term Persistence for JavaBeansTM Specification

http://jcp.org/en/jsr/detail?id=57

The java.beans.DefaultPersistenceDelegate uses the JavaBeans introspection API and BeanInfos. As long as the default BeanInfo lists native properties, no changes would be needed to the Long Term Persistence API for JavaBeans.

JSR 199: JavaTM Compiler API

From Remi Forax's spec

"JSR 199 and properties TBF (two new nodes Property and SharpAccess)"

JSR 220: Enterprise JavaBeansTM 3.0

http://jcp.org/en/jsr/detail?id=220

The annotations that bind to properties (e.g. @Column) will have to be updated.

JSR 273: Design-Time API for JavaBeansTM JBDT

http://jcp.org/en/jsr/detail?id=273, java.net project

This JSR will need to be extended to support first-class properties. In particular the Property annotation will need to be updated.

JSR 295: Beans Binding

http://jcp.org/en/jsr/detail?id=295, java.net project

Will have to be updated to include an org.jdesktop.beansbinding.Property implementation for native properties as demonstrated by Remi Forax here.

JSR 303: Bean Validation

http://jcp.org/en/jsr/detail?id=303

The spec is not ready and I could not find any useful information such as a java.net project RI or sample code. It seems like the starting point for this could be the Spring framework validation apis.

The annotations that bind to properties will have to be updated.

Version 1.1 last modified by Administrator on 28/10/2007 at 20:01

Comments 0

No comments for this document
Add Comment...

Attachments 0

No attachments for this document

Creator: Administrator on 2007/10/28 19:59
This wiki is licensed under a Creative Commons license
1.1.1.5166