|
||||||||||
| 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_RECURSION_DEPT
The maxium depth for the object formatter that will format the values |
protected ObjectFormatter |
objectFormatter
|
protected java.util.Map<java.lang.Object,java.lang.String> |
testedObjectFieldValuesAndNames
|
| Constructor Summary | |
|---|---|
ProxyInvocationsReport(java.lang.Object testedObject)
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
createLargeValueName(java.lang.Class<?> type,
java.util.Map<java.lang.Class<?>,java.lang.Integer> largeObjectNameIndexes)
Creates a name to replace a large value. |
protected java.lang.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 java.lang.String |
formatInvokedAt(ProxyInvocation proxyInvocation)
Creates a string representation of the details of the given invocation. |
protected java.lang.String |
formatObject(java.lang.Object object)
|
protected java.lang.String |
formatValue(java.lang.Object valueAtInvocationTime,
java.lang.Object value,
java.lang.Class<?> type,
java.util.List<ProxyInvocationsReport.FormattedObject> currentLargeObjects,
java.util.Map<java.lang.Object,ProxyInvocationsReport.FormattedObject> allLargeObjects,
java.util.Map<java.lang.Class<?>,java.lang.Integer> largeObjectNameIndexes)
Formats the given value. |
protected java.util.Map<java.lang.Object,java.lang.String> |
getFieldValuesAndNames(java.lang.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 MAX_INLINE_PARAMETER_LENGTH
protected ObjectFormatter objectFormatter
protected java.util.Map<java.lang.Object,java.lang.String> testedObjectFieldValuesAndNames
| Constructor Detail |
|---|
public ProxyInvocationsReport(java.lang.Object testedObject)
| Method Detail |
|---|
protected java.lang.String formatInvokedAt(ProxyInvocation proxyInvocation)
proxyInvocation - The invocation to format, not null
protected java.lang.String formatValue(java.lang.Object valueAtInvocationTime,
java.lang.Object value,
java.lang.Class<?> type,
java.util.List<ProxyInvocationsReport.FormattedObject> currentLargeObjects,
java.util.Map<java.lang.Object,ProxyInvocationsReport.FormattedObject> allLargeObjects,
java.util.Map<java.lang.Class<?>,java.lang.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 java.lang.String createLargeValueName(java.lang.Class<?> type,
java.util.Map<java.lang.Class<?>,java.lang.Integer> largeObjectNameIndexes)
type - The type of the large value, not nulllargeObjectNameIndexes - The current indexes per type, not null
protected java.lang.String formatInvocationIndex(int invocationIndex,
int totalInvocationNumber)
invocationIndex - The index of the invcationtotalInvocationNumber - The total number of invocations.
protected java.lang.String formatObject(java.lang.Object object)
object - The object
protected java.util.Map<java.lang.Object,java.lang.String> getFieldValuesAndNames(java.lang.Object testedObject)
testedObject - The test object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||