@AutoService(value=Configurer.class) public class TextLayoutModeConfigurer extends Object implements Configurer<TextLayoutMode.Mode>
Provides configuration to Robolectric for its @TextLayoutMode annotation.
| Constructor and Description |
|---|
TextLayoutModeConfigurer() |
| Modifier and Type | Method and Description |
|---|---|
TextLayoutMode.Mode |
defaultConfig()
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 Configurer
|
TextLayoutMode.Mode |
getConfigFor(Class<?> testClass)
Returns the configuration for the given class.
|
TextLayoutMode.Mode |
getConfigFor(Method method)
Returns the configuration for the given method.
|
TextLayoutMode.Mode |
getConfigFor(String packageName)
Returns the configuration for a given package.
|
TextLayoutMode.Mode |
merge(TextLayoutMode.Mode parentConfig,
TextLayoutMode.Mode childConfig)
Merges two configurations.
|
public Class<TextLayoutMode.Mode> getConfigClass()
ConfigurerRetrieve the class type for this Configurer
getConfigClass in interface Configurer<TextLayoutMode.Mode>@Nonnull public TextLayoutMode.Mode defaultConfig()
ConfigurerReturns the default configuration for tests that do not specify a configuration of this type.
defaultConfig in interface Configurer<TextLayoutMode.Mode>public TextLayoutMode.Mode getConfigFor(@Nonnull String packageName)
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).
getConfigFor in interface Configurer<TextLayoutMode.Mode>packageName - the name of the package, or the empty string representing the top level unnamed packagenull if the given properties has no relevant data for this configurationpublic TextLayoutMode.Mode getConfigFor(@Nonnull Class<?> testClass)
ConfigurerReturns the configuration for the given class.
This method will be called for each class in the test’s class inheritance hierarchy.
getConfigFor in interface Configurer<TextLayoutMode.Mode>null if the given class has no relevant data for this configurationpublic TextLayoutMode.Mode getConfigFor(@Nonnull Method method)
ConfigurerReturns the configuration for the given method.
getConfigFor in interface Configurer<TextLayoutMode.Mode>null if the given method has no relevant data for this configuration@Nonnull public TextLayoutMode.Mode merge(@Nonnull TextLayoutMode.Mode parentConfig, @Nonnull TextLayoutMode.Mode childConfig)
ConfigurerMerges two configurations.
This method will called whenever Configurer.getConfigFor(java.lang.String) returns a non-null configuration object.
merge in interface Configurer<TextLayoutMode.Mode>parentConfig - a less specific configuration objectchildConfig - a more specific configuration object