Share via


ClassLoader.SetDefaultAssertionStatus(Boolean) Method

Definition

Sets the default assertion status for this class loader.

[Android.Runtime.Register("setDefaultAssertionStatus", "(Z)V", "GetSetDefaultAssertionStatus_ZHandler")]
public virtual void SetDefaultAssertionStatus (bool enabled);
[<Android.Runtime.Register("setDefaultAssertionStatus", "(Z)V", "GetSetDefaultAssertionStatus_ZHandler")>]
abstract member SetDefaultAssertionStatus : bool -> unit
override this.SetDefaultAssertionStatus : bool -> unit

Parameters

enabled
Boolean

true if classes loaded by this class loader will henceforth have assertions enabled by default, false if they will have assertions disabled by default.

Attributes

Remarks

Sets the default assertion status for this class loader. This setting determines whether classes loaded by this class loader and initialized in the future will have assertions enabled or disabled by default. This setting may be overridden on a per-package or per-class basis by invoking #setPackageAssertionStatus(String, boolean) or #setClassAssertionStatus(String, boolean).

Android-note: AssertionStatuses are unsupported. This method is a no-op.

Added in 1.4.

Java documentation for java.lang.ClassLoader.setDefaultAssertionStatus(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to