Java XML JAXB Context getContext()

Here you can find the source of getContext()

Description

get Context

License

Educational Community License

Declaration

private static JAXBContext getContext() throws JAXBException 

Method Source Code

//package com.java2s;
//License from project: Educational Community License 

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

public class Main {
    private static JAXBContext context;

    private static JAXBContext getContext() throws JAXBException {
        // although not thread-safe, the worst that happens is double instantiation
        if (context == null) {
            context = JAXBContext.newInstance("org.opentestsystem.rdw.common.model.trt");
        }/*w  ww  .ja v a 2  s . c o m*/
        return context;
    }
}

Related

  1. createJaxbContextFor(Object obj, Class[] classes)
  2. createRIContext(Class clss[], String defaultNS)
  3. fromXML(JAXBContext context, String requestXML)
  4. generateTemporarySchemaFile(JAXBContext context)
  5. getCachedContext(String pkg)
  6. getContext()
  7. getContext()
  8. getContext()
  9. getContext(Class c)