Added in API level 28

Violation


abstract class Violation : Throwable
kotlin.Any
   ↳ kotlin.Throwable
   ↳ android.os.strictmode.Violation

Root class for all StrictMode violations.

Summary

Public methods
open Throwable

open Int

open Throwable

open Unit

Public methods

fillInStackTrace

Added in API level 28
open fun fillInStackTrace(): Throwable
Return
Throwable a reference to this Throwable instance.

hashCode

Added in API level 28
open fun hashCode(): Int
Return
Int a hash code value for this object.

initCause

Added in API level 28
open fun initCause(cause: Throwable?): Throwable
Parameters
cause Throwable?: the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Return
Throwable a reference to this Throwable instance.
Exceptions
java.lang.IllegalArgumentException if cause is this throwable. (A throwable cannot be its own cause.)
java.lang.IllegalStateException if this throwable was created with Throwable(java.lang.Throwable) or Throwable(java.lang.String,java.lang.Throwable), or this method has already been called on this throwable.

setStackTrace

Added in API level 28
open fun setStackTrace(stackTrace: Array<StackTraceElement!>): Unit
Parameters
stackTrace Array<StackTraceElement!>: the stack trace elements to be associated with this Throwable. The specified array is copied by this call; changes in the specified array after the method invocation returns will have no affect on this Throwable's stack trace.
Exceptions
java.lang.NullPointerException if stackTrace is null or if any of the elements of stackTrace are null