1 package org.robolectric.annotation.experimental; 2 3 import java.lang.annotation.ElementType; 4 import java.lang.annotation.Retention; 5 import java.lang.annotation.RetentionPolicy; 6 import java.lang.annotation.Target; 7 8 /** 9 * A {@link org.robolectric.pluginapi.config.Configurer} annotation that dictates whether or not 10 * Robolectric should lazily instantiate the Application under test. 11 * 12 * <p>In particular, any test with {@link LazyLoad.ON} that does not need the Application will not 13 * load it (and recoup the associated cost) 14 * 15 * <p>NOTE: This feature is currently still experimental, so any users of {@link LazyLoad.ON} do so 16 * at their own risk 17 */ 18 @Retention(RetentionPolicy.RUNTIME) 19 @Target({ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD}) 20 public @interface LazyApplication { 21 22 /** Whether or not the Application should be lazily loaded */ value()23 LazyLoad value(); 24 25 /** Whether or not the Application should be lazily loaded */ 26 enum LazyLoad { 27 ON, 28 OFF, 29 } 30 } 31