Java XML JAXB Context getContext()

Here you can find the source of getContext()

Description

get Context

License

Open Source License

Declaration

private static JAXBContext getContext() 

Method Source Code

//package com.java2s;
/*//from   ww w. j a v a 2  s. c om
 * ***** BEGIN LICENSE BLOCK *****
 * Zimbra Collaboration Suite Server
 * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Synacor, Inc.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software Foundation,
 * version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with this program.
 * If not, see <https://www.gnu.org/licenses/>.
 * ***** END LICENSE BLOCK *****
 */

import javax.xml.bind.JAXBContext;

public class Main {
    private static JAXBContext JAXB_CONTEXT;

    private static JAXBContext getContext() {
        if (JAXB_CONTEXT == null) {
            throw new IllegalStateException("JAXB has not been initialized");
        }
        return JAXB_CONTEXT;
    }
}

Related

  1. fromXML(JAXBContext context, String requestXML)
  2. generateTemporarySchemaFile(JAXBContext context)
  3. getCachedContext(String pkg)
  4. getContext()
  5. getContext()
  6. getContext()
  7. getContext(Class c)
  8. getContext(Class clazz)
  9. getContext(final Class theClass)