org.glassfish.jersey.moxy.xml.internal
Class MoxyContextResolver

java.lang.Object
  extended by org.glassfish.jersey.moxy.xml.internal.MoxyContextResolver
All Implemented Interfaces:
ContextResolver<JAXBContext>

public class MoxyContextResolver
extends Object
implements ContextResolver<JAXBContext>

ContextResolver implementation which creates MOXy JAXBContext. TODO: deal with classes NOT annot ated with @XmlRootElement/@XmlType

Author:
Pavel Bucek (pavel.bucek at oracle.com)

Constructor Summary
MoxyContextResolver()
          Default constructor creates standard JAXBContext without any activated features and properties.
MoxyContextResolver(Map properties, ClassLoader classLoader, boolean oxmMappingLookup, Class... classes)
          Constructor which allows MOXy JAXBContext customization.
 
Method Summary
 JAXBContext getContext(Class<?> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoxyContextResolver

public MoxyContextResolver()
Default constructor creates standard JAXBContext without any activated features and properties. Current context ClassLoader will be used.


MoxyContextResolver

public MoxyContextResolver(Map properties,
                           ClassLoader classLoader,
                           boolean oxmMappingLookup,
                           Class... classes)
Constructor which allows MOXy JAXBContext customization.

Parameters:
properties - properties to be passed to JAXBContextFactory.createContext(Class[], java.util.Map, ClassLoader). Can be null.
classLoader - will be used to load classes. If null, current context ClassLoader will be used.
oxmMappingLookup - if true, lookup for file with custom mappings will be performed.
classes - additional classes used for creating JAXBContext.
Method Detail

getContext

public JAXBContext getContext(Class<?> type)
Specified by:
getContext in interface ContextResolver<JAXBContext>


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.