Package org.robolectric.plugins
Class TextLayoutModeConfigurer
- java.lang.Object
-
- org.robolectric.plugins.TextLayoutModeConfigurer
-
- All Implemented Interfaces:
Configurer<TextLayoutMode.Mode>
@AutoService(Configurer.class) public class TextLayoutModeConfigurer extends Object implements Configurer<TextLayoutMode.Mode>
Provides configuration to Robolectric for its @TextLayoutModeannotation.
-
-
Constructor Summary
Constructors Constructor Description TextLayoutModeConfigurer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextLayoutMode.ModedefaultConfig()Returns the default configuration for tests that do not specify a configuration of this type.Class<TextLayoutMode.Mode>getConfigClass()Retrieve the class type for this ConfigurerTextLayoutMode.ModegetConfigFor(Class<?> testClass)Returns the configuration for the given class.TextLayoutMode.ModegetConfigFor(Method method)Returns the configuration for the given method.TextLayoutMode.ModegetConfigFor(String packageName)Returns the configuration for a given package.TextLayoutMode.Modemerge(TextLayoutMode.Mode parentConfig, TextLayoutMode.Mode childConfig)Merges two configurations.
-
-
-
Method Detail
-
getConfigClass
public Class<TextLayoutMode.Mode> getConfigClass()
Description copied from interface:ConfigurerRetrieve the class type for this Configurer- Specified by:
getConfigClassin interfaceConfigurer<TextLayoutMode.Mode>
-
defaultConfig
@Nonnull public TextLayoutMode.Mode defaultConfig()
Description copied from interface:ConfigurerReturns the default configuration for tests that do not specify a configuration of this type.- Specified by:
defaultConfigin interfaceConfigurer<TextLayoutMode.Mode>
-
getConfigFor
public TextLayoutMode.Mode getConfigFor(@Nonnull String packageName)
Description copied from interface:ConfigurerReturns the configuration for a given package.This method will be called once for package in the hierarchy leading to the test class being configured. For example, for
com.example.FooTest, this method will be called three times with"com.example","@com", and""(representing the top level package).- Specified by:
getConfigForin interfaceConfigurer<TextLayoutMode.Mode>- Parameters:
packageName- the name of the package, or the empty string representing the top level unnamed package- Returns:
- a configuration object, or null if the given properties has no relevant data for this configuration
-
getConfigFor
public TextLayoutMode.Mode getConfigFor(@Nonnull Class<?> testClass)
Description copied from interface:ConfigurerReturns the configuration for the given class.This method will be called for each class in the test's class inheritance hierarchy.
- Specified by:
getConfigForin interfaceConfigurer<TextLayoutMode.Mode>- Returns:
- a configuration object, or null if the given class has no relevant data for this configuration
-
getConfigFor
public TextLayoutMode.Mode getConfigFor(@Nonnull Method method)
Description copied from interface:ConfigurerReturns the configuration for the given method.- Specified by:
getConfigForin interfaceConfigurer<TextLayoutMode.Mode>- Returns:
- a configuration object, or null if the given method has no relevant data for this configuration
-
merge
@Nonnull public TextLayoutMode.Mode merge(@Nonnull TextLayoutMode.Mode parentConfig, @Nonnull TextLayoutMode.Mode childConfig)
Description copied from interface:ConfigurerMerges two configurations. This method will called wheneverConfigurer.getConfigFor(java.lang.String)returns a non-null configuration object.- Specified by:
mergein interfaceConfigurer<TextLayoutMode.Mode>- Parameters:
parentConfig- a less specific configuration objectchildConfig- a more specific configuration object- Returns:
- the new configuration with merged parent and child data.
-
-