1 /* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6 /** 7 * Mockito plugins allow customization of behavior. 8 * For example, it is useful for Android integration via dexmaker. 9 * See examples in docs for MockMaker. 10 * 11 * <p> 12 * The plugin mechanism of mockito works in a similar way as the {@link java.util.ServiceLoader}, however instead of 13 * looking in the <code>META-INF</code> directory, Mockito will look in <code>mockito-extensions</code> directory. 14 * <em>The reason for that is that Android SDK strips jars from the <code>META-INF</code> directory when creating an APK.</em> 15 * </p> 16 * 17 * <p> 18 * For example : 19 * </p> 20 * 21 * <ol style="list-style-type: lower-alpha"> 22 * <li> 23 * Create implementation itself, for example <code>org.awesome.mockito.AwesomeMockMaker</code> that extends 24 * the <code>MockMaker</code>. 25 * </li> 26 * <li> 27 * A file "<code>mockito-extensions/org.mockito.plugins.MockMaker</code>". The content of this file is exactly 28 * a <strong>one</strong> line with the qualified name: <code>org.awesome.mockito.AwesomeMockMaker</code>. 29 * </li> 30 * </ol> 31 * 32 * <p> 33 * Note that if several <code>mockito-extensions/org.mockito.plugins.MockMaker</code> files exists in the classpath 34 * Mockito will only use the first returned by the standard <code>ClassLoader.getResource</code> mechanism. 35 * </p> 36 */ 37 package org.mockito.plugins; 38