|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.mock.report.impl.ProxyInvocationsReport
public abstract class ProxyInvocationsReport
A base class for reports about proxy invocations.
| Nested Class Summary | |
|---|---|
protected static class |
ProxyInvocationsReport.FormattedObject
Class for representing a value that was too large to be displayed inline. |
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
ProxyInvocationsReport(Object testedObject)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
protected Map<Object,String> testedObjectFieldValuesAndNames
| Constructor Detail |
|---|
public ProxyInvocationsReport(Object testedObject)
| Method Detail |
|---|
protected String formatInvokedAt(ProxyInvocation proxyInvocation)
proxyInvocation - The invocation to format, not null
protected 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.Integer>) method.
E.g. string1, myClass1
valueAtInvocationTime - 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 null
protected String createLargeValueName(Class<?> type,
Map<Class<?>,Integer> largeObjectNameIndexes)
type - The type of the large value, not nulllargeObjectNameIndexes - The current indexes per type, not null
protected String formatInvocationIndex(int invocationIndex,
int totalInvocationNumber)
invocationIndex - The index of the invcationtotalInvocationNumber - The total number of invocations.
protected String formatObject(Object object)
object - The object
protected Map<Object,String> getFieldValuesAndNames(Object testedObject)
testedObject - The test object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||