GrammarInfoImpl.java revision dff2cc5646d4437ab9e0cb1dcb59da65462a5938
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.11 at 10:34:07 AM PDT
//
/**
* Keeps the information about the grammar as a whole.
*
* This object is immutable and thread-safe.
*
* @author
* <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
*/
public class GrammarInfoImpl implements GrammarInfo
{
/**
* Map from {@link QName}s (root tag names) to {@link Class}es of the
* content interface that should be instanciated.
*/
private final Map rootTagMap;
/**
* Enclosing ObjectFactory class. Used to load resources.
*/
private final Class objectFactoryClass;
/**
* Map from {@link Class}es that represent content interfaces
* to {@link String}s that represent names of the corresponding
* implementation classes.
*/
private final Map defaultImplementationMap;
/**
* ClassLoader that should be used to load impl classes.
*/
private final ClassLoader classLoader;
public GrammarInfoImpl( Map _rootTagMap, Map _defaultImplementationMap, Class _objectFactoryClass ) {
this.rootTagMap = _rootTagMap;
// the assumption is that the content interfaces and their impls
// are loaded from the same class loader.
}
/**
* @return the name of the content interface that is registered with
* the specified element name.
*/
// note that the value of rootTagMap could be null.
}
else return getDefaultImplementation(intfCls);
}
public final UnmarshallingEventHandler createUnmarshaller(
try {
} catch (InstantiationException e) {
throw new InstantiationError(e.toString());
} catch (IllegalAccessException e) {
throw new IllegalAccessError(e.toString());
}
}
public final String[] getProbePoints() {
}
}
}
try {
// by caching the obtained Class objects.
return null;
else
} catch (ClassNotFoundException e) {
throw new NoClassDefFoundError(e.toString());
}
}
/**
* Gets the MSV AGM which can be used to validate XML during
*/
try {
// unable to find bgm.ser
throw new JAXBException(
}
// deserialize the bgm
return g;
} catch( Exception e ) {
throw new JAXBException(
e );
}
}
/**
* @see com.sun.tools.xjc.runtime.GrammarInfo#castToXMLSerializable(java.lang.Object)
*/
if( o instanceof XMLSerializable ) {
return (XMLSerializable)o;
} else {
return null;
}
}
/**
* @see com.sun.tools.xjc.runtime.GrammarInfo#castToValidatableObject(java.lang.Object)
*/
if( o instanceof ValidatableObject ) {
return (ValidatableObject)o;
} else {
return null;
}
}
}