Package org.robolectric.shadows
Class ModuleInfoBuilder
java.lang.Object
org.robolectric.shadows.ModuleInfoBuilder
public final class ModuleInfoBuilder extends Object
Builder for
ModuleInfo
as ModuleInfo has hidden constructors, this builder class has been
added as a way to make custom ModuleInfo objects when needed.-
Method Summary
Modifier and Type Method Description ModuleInfo
build()
Returns aModuleInfo
with the data that was given.static ModuleInfoBuilder
newBuilder()
Start building a new ModuleInfoModuleInfoBuilder
setHidden(boolean hidden)
Sets whether or not the module is hiddenModuleInfoBuilder
setName(CharSequence name)
Sets the public name of the moduleModuleInfoBuilder
setPackageName(String packageName)
Sets the package name of the module
-
Method Details
-
newBuilder
Start building a new ModuleInfo- Returns:
- a new instance of
ModuleInfoBuilder
.
-
setName
Sets the public name of the module -
setPackageName
Sets the package name of the module -
setHidden
Sets whether or not the module is hidden -
build
Returns aModuleInfo
with the data that was given. Both name and packageName are mandatory to build, but hidden is optional, if no value was given will default to false
-