4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// Any modifications to this file will be lost upon recompilation of the source schema.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// Generated on: 2012.06.11 at 10:33:54 AM PDT
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkpackage com.sun.identity.federation.jaxb.entityconfig.impl.runtime;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport javax.xml.bind.helpers.PrintConversionEventImpl;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport javax.xml.bind.helpers.ValidationEventImpl;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport javax.xml.bind.helpers.ValidationEventLocatorImpl;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport com.sun.xml.bind.serializer.AbortSerializationException;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkimport com.sun.xml.bind.util.ValidationEventLocatorExImpl;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Reports a print conversion error while marshalling.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public static void handlePrintConversionException(
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk Object caller, Exception e, XMLSerializer serializer ) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk if( e instanceof SAXException )
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk // assume this exception is not from application.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk // (e.g., when a marshaller aborts the processing, this exception
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk // will be thrown)
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk ValidationEvent ve = new PrintConversionEventImpl(
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Reports that the type of an object in a property is unexpected.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public static void handleTypeMismatchError( XMLSerializer serializer,
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk Object parentObject, String fieldName, Object childObject ) throws AbortSerializationException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk ValidationEvent.ERROR, // maybe it should be a fatal error.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk new ValidationEventLocatorExImpl(parentObject,fieldName) );
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk private static String getUserFriendlyTypeName( Object o ) {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk if( o instanceof ValidatableObject )