1/*
2 * Copyright (c) 2007 Mockito contributors
3 * This program is made available under the terms of the MIT License.
4 */
5package org.mockito.internal.matchers;
6
7/**
8 * Intended to use in certain ArgumentMatchers.
9 * When ArgumentMatcher fails, chance is that the actual object has the same output of toString() than
10 * the wanted object. This looks weird when failures are reported.
11 * Therefore when matcher fails but toString() yields the same outputs,
12 * we will try to use the {@link #toStringWithType()} method.
13 */
14public interface ContainsExtraTypeInfo {
15
16    /**
17     * Returns more verbose description of the object which include type information
18     */
19    String toStringWithType();
20
21    /**
22     * Checks if target target has matching type.
23     * If the type matches, there is no point in rendering result from {@link #toStringWithType()}
24     */
25    boolean typeMatches(Object target);
26}
27