You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sandor Murakozi <sa...@freemail.hu> on 2004/06/04 10:14:12 UTC

Re: [betwixt] Using interfaces as property types/ in collect

hi robert,

I use the source that can be downloaded as daily build. 
Unfortunately I'm behind an "uber-secure" firewall, so I
can't acces the rep. directly. I know that I could use
CVSGrab, or something, but it was easier. I guess it is the
HEAD, but you know it better...

BR,
don



robert burrell donkin <ro...@blueyonder.co.uk>
írta:

> hi don
> 
> there is limited support for interfaces in betwixt but
it's not a 
> completely solved issue.
> 
> are you using the REFACTORING branch or HEAD?
> 
> - robert
> 
> On 3 Jun 2004, at 18:45, Sandor Murakozi wrote:
> 
> > Hi all,
> >
> > We use betwixt in our project, but we found a problem which
> > we couldn't solve with the actual implementation:
> >
> > When a property is an interface type then the actual class
> > of the property instance is not saved to the xml -> when I
> > read it back the reader won't be able to instantiate it.
> > The same problem occurs if want a collection of interfaces.
> >
> > I've checked the docs and the mailing lists, and seen that
> > some other guys has the same problem.
> >
> > I have 2 questions:
> >
> > 1. Is this problem already solved somehow? If it is, how?
> >
> > 2. If it isn't I have a proposal:
> >
> > As a workaround I've implemented a subclass of
> > XMLIntrospector that saves the actual class as a property of
> > the element. A BeanCreator is able to create instances from
> > this representation, so if you add it to the bean creator
> > chain it solves both problems.
> >
> > The functionality is working, but it still lacks some
> > polishing and documenting. If you are interested in it I can
> > finish it, and contribute it to the project.
> >
> > The only ugly thing that my introspector contains a big copy
> > pasted method from the original one, so some refactoring
> > would be desirable in both classes.
> >
> > Should I work on it and send a patch with the finished
version?
> >
> > Thanks,
> > don
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
commons-dev-help@jakarta.apache.org
> >
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
commons-dev-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [betwixt] Using interfaces as property types/ in collect

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On 4 Jun 2004, at 09:14, Sandor Murakozi wrote:

> hi robert,

hi Sandor

> I use the source that can be downloaded as daily build.
> Unfortunately I'm behind an "uber-secure" firewall, so I
> can't acces the rep. directly. I know that I could use
> CVSGrab, or something, but it was easier. I guess it is the
> HEAD, but you know it better...

that's the HEAD version. the version on the REFACTORING has had a lot 
of work done on it and IIRC some in this area.

if you can wait a few days, once the release branch is taken for 0.5 
the REFACTORING branch will be merged into HEAD. so, the stuff on HEAD 
will contain the improvements from the branch.

if you can't wait, then i'd suggest using CVSGrab to grab the source 
for the branch and build that instead.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org