Top Description Fields Constructors Methods
org.assertj.core.api

public Class ErrorCollector

extends Object
Class Inheritance
Imports
java.lang.reflect.Method, java.util.Arrays, java.util.concurrent.Callable, net.bytebuddy.implementation.bind.annotation.FieldValue, .RuntimeType, .StubValue, .SuperCall, .SuperMethod, .This

Collects error messages of all AssertionErrors thrown by the proxied method.

Field Summary

Modifier and TypeField and Description
private AssertionErrorCollector
private static final String
public static final String
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private static long
public static Object

Returns:

the assertion result
intercept
(ErrorCollector
the ErrorCollector to gather assertions error for the assertion instance
errorCollector
,
Object
The instance of the method, the this reference.
assertion
,
Callable<?>
A proxy to invoke the original method.
proxy
,
Method
A reference to the original method.
method
,
Object
A default value for the return type. null for reference type and 0 for the corresponding primitive types.
stub
)

private static boolean
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

assertionErrorCollectorback to summary
private AssertionErrorCollector assertionErrorCollector
CLASS_NAMEback to summary
private static final String CLASS_NAME
FIELD_NAMEback to summary
public static final String FIELD_NAME
INTERCEPT_METHOD_NAMEback to summary
private static final String INTERCEPT_METHOD_NAME

Constructor Detail

ErrorCollectorback to summary
pack-priv ErrorCollector(AssertionErrorCollector collector)

Method Detail

addErrorback to summary
private void addError(AssertionError error)
countErrorCollectorProxyCallsback to summary
private static long countErrorCollectorProxyCalls()
interceptback to summary
public static Object intercept(ErrorCollector errorCollector, Object assertion, Callable<?> proxy, Method method, Object stub) throws Exception
Parameters
errorCollector:ErrorCollector

the ErrorCollector to gather assertions error for the assertion instance

assertion:Object

The instance of the method, the this reference.

proxy:Callable<?>

A proxy to invoke the original method.

method:Method

A reference to the original method.

stub:Object

A default value for the return type. null for reference type and 0 for the corresponding primitive types.

Returns:Object

the assertion result

Annotations
@RuntimeType
Exceptions
Exception:
may be thrown from the assertion proxy call
isNestedErrorCollectorProxyCallback to summary
private static boolean isNestedErrorCollectorProxyCall()
succeededback to summary
private void succeeded()