Class DefaultJAXBContextImpl
- java.lang.Object
-
- javax.xml.bind.JAXBContext
-
- com.sun.identity.wsfederation.jaxb.entityconfig.impl.runtime.DefaultJAXBContextImpl
-
- Direct Known Subclasses:
ObjectFactory
,ObjectFactory
,ObjectFactory
,ObjectFactory
,ObjectFactory
,ObjectFactory
,ObjectFactory
,ObjectFactory
public class DefaultJAXBContextImpl extends JAXBContext
This class provides the default implementation of JAXBContext. It also creates the GrammarInfoFacade that unifies all of the grammar info from packages on the contextPath.- Version:
- $Revision: 1.3 $
-
-
Field Summary
-
Fields inherited from class javax.xml.bind.JAXBContext
JAXB_CONTEXT_FACTORY
-
-
Constructor Summary
Constructors Constructor Description DefaultJAXBContextImpl(GrammarInfo gi)
This constructor is used by the default no-arg constructor in the generated JAXBContextImpl objects.DefaultJAXBContextImpl(String contextPath, ClassLoader classLoader)
This is the constructor used by javax.xml.bind.FactoryFinder which bootstraps the RI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Marshaller
createMarshaller()
Create aMarshaller
object that can be used to convert a java content-tree into XML data.Unmarshaller
createUnmarshaller()
Create anUnmarshaller
object that can be used to convert XML data into a java content-tree.Validator
createValidator()
Create aValidator
object that can be used to validate a java content-tree.com.sun.msv.grammar.Grammar
getGrammar()
Loads a grammar object for the unmarshal-time validation.GrammarInfo
getGrammarInfo()
Object
getProperty(String name)
There are no required properties, so simply throw an exception.Object
newInstance(Class javaContentInterface)
Create an instance of the specified Java content interface.void
setProperty(String name, Object value)
There are no required properties, so simply throw an exception.-
Methods inherited from class javax.xml.bind.JAXBContext
createBinder, createBinder, createJAXBIntrospector, generateSchema, newInstance, newInstance, newInstance, newInstance, newInstance
-
-
-
-
Constructor Detail
-
DefaultJAXBContextImpl
public DefaultJAXBContextImpl(String contextPath, ClassLoader classLoader) throws JAXBException
This is the constructor used by javax.xml.bind.FactoryFinder which bootstraps the RI. It causes the construction of a JAXBContext that contains a GrammarInfoFacade which is the union of all the generated JAXBContextImpl objects on the contextPath.- Throws:
JAXBException
-
DefaultJAXBContextImpl
public DefaultJAXBContextImpl(GrammarInfo gi)
This constructor is used by the default no-arg constructor in the generated JAXBContextImpl objects. It is also used by the bootstrapping constructor in this class.
-
-
Method Detail
-
getGrammarInfo
public GrammarInfo getGrammarInfo()
-
getGrammar
public com.sun.msv.grammar.Grammar getGrammar() throws JAXBException
Loads a grammar object for the unmarshal-time validation.getGrammar is normally very expensive, so it's worth synchronizing to avoid unnecessary invocation.
- Throws:
JAXBException
-
createMarshaller
public Marshaller createMarshaller() throws JAXBException
Create aMarshaller
object that can be used to convert a java content-tree into XML data.- Specified by:
createMarshaller
in classJAXBContext
- Returns:
- a
Marshaller
object - Throws:
JAXBException
- if an error was encountered while creating theMarshaller
object
-
createUnmarshaller
public Unmarshaller createUnmarshaller() throws JAXBException
Create anUnmarshaller
object that can be used to convert XML data into a java content-tree.- Specified by:
createUnmarshaller
in classJAXBContext
- Returns:
- an
Unmarshaller
object - Throws:
JAXBException
- if an error was encountered while creating theUnmarshaller
object
-
createValidator
public Validator createValidator() throws JAXBException
Create aValidator
object that can be used to validate a java content-tree.- Specified by:
createValidator
in classJAXBContext
- Returns:
- an
Unmarshaller
object - Throws:
JAXBException
- if an error was encountered while creating theValidator
object
-
newInstance
public Object newInstance(Class javaContentInterface) throws JAXBException
Create an instance of the specified Java content interface.- Parameters:
javaContentInterface
- the Class object- Returns:
- an instance of the Java content interface
- Throws:
JAXBException
-
setProperty
public void setProperty(String name, Object value) throws PropertyException
There are no required properties, so simply throw an exception. Other providers may have support for properties on Validator, but the RI doesn't- Throws:
PropertyException
-
getProperty
public Object getProperty(String name) throws PropertyException
There are no required properties, so simply throw an exception. Other providers may have support for properties on Validator, but the RI doesn't- Throws:
PropertyException
-
-