dev@jaxb.java.net

Synthetic accessor methods in JAXB runtime

From: chris cottingham <chris_at_graphicpoet.com>
Date: Fri, 22 Aug 2008 11:20:12 -0400

Hello all. Don't know if I'm flooding the mailing list, but I continue
to come across things that it would be nice to have more explanation for.

When I open the jaxb runtime source in eclipse, it complains to me that
I should change the visibility on a substantial number of private
members to "increase performance", referring to the generation of
synthetic accessor methods. This seems good to me, yet there are a
large number of instances of this behavior. Is there something that I'm
missing?

So, for example:

class a {
    private Object x;

    class b {

       public void doSomething() {
          System.out.println(x); //This line would generate the
warning/error because an accessor method would have to be created to
access 'x' in the other class file, no?
       }

    }

}

Anyway, if everyone can agree that this should be changed, I may take a
crack at it. I'm having other problems getting everything to compile
though, so anyone who has any generic advice will be greatly appreciated
for sharing some.

-Chris