RFE: LTP: XMLEncoder, XMLDecoder should be able to use Apt

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • None
    • Affects Version/s: 5.0, 6
    • Component/s: client-libs
    • 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.

            Assignee:
            Sergey Malenkov (Inactive)
            Reporter:
            Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: