com.sun.xml.bind.v2.runtime
Class RuntimeUtil

java.lang.Object
  extended by com.sun.xml.bind.v2.runtime.RuntimeUtil

public class RuntimeUtil
extends java.lang.Object


Nested Class Summary
static class RuntimeUtil.ToStringAdapter
          XmlAdapter for printing arbitrary object by using Object.toString().
 
Field Summary
static java.util.Map<java.lang.Class,java.lang.Class> boxToPrimitive
          Map from Class objects representing primitive types to Class objects representing their boxed types.
static java.util.Map<java.lang.Class,java.lang.Class> primitiveToBox
          Reverse map of boxToPrimitive.
 
Constructor Summary
RuntimeUtil()
           
 
Method Summary
static void handlePrintConversionException(java.lang.Object caller, java.lang.Exception e, XMLSerializer serializer)
          Reports a print conversion error while marshalling.
static void handleTypeMismatchError(XMLSerializer serializer, java.lang.Object parentObject, java.lang.String fieldName, java.lang.Object childObject)
          Reports that the type of an object in a property is unexpected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boxToPrimitive

public static final java.util.Map<java.lang.Class,java.lang.Class> boxToPrimitive
Map from Class objects representing primitive types to Class objects representing their boxed types.

e.g., int -> Integer.


primitiveToBox

public static final java.util.Map<java.lang.Class,java.lang.Class> primitiveToBox
Reverse map of boxToPrimitive.

Constructor Detail

RuntimeUtil

public RuntimeUtil()
Method Detail

handlePrintConversionException

public static void handlePrintConversionException(java.lang.Object caller,
                                                  java.lang.Exception e,
                                                  XMLSerializer serializer)
                                           throws org.xml.sax.SAXException
Reports a print conversion error while marshalling.

Throws:
org.xml.sax.SAXException

handleTypeMismatchError

public static void handleTypeMismatchError(XMLSerializer serializer,
                                           java.lang.Object parentObject,
                                           java.lang.String fieldName,
                                           java.lang.Object childObject)
                                    throws org.xml.sax.SAXException
Reports that the type of an object in a property is unexpected.

Throws:
org.xml.sax.SAXException