Home | History | Annotate | Download | only in internal
      1 package org.robolectric.internal;
      2 
      3 import java.util.Collections;
      4 import java.util.Map;
      5 
      6 /**
      7  * Interface implemented by packages that provide shadows to Robolectric.
      8  */
      9 @SuppressWarnings("NewApi")
     10 public interface ShadowProvider {
     11 
     12   /**
     13    * Reset the static state of all shadows provided by this package.
     14    */
     15   void reset();
     16 
     17   /**
     18    * Array of Java package names that are shadowed by this package.
     19    *
     20    * @return  Array of Java package names.
     21    */
     22   String[] getProvidedPackageNames();
     23 
     24   /**
     25    * Return the mapping of class name to shadow name.
     26    *
     27    * @return Shadow mapping.
     28    */
     29   Map<String, String> getShadowMap();
     30 
     31   /**
     32    * Map of framework classes which may be represented by more than one shadow, to be picked
     33    * at runtime.
     34    *
     35    * @return A map from the name of the framework class to the name of its
     36    *     {#link org.robolectric.shadow.apiShadowPicker}.
     37    */
     38   default Map<String, String> getShadowPickerMap() {
     39     return Collections.emptyMap();
     40   }
     41 }
     42