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 javax.xml.bind.JAXBContextThis 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 $
-
-
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 javax.xml.bind.MarshallercreateMarshaller()Create aMarshallerobject that can be used to convert a java content-tree into XML data.javax.xml.bind.UnmarshallercreateUnmarshaller()Create anUnmarshallerobject that can be used to convert XML data into a java content-tree.javax.xml.bind.ValidatorcreateValidator()Create aValidatorobject that can be used to validate a java content-tree.com.sun.msv.grammar.GrammargetGrammar()Loads a grammar object for the unmarshal-time validation.GrammarInfogetGrammarInfo()ObjectgetProperty(String name)There are no required properties, so simply throw an exception.ObjectnewInstance(Class javaContentInterface)Create an instance of the specified Java content interface.voidsetProperty(String name, Object value)There are no required properties, so simply throw an exception.
-
-
-
Constructor Detail
-
DefaultJAXBContextImpl
public DefaultJAXBContextImpl(String contextPath, ClassLoader classLoader) throws javax.xml.bind.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:
javax.xml.bind.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 javax.xml.bind.JAXBExceptionLoads a grammar object for the unmarshal-time validation.getGrammar is normally very expensive, so it's worth synchronizing to avoid unnecessary invocation.
- Throws:
javax.xml.bind.JAXBException
-
createMarshaller
public javax.xml.bind.Marshaller createMarshaller() throws javax.xml.bind.JAXBExceptionCreate aMarshallerobject that can be used to convert a java content-tree into XML data.- Specified by:
createMarshallerin classjavax.xml.bind.JAXBContext- Returns:
- a
Marshallerobject - Throws:
javax.xml.bind.JAXBException- if an error was encountered while creating theMarshallerobject
-
createUnmarshaller
public javax.xml.bind.Unmarshaller createUnmarshaller() throws javax.xml.bind.JAXBExceptionCreate anUnmarshallerobject that can be used to convert XML data into a java content-tree.- Specified by:
createUnmarshallerin classjavax.xml.bind.JAXBContext- Returns:
- an
Unmarshallerobject - Throws:
javax.xml.bind.JAXBException- if an error was encountered while creating theUnmarshallerobject
-
createValidator
public javax.xml.bind.Validator createValidator() throws javax.xml.bind.JAXBExceptionCreate aValidatorobject that can be used to validate a java content-tree.- Specified by:
createValidatorin classjavax.xml.bind.JAXBContext- Returns:
- an
Unmarshallerobject - Throws:
javax.xml.bind.JAXBException- if an error was encountered while creating theValidatorobject
-
newInstance
public Object newInstance(Class javaContentInterface) throws javax.xml.bind.JAXBException
Create an instance of the specified Java content interface.- Parameters:
javaContentInterface- the Class object- Returns:
- an instance of the Java content interface
- Throws:
javax.xml.bind.JAXBException- if an error occurs while creating the instance
-
setProperty
public void setProperty(String name, Object value) throws javax.xml.bind.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:
javax.xml.bind.PropertyException
-
-