
org.robolectric.internal.ShadowProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadowapi Show documentation
Show all versions of shadowapi Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.internal;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
/** Interface implemented by packages that provide shadows to Robolectric. */
@SuppressWarnings("NewApi")
public interface ShadowProvider {
/** Reset the static state of all shadows provided by this package. */
void reset();
/**
* Array of Java package names that are shadowed by this package.
*
* @return Array of Java package names.
*/
String[] getProvidedPackageNames();
/**
* Return a collection of Map.Entry objects representing the mapping of class name to shadow name.
*
* This is a multimap instead of a regular map in order to support, for instance, multiple
* shadows per class that only differ by SDK level.
*
*
It also uses a {@code Collection>} as the return value to avoid having
* a dependency on something like Guava Multimap.
*
* @return Shadow mapping.
*/
Collection> getShadows();
/**
* Map of framework classes which may be represented by more than one shadow, to be picked at
* runtime.
*
* @return A map from the name of the framework class to the name of its {#link
* org.robolectric.shadow.apiShadowPicker}.
*/
default Map getShadowPickerMap() {
return Collections.emptyMap();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy