Annotation Type EpoxyModelClass


  • @Target(TYPE)
    @Retention(CLASS)
    public @interface EpoxyModelClass
    Used to annotate EpoxyModel classes in order to generate a subclass of that model with getters, setters, equals, and hashcode for the annotated fields, as well as other helper methods and boilerplate reduction.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int layout
      A layout resource that should be used as the default layout for the model.
      boolean useLayoutOverloads
      If true, any layout file name that has layout() as a prefix will be included as a method on the generated model.
    • Element Detail

      • layout

        @LayoutRes
        int layout
        A layout resource that should be used as the default layout for the model. If you set this you don't have to implement `getDefaultLayout`; it will be generated for you.
        Default:
        0
      • useLayoutOverloads

        boolean useLayoutOverloads
        If true, any layout file name that has layout() as a prefix will be included as a method on the generated model.

        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