On Jun 15, 2006, at 3:37 AM, Chris Hostetter wrote:
: are linked to the one being written, think relationships here). I'm
: having difficulty customizing the output because XMLWriter's
: constructor is package protected. Is there a performance or API
: reason we need this class to be uninstantiable from other packages?
: Having it still final is ok, I believe, but making the constructor
: public would help me write a custom query response writer.
:
: Objections?
No objections from me ... i *think* the reason it's pacakge
protected at
the moment is because the only expected use for it was to create a
seperate instance during each invocation of the static method
XMLWriter.writeResponse.
Which was prior to the enhancement to allow custom
QueryResponseWriters :)
I'm fleshing out my work with my local Solr version changed to have
it public and it is working fine for my needs. However I did copy/
paste XMLResponseWriter to make my own (in a different package).
Having a way to hook into the response writing by leveraging the ever
improving Solr codebase and its utilities rather than copy/pasting
would be a nice way to aim, I think.
(But only Yonik knows for sure what he
anticipated). If it stays final, i don't see any downside to
making the
constructor public so other classes can reuse the write*
methods ... it's
making it subclassable that would worry me a little (there may be side
affects in some of those methods that are neccessary but non-obvious)
Yeah, agreed with the subclassing comments on XMLWriter.
Erik