Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.runtime
Class Exceptions

    java.lang.Object
      |
      +--com.solarmetric.kodo.runtime.Exceptions

class Exceptions
extends Object

Utility methods for externalizing exceptions.

Constructor Summary
`(package private)` | `Exceptions()`

Method Summary
`static Exception` | `checkSerialize(Exception e)` Return the exception if it is serializable, otherwise return null.
`static boolean` | `isSerializable(Object ob)` Test to see if the specified Object will be able to be serialized.
`(package private) static Object` | `replaceFailedObject(Object ob)` Convert the specified failed object into a serializable object for when we are serializing an Exception.
`(package private) static Throwable[]` | `replaceNestedThrowables(Throwable[] nested)` Convert the specified throwables into a serialzable array.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Exceptions

    Exceptions()

Method Detail

### isSerializable

    public static boolean isSerializable(Object ob)

  Test to see if the specified Object will be able to be serialized. This will check if the object implements Serializable, and if so, will try to perform an actual serialization. This is in case the object has fields which, in turn, are not serializable.
  Parameters:
    `ob` - the object to test
  Returns:
    true if the object will be able to be serialized

### checkSerialize

    public static Exception checkSerialize(Exception e)

  Return the exception if it is serializable, otherwise return null.

### replaceFailedObject

    static Object replaceFailedObject(Object ob)

  Convert the specified failed object into a serializable object for when we are serializing an Exception. It will try the following:
  - if the object can be serialized, return the object itself
  - if the object has a PC ID, return the ID
  - return the toString() form of the object
  Parameters:
    `ob` - the object to convert
  Returns:
    some serialized representation of the object

### replaceNestedThrowables

    static Throwable[] replaceNestedThrowables(Throwable[] nested)

  Convert the specified throwables into a serialzable array. If any of the nested throwables cannot be serialized, they will be converted into a Exception with the original message.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.