org.tagnetic.core.jaxb.tagneticconfig.impl.runtime
Class DefaultJAXBContextImpl

java.lang.Object
  extended byJAXBContext
      extended byorg.tagnetic.core.jaxb.tagneticconfig.impl.runtime.DefaultJAXBContextImpl
Direct Known Subclasses:
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.1 $
See Also:
Serialized Form

Constructor Summary
DefaultJAXBContextImpl(GrammarInfo gi)
          This constructor is used by the default no-arg constructor in the generated JAXBContextImpl objects.
DefaultJAXBContextImpl(java.lang.String contextPath, java.lang.ClassLoader classLoader)
          This is the constructor used by javax.xml.bind.FactoryFinder which bootstraps the RI.
 
Method Summary
 Marshaller createMarshaller()
          Create a Marshaller object that can be used to convert a java content-tree into XML data.
 Unmarshaller createUnmarshaller()
          Create an Unmarshaller object that can be used to convert XML data into a java content-tree.
 Validator createValidator()
          Create a Validator 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()
           
 java.lang.Object getProperty(java.lang.String name)
          There are no required properties, so simply throw an exception.
 java.lang.Object newInstance(java.lang.Class javaContentInterface)
          Create an instance of the specified Java content interface.
 void setProperty(java.lang.String name, java.lang.Object value)
          There are no required properties, so simply throw an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJAXBContextImpl

public DefaultJAXBContextImpl(java.lang.String contextPath,
                              java.lang.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.


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 a Marshaller object that can be used to convert a java content-tree into XML data.

Returns:
a Marshaller object
Throws:
JAXBException - if an error was encountered while creating the Marshaller object

createUnmarshaller

public Unmarshaller createUnmarshaller()
                                throws JAXBException
Create an Unmarshaller object that can be used to convert XML data into a java content-tree.

Returns:
an Unmarshaller object
Throws:
JAXBException - if an error was encountered while creating the Unmarshaller object

createValidator

public Validator createValidator()
                          throws JAXBException
Create a Validator object that can be used to validate a java content-tree.

Returns:
an Unmarshaller object
Throws:
JAXBException - if an error was encountered while creating the Validator object

newInstance

public java.lang.Object newInstance(java.lang.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(java.lang.String name,
                        java.lang.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 java.lang.Object getProperty(java.lang.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


Copyright © 2005 tagnetic.org. All Rights Reserved.