I'm considering a switch to JiBX from JAXB primarily because of JAXB's less
than ideal support for interfaces, and a coding-to-interfaces approach
rather than using concrete (or abstract) classes for everything. Based on
what I've read in the documentation, it looks like JiBX supports interfaces
fairly well. What limitations does JiBX have in its support for interfaces
that you learned from experience but isn't mentioned in the documentation?

In JiBX, can you only create collections of concrete classes (e.g.
specifying that this collection can only contain DogClass, CatClass, and
RatClass, rather than specifying that it can contain any class that
implements AnimalInterface)? Or does JiBX require that referring to
interfaces can only be done through abstract classes?

All the examples at
http://jibx.sourceforge.net/tutorial/binding-mappings.html#abstract only
talk about abstract classes and inheritance, rather than interfaces - are
interfaces possible? And if so, would I have to include getters and setters
on them, or does jibx do introspection on the class itself?

My other question has to do with using identifiers
(http://jibx.sourceforge.net/tutorial/binding-collects.html#ids) - can you
specify an idref that is an interface? For example, can you have a class
with an id reference of type AnimalInterface that, depending on its value,
points to a DogClass, CatClass, or RatClass?

Also, can anyone with experience in JiBX and JAXB comment on the differences
between their functionality with interfaces?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/JiBX-support-for-interfaces-tf4886806.html#a13987271
Sent from the jibx-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to