-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
-
5.0, 6
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
At the moment if I want to use a custom DefaultPersistenceDelegate or make a field exposed by a bean transient for use with XMLEncoder and XMLDecoder, I need to create a BeanInfo and specify these things there. It would be much easier and more maintainable if I could specify these things using the new Apt tools introduced with Java 1.5.
For example, I could write something like
@PersistanceDelegateInfo(MyPersistanceDelegate.class)
public class MyClass
{
int a;
int b;
public int getA() { return a; }
public void setA(int a) { this.a = a; }
public int getB() { return b; }
@PDTransient public void setB(int b) { this.b = b; }
}
JUSTIFICATION :
Using a BeanInfo is error prone. Whenever you alter your class, you need to rebuild your BeanInfo, which risks losing your settings. By using Apt and putting these things directly into the code, it is clearer and more maintainable.
At the moment if I want to use a custom DefaultPersistenceDelegate or make a field exposed by a bean transient for use with XMLEncoder and XMLDecoder, I need to create a BeanInfo and specify these things there. It would be much easier and more maintainable if I could specify these things using the new Apt tools introduced with Java 1.5.
For example, I could write something like
@PersistanceDelegateInfo(MyPersistanceDelegate.class)
public class MyClass
{
int a;
int b;
public int getA() { return a; }
public void setA(int a) { this.a = a; }
public int getB() { return b; }
@PDTransient public void setB(int b) { this.b = b; }
}
JUSTIFICATION :
Using a BeanInfo is error prone. Whenever you alter your class, you need to rebuild your BeanInfo, which risks losing your settings. By using Apt and putting these things directly into the code, it is clearer and more maintainable.
- duplicates
-
JDK-6179657 RFE: Classes should be able to provide PersistenceDelegates for their encoding
-
- Closed
-
- relates to
-
JDK-4763438 Replace uses of @beaninfo with meta facility in core j2se
-
- Resolved
-
-
JDK-4935607 RFE: LTP: Should be possible to set the TRANSIENT attribute of propertiies to FALSE.
-
- Closed
-
-
JDK-5017936 RFE: Retrofit JavaBeans beaninfo to the new metadata facilities in 1.5
-
- Closed
-
-
JDK-6380849 RFE: Automatic discovery of PersistanceDelegates
-
- Closed
-