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
Post a Comment