Udostępnij za pośrednictwem


AssertionError Constructors

Definition

Overloads

AssertionError()

Constructs an AssertionError with no detail message.

AssertionError(Object)

Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in section {

AssertionError(Boolean)

Constructs an AssertionError with its detail message derived from the specified boolean, which is converted to a string as defined in section {

AssertionError(Char)

Constructs an AssertionError with its detail message derived from the specified char, which is converted to a string as defined in section {

AssertionError(Double)

Constructs an AssertionError with its detail message derived from the specified double, which is converted to a string as defined in section {

AssertionError(Int32)

Constructs an AssertionError with its detail message derived from the specified int, which is converted to a string as defined in section {

AssertionError(Int64)

Constructs an AssertionError with its detail message derived from the specified long, which is converted to a string as defined in section {

AssertionError(Single)

Constructs an AssertionError with its detail message derived from the specified float, which is converted to a string as defined in section {

AssertionError(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

AssertionError(String, Throwable)

Constructs a new AssertionError with the specified detail message and cause.

AssertionError()

Constructs an AssertionError with no detail message.

[Android.Runtime.Register(".ctor", "()V", "")]
public AssertionError ();
Attributes

Remarks

Constructs an AssertionError with no detail message.

Java documentation for java.lang.AssertionError.AssertionError().

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

AssertionError(Object)

Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(Ljava/lang/Object;)V", "")]
public AssertionError (Java.Lang.Object? detailMessage);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Object;)V", "")>]
new Java.Lang.AssertionError : Java.Lang.Object -> Java.Lang.AssertionError

Parameters

detailMessage
Object

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(java.lang.Object).

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

AssertionError(Boolean)

Constructs an AssertionError with its detail message derived from the specified boolean, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(Z)V", "")]
public AssertionError (bool detailMessage);
[<Android.Runtime.Register(".ctor", "(Z)V", "")>]
new Java.Lang.AssertionError : bool -> Java.Lang.AssertionError

Parameters

detailMessage
Boolean

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified boolean, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(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

AssertionError(Char)

Constructs an AssertionError with its detail message derived from the specified char, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(C)V", "")]
public AssertionError (char detailMessage);
[<Android.Runtime.Register(".ctor", "(C)V", "")>]
new Java.Lang.AssertionError : char -> Java.Lang.AssertionError

Parameters

detailMessage
Char

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified char, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(char).

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

AssertionError(Double)

Constructs an AssertionError with its detail message derived from the specified double, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(D)V", "")]
public AssertionError (double detailMessage);
[<Android.Runtime.Register(".ctor", "(D)V", "")>]
new Java.Lang.AssertionError : double -> Java.Lang.AssertionError

Parameters

detailMessage
Double

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified double, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(double).

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

AssertionError(Int32)

Constructs an AssertionError with its detail message derived from the specified int, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(I)V", "")]
public AssertionError (int detailMessage);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Lang.AssertionError : int -> Java.Lang.AssertionError

Parameters

detailMessage
Int32

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified int, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(int).

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

AssertionError(Int64)

Constructs an AssertionError with its detail message derived from the specified long, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(J)V", "")]
public AssertionError (long detailMessage);
[<Android.Runtime.Register(".ctor", "(J)V", "")>]
new Java.Lang.AssertionError : int64 -> Java.Lang.AssertionError

Parameters

detailMessage
Int64

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified long, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(long).

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

AssertionError(Single)

Constructs an AssertionError with its detail message derived from the specified float, which is converted to a string as defined in section {

[Android.Runtime.Register(".ctor", "(F)V", "")]
public AssertionError (float detailMessage);
[<Android.Runtime.Register(".ctor", "(F)V", "")>]
new Java.Lang.AssertionError : single -> Java.Lang.AssertionError

Parameters

detailMessage
Single

value to be used in constructing detail message

Attributes

Remarks

Constructs an AssertionError with its detail message derived from the specified float, which is converted to a string as defined in section {

Java documentation for java.lang.AssertionError.AssertionError(float).

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

AssertionError(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected AssertionError (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Lang.AssertionError : nativeint * Android.Runtime.JniHandleOwnership -> Java.Lang.AssertionError

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

AssertionError(String, Throwable)

Constructs a new AssertionError with the specified detail message and cause.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "")]
public AssertionError (string? message, Java.Lang.Throwable? cause);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "")>]
new Java.Lang.AssertionError : string * Java.Lang.Throwable -> Java.Lang.AssertionError

Parameters

message
String

the detail message, may be null

cause
Throwable

the cause, may be null

Attributes

Remarks

Constructs a new AssertionError with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this error's detail message.

Added in 1.7.

Java documentation for java.lang.AssertionError.AssertionError(java.lang.String, java.lang.Throwable).

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