I see the usage of the below method in my project
JAXBContext jc = JAXBContext.newInstance("org.test.customer");
where org.test.customer
is the package name.
Does it mean we can marshal/unmarshal classes which lies under org.test.customer
?
My understanding is based on http://docs.oracle.com/javaee/5/api/javax/xml/bind/JAXBContext.html#newInstance(java.lang.String)
The explanation is in JAXBContext
class`s Javadoc
The JAXBContext
instance is initialized from a list of colon separated Java package names. Each java package contains JAXB mapped classes, schema-derived classes and/or user annotated classes.
Example:
JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With