Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
6.6.0
-
None
-
None
Description
currently the signature is
public Iterable<? extends HeaderItem> getDependencies()
which is awkward to use.
suppose i want a javascript reference that should include a css reference as a dependency, i cannot simply add it to iterable like this:
new ResourceReference(Some.class, "some.js") {
Iterable getDependencies() {
Iterable supers=super.getDependencies();
// supers.add(CSS); <=== cannot do this, instead
List list=new ArrayList();
for (reference:supers)
// now i can finally add mine
list.add(CSS);
return list;
}
}
instead change Iterable to a List that is backed by a mutable one. this should make extending much easier. if List is too "open" create Appendable
{ append(); }backed by a list and use that.