java - what is JAXBContext newInstance(String contextPath)? -


i see usage of below method in project

jaxbcontext jc = jaxbcontext.newinstance("org.test.customer"); 

where org.test.customer package name

does mean can marshal/unmarshal classes lies under org.test.customer ?

my understanding based on http://docs.oracle.com/javaee/5/api/javax/xml/bind/jaxbcontext.html#newinstance(java.lang.string)

the explanation in jaxbcontext class javadoc

the jaxbcontext instance initialized 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" ); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -