@Target(value=TYPE)
@Retention(value=CLASS)
public @interface PackageModelViewConfig
ModelView in this
package. Also applies to subpackages, unless other package config values are set in those sub
packages.| Modifier and Type | Required Element and Description |
|---|---|
java.lang.Class<?> |
rClass
The R class used in this module (eg "com.example.app.R.class").
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.Class<?> |
defaultBaseModelClass
An optional EpoxyModel subclass that generated models should extend.
|
java.lang.String |
defaultLayoutPattern
A default layout pattern to be used for specifying layouts for generated models.
|
PackageModelViewConfig.Option |
disableGenerateBuilderOverloads
Controls whether "builder" setter functions that returns the model type will be duplicated
from super model classes with the function return type updated to use the generated model name.
|
PackageModelViewConfig.Option |
disableGenerateGetters
Controls whether getter functions (that return the value of each attribute) are generated
on models.
|
PackageModelViewConfig.Option |
disableGenerateReset
Controls whether the "reset" function (that clears all attribute values) are generated
on models.
|
java.lang.String |
generatedModelSuffix
Suffix, which will be appended to generated model's names.
|
boolean |
useLayoutOverloads
If true, any layout file name that has a view's default layout as a prefix will be included as
a method on the generated model for that view.
|
public abstract java.lang.Class<?> rClass
public abstract java.lang.String defaultLayoutPattern
ModelView annotation.
The "%s" placeholder represents the view's name in snack case. For example, the default value will use a layout resource of "R.layout.my_view" for the MyView class. If the layout name is changed to "view_holder_%s" then the layout used would be "R.layout.view_holder_my_view".
public abstract java.lang.Class<?> defaultBaseModelClass
public abstract boolean useLayoutOverloads
For example, if the layout is "R.layout.my_view" then any layouts in the form of "R.layout.my_view_*" will result in a generated method like "with*Layout" that will apply that other layout instead of the default.
public abstract java.lang.String generatedModelSuffix
public abstract PackageModelViewConfig.Option disableGenerateBuilderOverloads
public abstract PackageModelViewConfig.Option disableGenerateGetters
public abstract PackageModelViewConfig.Option disableGenerateReset