Package com.airbnb.epoxy
Annotation Type PackageModelViewConfig
-
@Target(TYPE) @Retention(CLASS) public @interface PackageModelViewConfigSettings that apply to all views annotated withModelViewin this package. Also applies to subpackages, unless other package config values are set in those sub packages.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<?>rClassThe R class used in this module (eg "com.example.app.R.class").
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<?>defaultBaseModelClassAn optional EpoxyModel subclass that generated models should extend.java.lang.StringdefaultLayoutPatternA default layout pattern to be used for specifying layouts for generated models.PackageModelViewConfig.OptiondisableGenerateBuilderOverloadsControls 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.OptiondisableGenerateGettersControls whether getter functions (that return the value of each attribute) are generated on models.PackageModelViewConfig.OptiondisableGenerateResetControls whether the "reset" function (that clears all attribute values) are generated on models.java.lang.StringgeneratedModelSuffixSuffix, which will be appended to generated model's names.booleanuseLayoutOverloadsIf 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.
-
-
-
-
defaultLayoutPattern
java.lang.String defaultLayoutPattern
A default layout pattern to be used for specifying layouts for generated models. If this is set then a layout can be omitted from a view'sModelViewannotation.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".
- Default:
- "%s"
-
-
-
useLayoutOverloads
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.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.
- Default:
- false
-
-
-
disableGenerateBuilderOverloads
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. This helps make all setters (such as id(...) ) return the same generated model so they can be chained in a builder pattern. This is mainly intended for Java usage and is generally unnecessary when using models in kotlin, especially if the generated kotlin model build extension functions are used. Disabling this can greatly reduce the number of methods generated on models. Default is false. This may also be set project wide with an annotation processor option.- Default:
- com.airbnb.epoxy.PackageModelViewConfig.Option.Default
-
-
-
disableGenerateGetters
PackageModelViewConfig.Option disableGenerateGetters
Controls whether getter functions (that return the value of each attribute) are generated on models. Disabling this can greatly reduce the number of methods generated on models. Default is false. This may also be set project wide with an annotation processor option.- Default:
- com.airbnb.epoxy.PackageModelViewConfig.Option.Default
-
-
-
disableGenerateReset
PackageModelViewConfig.Option disableGenerateReset
Controls whether the "reset" function (that clears all attribute values) are generated on models. This function is generally legacy and is not recommended to be used with the modern immutable model approach of EpoxyControllers. Disabling this reduces the amount of generated code. Default is false. This may also be set project wide with an annotation processor option.- Default:
- com.airbnb.epoxy.PackageModelViewConfig.Option.Default
-
-