ClassLoader.SetClassAssertionStatus(String, Boolean) Method

Definition

Sets the desired assertion status for the named top-level class in this class loader and any nested classes contained therein.

[Android.Runtime.Register("setClassAssertionStatus", "(Ljava/lang/String;Z)V", "GetSetClassAssertionStatus_Ljava_lang_String_ZHandler")]
public virtual void SetClassAssertionStatus (string? className, bool enabled);
[<Android.Runtime.Register("setClassAssertionStatus", "(Ljava/lang/String;Z)V", "GetSetClassAssertionStatus_Ljava_lang_String_ZHandler")>]
abstract member SetClassAssertionStatus : string * bool -> unit
override this.SetClassAssertionStatus : string * bool -> unit

Parameters

className
String

The fully qualified class name of the top-level class whose assertion status is to be set.

enabled
Boolean

true if the named class is to have assertions enabled when (and if) it is initialized, false if the class is to have assertions disabled.

Attributes

Remarks

Sets the desired assertion status for the named top-level class in this class loader and any nested classes contained therein. This setting takes precedence over the class loader's default assertion status, and over any applicable per-package default. This method has no effect if the named class has already been initialized. (Once a class is initialized, its assertion status cannot change.)

If the named class is not a top-level class, this invocation will have no effect on the actual assertion status of any class.

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

Added in 1.4.

Java documentation for java.lang.ClassLoader.setClassAssertionStatus(java.lang.String, 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