dev@fi.java.net

Re: Circular Dependency

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 18 Apr 2005 19:30:14 +0200

Alan Hudson wrote:
> I notice that AttributesHolder has gotten a circular dependency with
> SAXDocumentParser.

Your right, i was never quite happy with the solution i implemented.

> Its not a big deal for Ant but is a pain for
> Makefile construction, and in general they raise red flags to me.
> Perhaps we could add an interface called EncodingAlgorithmDataConverter
> methods toString() currently.
> SAXDocumentParser could implement it. Constructor for AttributesHolder
> would take that interface instead of SAXDocumentParser.
>
> Thoughts?
>

Not sure i like the idea of further interfaces in this respect.

One solution is for AttributesHolder to have a reference to the
registered encoding algorithms. Then move
convertEncodingAlgorithmDataToString to AttributesHolder.

The alternative would be to have AttributesHolder as a internal class of
SAXDocumentParser.

I prefer the former as currently we use AttributesHolder in other areas
e.g. for SAX serializing.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109