com.sun.xml.bind.v2.runtime

Class RuntimeUtil

public class RuntimeUtil extends Object

Nested Class Summary
static classRuntimeUtil.ToStringAdapter
XmlAdapter for printing arbitrary object by using Object#toString().
Field Summary
static Map<Class,Class>boxToPrimitive
Map from Class objects representing primitive types to Class objects representing their boxed types.
static Map<Class,Class>primitiveToBox
Reverse map of boxToPrimitive.
Method Summary
static voidhandlePrintConversionException(Object caller, Exception e, XMLSerializer serializer)
Reports a print conversion error while marshalling.
static voidhandleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject)
Reports that the type of an object in a property is unexpected.

Field Detail

boxToPrimitive

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

e.g., int -> Integer.

primitiveToBox

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

Method Detail

handlePrintConversionException

public static void handlePrintConversionException(Object caller, Exception e, XMLSerializer serializer)
Reports a print conversion error while marshalling.

handleTypeMismatchError

public static void handleTypeMismatchError(XMLSerializer serializer, Object parentObject, String fieldName, Object childObject)
Reports that the type of an object in a property is unexpected.