I'm trying to understand JAXB and looking to initialize multiple objects using JAXB. I found an excellent question asked and answered in StackOverFlow.
How to marshalling the muliptle object using jaxb
So I'm looking through the code, trying to understand each piece. The first and key part (I think) that I'm having trouble understanding is the following line:
JAXBContext jc = JAXBContext.newInstance(JAXB2_Lists.class, JAXB2_Book.class);
Looking through the JAXBContext documentation, I'm unable to determine which newInstance method is being used. Guessing which one is being used, I'm not understanding it really.
http://docs.oracle.com/javaee/5/api/javax/xml/bind/JAXBContext.html#newInstance(java.lang.Class...)
My guess is that it is using the following overload
public static JAXBContext newInstance(Class[] classesToBeBound,
Map<String,?> properties)
throws JAXBException
Parameters:
classesToBeBound - list of java classes to be recognized by the new JAXBContext.
What does it mean by "to be recognized"? Recognized in what way?
Please educate me on this issue. Thank you.