Howdy,
One reason that you probably do not want to expose your CMP accessors is that it is similar to the encapsulation problem that you have with public fields... you can't add any other validation code.
If you say:
public abstract void setFoo(int fooValue);
And you expose setFoo(), you are allowing the caller to set *any* value they like for Foo.
But if you say:
public void setFooValue(int fooValue) {
if (...) {
this.setFoo(fooValue);
} else {
...
}
}
Then you now have control over what happens. In any case, writing your *own* accessors into your component interface gives you the flexibility to modify things later without breaking your clients... and as we know, clients can become violent and dangerous when broken
Cheers,
Kathy