2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.databinding.jaxb
Class JAXBContextCache
java.lang.Object
org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache
public class JAXBContextCache
- extends java.lang.Object
Field Summary |
protected static java.util.Set<java.lang.Class<?>> |
BUILTIN_CLASSES_SET
|
protected LRUCache<java.lang.Object,javax.xml.bind.JAXBContext> |
cache
|
protected javax.xml.bind.JAXBContext |
defaultContext
|
protected static java.lang.Class<?>[] |
JAXB_BUILTIN_CLASSES
|
protected org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.Pool<javax.xml.bind.JAXBContext,javax.xml.bind.Marshaller> |
mpool
|
protected org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.Pool<javax.xml.bind.JAXBContext,javax.xml.bind.Unmarshaller> |
upool
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXB_BUILTIN_CLASSES
protected static java.lang.Class<?>[] JAXB_BUILTIN_CLASSES
BUILTIN_CLASSES_SET
protected static final java.util.Set<java.lang.Class<?>> BUILTIN_CLASSES_SET
cache
protected LRUCache<java.lang.Object,javax.xml.bind.JAXBContext> cache
mpool
protected org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.Pool<javax.xml.bind.JAXBContext,javax.xml.bind.Marshaller> mpool
upool
protected org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.Pool<javax.xml.bind.JAXBContext,javax.xml.bind.Unmarshaller> upool
defaultContext
protected javax.xml.bind.JAXBContext defaultContext
JAXBContextCache
public JAXBContextCache()
JAXBContextCache
public JAXBContextCache(int contextSize,
int marshallerSize,
int unmarshallerSize)
getDefaultJAXBContext
public static javax.xml.bind.JAXBContext getDefaultJAXBContext()
getPrimitiveClass
public static java.lang.Class<?> getPrimitiveClass(java.lang.String text)
- Parameters:
name
- of primitive type
- Returns:
- primitive Class or null
checkPackage
public static boolean checkPackage(java.lang.String p,
java.lang.ClassLoader cl)
- Parameters:
p
- Packagecl
-
- Returns:
- true if each package has a ObjectFactory class or package-info
getMarshaller
public javax.xml.bind.Marshaller getMarshaller(javax.xml.bind.JAXBContext context)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
releaseJAXBMarshaller
public void releaseJAXBMarshaller(javax.xml.bind.JAXBContext context,
javax.xml.bind.Marshaller marshaller)
getUnmarshaller
public javax.xml.bind.Unmarshaller getUnmarshaller(javax.xml.bind.JAXBContext context)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
releaseJAXBUnmarshaller
public void releaseJAXBUnmarshaller(javax.xml.bind.JAXBContext context,
javax.xml.bind.Unmarshaller unmarshaller)
getCache
public LRUCache<java.lang.Object,javax.xml.bind.JAXBContext> getCache()
getJAXBContext
public javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class<?> cls)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
getJAXBContext
public javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class<?>[] classes)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
getJAXBContext
public javax.xml.bind.JAXBContext getJAXBContext(java.util.Set<java.lang.Class<?>> classes)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
clear
public void clear()