public abstract class ProxyInvocationsReport extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ProxyInvocationsReport.FormattedObject
Class for representing a value that was too large to be displayed inline.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_INLINE_PARAMETER_LENGTH
The maximum length of an inline value
|
static int |
OBJECT_FORMATTER_MAX_NR_ARRAY_OR_COLLECTION_ELEMENTS
The maximum nr of elements for arrays and collections to display in the reports
|
static int |
OBJECT_FORMATTER_MAX_RECURSION_DEPT
The maximum depth (child objects) of objects to display in the reports.
|
protected ObjectFormatter |
objectFormatter |
protected Map<Object,String> |
testedObjectFieldValuesAndNames |
| Constructor and Description |
|---|
ProxyInvocationsReport(Object testedObject) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createLargeValueName(Class<?> type,
Map<Class<?>,Integer> largeObjectNameIndexes)
Creates a name to replace a large value.
|
protected String |
formatInvocationIndex(int invocationIndex,
int totalInvocationNumber)
Formats the invocation number, and adds spaces to make sure everything is formatted
nicely on the same line width.
|
protected String |
formatInvokedAt(ProxyInvocation proxyInvocation)
Creates a string representation of the details of the given invocation.
|
protected String |
formatObject(Object object) |
protected String |
formatValue(Object valueAtInvocationTime,
Object value,
Class<?> type,
List<ProxyInvocationsReport.FormattedObject> currentLargeObjects,
Map<Object,ProxyInvocationsReport.FormattedObject> allLargeObjects,
Map<Class<?>,Integer> largeObjectNameIndexes)
Formats the given value.
|
protected Map<Object,String> |
getFieldValuesAndNames(Object testedObject)
Gets all the field values in the given test object with their corresponding field names.
|
public static int OBJECT_FORMATTER_MAX_RECURSION_DEPT
public static int OBJECT_FORMATTER_MAX_NR_ARRAY_OR_COLLECTION_ELEMENTS
public static int MAX_INLINE_PARAMETER_LENGTH
protected ObjectFormatter objectFormatter
public ProxyInvocationsReport(Object testedObject)
protected String formatInvokedAt(ProxyInvocation proxyInvocation)
proxyInvocation - The invocation to format, not nullprotected String formatValue(Object valueAtInvocationTime, Object value, Class<?> type, List<ProxyInvocationsReport.FormattedObject> currentLargeObjects, Map<Object,ProxyInvocationsReport.FormattedObject> allLargeObjects, Map<Class<?>,Integer> largeObjectNameIndexes)
createLargeValueName(java.lang.Class<?>, java.util.Map<java.lang.Class<?>, java.lang.Integer>) method.
E.g. string1, myClass1valueAtInvocationTime - The value to format, not nullvalue - The value to format by reference, not nulltype - The type of the large value, not nullcurrentLargeObjects - The current the large values, not nullallLargeObjects - All large values per value, not nulllargeObjectNameIndexes - The current indexes to use for the large value names (per value type), not nullprotected String createLargeValueName(Class<?> type, Map<Class<?>,Integer> largeObjectNameIndexes)
type - The type of the large value, not nulllargeObjectNameIndexes - The current indexes per type, not nullprotected String formatInvocationIndex(int invocationIndex, int totalInvocationNumber)
invocationIndex - The index of the invcationtotalInvocationNumber - The total number of invocations.protected String formatObject(Object object)
object - The objectprotected Map<Object,String> getFieldValuesAndNames(Object testedObject)
testedObject - The test objectCopyright © 2016. All Rights Reserved.