Class TraceInformation

  • All Implemented Interfaces:
    java.io.Serializable

    public final class TraceInformation
    extends java.lang.Throwable
    A facility available to marshalling implementations which allows for detailed stack traces which trace the position in the object graph where a marshalling or unmarshalling problem has occurred.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addFieldInformation​(java.lang.Throwable t, java.lang.String fieldName)
      Add information about a field which was being marshalled.
      static void addIncompleteObjectInformation​(java.lang.Throwable t, java.lang.Class<?> targetClass)
      Add information about an incomplete object which was being unmarshalled.
      static void addIncompleteObjectInformation​(java.lang.Throwable t, java.lang.String targetClassName)
      Add information about an incomplete object which was being unmarshalled.
      static void addIndexInformation​(java.lang.Throwable t, int index, int size, TraceInformation.IndexType kind)
      Add information about an index into a collection which was being (un-)marshalled.
      static void addObjectInformation​(java.lang.Throwable t, java.lang.Object targetObject)
      Add information about an object which was being (un-)marshalled.
      static void addUserInformation​(java.lang.Throwable t, java.io.Serializable data)
      Add user information about problem with marshalling or unmarshalling.
      java.lang.Throwable fillInStackTrace()  
      private static java.lang.String getNiceClassName​(java.lang.Class<?> clazz)  
      private static TraceInformation getOrAddTraceInformation​(java.lang.Throwable t)  
      void setStackTrace​(java.lang.StackTraceElement[] stackTrace)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TraceInformation

        TraceInformation()
    • Method Detail

      • fillInStackTrace

        public java.lang.Throwable fillInStackTrace()
        Overrides:
        fillInStackTrace in class java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable
      • setStackTrace

        public void setStackTrace​(java.lang.StackTraceElement[] stackTrace)
        Overrides:
        setStackTrace in class java.lang.Throwable
      • getOrAddTraceInformation

        private static TraceInformation getOrAddTraceInformation​(java.lang.Throwable t)
      • getNiceClassName

        private static java.lang.String getNiceClassName​(java.lang.Class<?> clazz)
      • addUserInformation

        public static void addUserInformation​(java.lang.Throwable t,
                                              java.io.Serializable data)
        Add user information about problem with marshalling or unmarshalling.
        Parameters:
        t - the throwable to update
        data - the user data
      • addFieldInformation

        public static void addFieldInformation​(java.lang.Throwable t,
                                               java.lang.String fieldName)
        Add information about a field which was being marshalled.
        Parameters:
        t - the throwable to update
        fieldName - the field name being (un-)marshalled
      • addObjectInformation

        public static void addObjectInformation​(java.lang.Throwable t,
                                                java.lang.Object targetObject)
        Add information about an object which was being (un-)marshalled.
        Parameters:
        t - the throwable to update
        targetObject - the target object which was being (un-)marshalled
      • addIncompleteObjectInformation

        public static void addIncompleteObjectInformation​(java.lang.Throwable t,
                                                          java.lang.Class<?> targetClass)
        Add information about an incomplete object which was being unmarshalled.
        Parameters:
        t - the throwable to update
        targetClass - the class of the target object being unmarshalled
      • addIncompleteObjectInformation

        public static void addIncompleteObjectInformation​(java.lang.Throwable t,
                                                          java.lang.String targetClassName)
        Add information about an incomplete object which was being unmarshalled.
        Parameters:
        t - the throwable to update
        targetClassName - the class of the target object being unmarshalled
      • addIndexInformation

        public static void addIndexInformation​(java.lang.Throwable t,
                                               int index,
                                               int size,
                                               TraceInformation.IndexType kind)
        Add information about an index into a collection which was being (un-)marshalled.
        Parameters:
        t - the throwable to update
        index - the index of the element in question
        size - the size of the collection in question
        kind - the type of element being processed