J
John W. Kennedy
Patricia said:Could you explain some more? A loadAllInPackage method seems to me to be
just as hard to implement, but less flexible. A user who wants to load
all the classes in the list could do so with a simple for loop.
I think you misunderstood my "get". I meant that, rather than
public String[] getClassNames(Package package) throws
UnsupportedOperationException
it would be wiser to define
public interface ClassnameFilter {
boolean accept (String name);
}
and
public String[] getClassNames(ClassnameFilter filter) throws
UnsupportedOperationException
thus covering a wider range of possible uses.
However, it occurs to me now that there /is/ a real gain to be found in
searching by package (because of directories), so I suppose
public String[] getClassNames(ClassnameFilter filter, Package package)
throws UnsupportedOperationException
and the original
public String[] getClassNames(Package package) throws
UnsupportedOperationException
would also be desireable.
--
John W. Kennedy
"But now is a new thing which is very old--
that the rich make themselves richer and not poorer,
which is the true Gospel, for the poor's sake."
-- Charles Williams. "Judgement at Chelmsford"
* TagZilla 0.066 * http://tagzilla.mozdev.org