index
int64
0
0
repo_id
stringlengths
26
205
file_path
stringlengths
51
246
content
stringlengths
8
433k
__index_level_0__
int64
0
10k
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerWithAutoModel.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.AutoModel; import com.airbnb.epoxy.BasicModelWithAttribute_; import com.airbnb.epoxy.EpoxyController; public class ControllerWithAutoModel extends EpoxyController { @AutoModel BasicModelWithAttribute_ modelWithAttribute1; @AutoModel BasicModelWithAttribute_ modelWithAttribute2; @Override protected void buildModels() { } }
8,500
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/CustomPackageLayoutPatternViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class CustomPackageLayoutPatternViewModel_ extends EpoxyModel<CustomPackageLayoutPatternView> implements GeneratedModel<CustomPackageLayoutPatternView>, CustomPackageLayoutPatternViewModelBuilder { private OnModelBoundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final CustomPackageLayoutPatternView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final CustomPackageLayoutPatternView object) { super.bind(object); } @Override public void bind(final CustomPackageLayoutPatternView object, EpoxyModel previousModel) { if (!(previousModel instanceof CustomPackageLayoutPatternViewModel_)) { bind(object); return; } CustomPackageLayoutPatternViewModel_ that = (CustomPackageLayoutPatternViewModel_) previousModel; super.bind(object); } @Override public void handlePostBind(final CustomPackageLayoutPatternView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public CustomPackageLayoutPatternViewModel_ onBind( OnModelBoundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(CustomPackageLayoutPatternView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public CustomPackageLayoutPatternViewModel_ onUnbind( OnModelUnboundListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final CustomPackageLayoutPatternView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public CustomPackageLayoutPatternViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final CustomPackageLayoutPatternView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public CustomPackageLayoutPatternViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<CustomPackageLayoutPatternViewModel_, CustomPackageLayoutPatternView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public CustomPackageLayoutPatternViewModel_ id(long id) { super.id(id); return this; } @Override public CustomPackageLayoutPatternViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public CustomPackageLayoutPatternViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public CustomPackageLayoutPatternViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public CustomPackageLayoutPatternViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public CustomPackageLayoutPatternViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public CustomPackageLayoutPatternViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public CustomPackageLayoutPatternViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public CustomPackageLayoutPatternViewModel_ show() { super.show(); return this; } @Override public CustomPackageLayoutPatternViewModel_ show(boolean show) { super.show(show); return this; } @Override public CustomPackageLayoutPatternViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.hello_custom_package_layout_pattern_view_me; } @Override public CustomPackageLayoutPatternViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof CustomPackageLayoutPatternViewModel_)) { return false; } if (!super.equals(o)) { return false; } CustomPackageLayoutPatternViewModel_ that = (CustomPackageLayoutPatternViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "CustomPackageLayoutPatternViewModel_{" + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,501
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityChangedView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityChangedView extends View { public OnVisibilityChangedView(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityChanged void onVisibilityChanged1(float ph, float pw, int vh, int vw) { // also testing package private works } @OnVisibilityChanged public void onVisibilityChanged2(float ph, float pw, int vh, int vw) { } }
8,502
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithoutSetter.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithoutSetter extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @Override protected int getDefaultLayout() { return 0; } public int getValueInt() { return valueInt; } }
8,503
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestCallbackPropViewModel_.java
package com.airbnb.epoxy; import android.view.View; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class TestCallbackPropViewModel_ extends EpoxyModel<TestCallbackPropView> implements GeneratedModel<TestCallbackPropView>, TestCallbackPropViewModelBuilder { private OnModelBoundListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Nullable private View.OnClickListener listener_OnClickListener = (View.OnClickListener) null; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestCallbackPropView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestCallbackPropView object) { super.bind(object); object.setListener(listener_OnClickListener); } @Override public void bind(final TestCallbackPropView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestCallbackPropViewModel_)) { bind(object); return; } TestCallbackPropViewModel_ that = (TestCallbackPropViewModel_) previousModel; super.bind(object); if (((listener_OnClickListener == null) != (that.listener_OnClickListener == null))) { object.setListener(listener_OnClickListener); } } @Override public void handlePostBind(final TestCallbackPropView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestCallbackPropViewModel_ onBind( OnModelBoundListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestCallbackPropView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.setListener((View.OnClickListener) null); } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestCallbackPropViewModel_ onUnbind( OnModelUnboundListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestCallbackPropView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestCallbackPropViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestCallbackPropView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestCallbackPropViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set */ public TestCallbackPropViewModel_ listener( @Nullable final OnModelClickListener<TestCallbackPropViewModel_, TestCallbackPropView> listener) { onMutation(); if (listener == null) { this.listener_OnClickListener = null; } else { this.listener_OnClickListener = new WrappedEpoxyModelClickListener<>(listener); } return this; } /** * <i>Optional</i>: Default value is (View.OnClickListener) null * * @see TestCallbackPropView#setListener(View.OnClickListener) */ public TestCallbackPropViewModel_ listener(@Nullable View.OnClickListener listener) { onMutation(); this.listener_OnClickListener = listener; return this; } @Nullable public View.OnClickListener listener() { return listener_OnClickListener; } @Override public TestCallbackPropViewModel_ id(long id) { super.id(id); return this; } @Override public TestCallbackPropViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestCallbackPropViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestCallbackPropViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestCallbackPropViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestCallbackPropViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestCallbackPropViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public TestCallbackPropViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestCallbackPropViewModel_ show() { super.show(); return this; } @Override public TestCallbackPropViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestCallbackPropViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TestCallbackPropViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.listener_OnClickListener = (View.OnClickListener) null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestCallbackPropViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestCallbackPropViewModel_ that = (TestCallbackPropViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if (((listener_OnClickListener == null) != (that.listener_OnClickListener == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (listener_OnClickListener != null ? 1 : 0); return _result; } @Override public String toString() { return "TestCallbackPropViewModel_{" + "listener_OnClickListener=" + listener_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,504
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GridSpanCountViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class GridSpanCountViewModel_ extends EpoxyModel<GridSpanCountView> implements GeneratedModel<GridSpanCountView>, GridSpanCountViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<GridSpanCountViewModel_, GridSpanCountView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GridSpanCountViewModel_, GridSpanCountView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GridSpanCountViewModel_, GridSpanCountView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GridSpanCountViewModel_, GridSpanCountView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String clickListener_String; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setClickListener"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final GridSpanCountView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final GridSpanCountView object) { super.bind(object); object.setClickListener(clickListener_String); } @Override public void bind(final GridSpanCountView object, EpoxyModel previousModel) { if (!(previousModel instanceof GridSpanCountViewModel_)) { bind(object); return; } GridSpanCountViewModel_ that = (GridSpanCountViewModel_) previousModel; super.bind(object); if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { object.setClickListener(clickListener_String); } } @Override public void handlePostBind(final GridSpanCountView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GridSpanCountViewModel_ onBind( OnModelBoundListener<GridSpanCountViewModel_, GridSpanCountView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(GridSpanCountView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GridSpanCountViewModel_ onUnbind( OnModelUnboundListener<GridSpanCountViewModel_, GridSpanCountView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final GridSpanCountView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GridSpanCountViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GridSpanCountViewModel_, GridSpanCountView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final GridSpanCountView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GridSpanCountViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<GridSpanCountViewModel_, GridSpanCountView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see GridSpanCountView#setClickListener(String) */ public GridSpanCountViewModel_ clickListener(@NonNull String clickListener) { if (clickListener == null) { throw new IllegalArgumentException("clickListener cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.clickListener_String = clickListener; return this; } @NonNull public String clickListener() { return clickListener_String; } @Override public GridSpanCountViewModel_ id(long id) { super.id(id); return this; } @Override public GridSpanCountViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GridSpanCountViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GridSpanCountViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GridSpanCountViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GridSpanCountViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GridSpanCountViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GridSpanCountViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GridSpanCountViewModel_ show() { super.show(); return this; } @Override public GridSpanCountViewModel_ show(boolean show) { super.show(show); return this; } @Override public GridSpanCountViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GridSpanCountViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.clickListener_String = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GridSpanCountViewModel_)) { return false; } if (!super.equals(o)) { return false; } GridSpanCountViewModel_ that = (GridSpanCountViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0); return _result; } @Override public String toString() { return "GridSpanCountViewModel_{" + "clickListener_String=" + clickListener_String + "}" + super.toString(); } }
8,505
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestNullStringOverloadsViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import androidx.annotation.PluralsRes; import androidx.annotation.StringRes; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class TestNullStringOverloadsViewModel_ extends EpoxyModel<TestNullStringOverloadsView> implements GeneratedModel<TestNullStringOverloadsView>, TestNullStringOverloadsViewModelBuilder { private OnModelBoundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> onModelVisibilityChangedListener_epoxyGeneratedModel; private StringAttributeData title_StringAttributeData = new StringAttributeData((CharSequence) null); @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestNullStringOverloadsView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestNullStringOverloadsView object) { super.bind(object); object.setTitle(title_StringAttributeData.toString(object.getContext())); } @Override public void bind(final TestNullStringOverloadsView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestNullStringOverloadsViewModel_)) { bind(object); return; } TestNullStringOverloadsViewModel_ that = (TestNullStringOverloadsViewModel_) previousModel; super.bind(object); if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { object.setTitle(title_StringAttributeData.toString(object.getContext())); } } @Override public void handlePostBind(final TestNullStringOverloadsView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestNullStringOverloadsViewModel_ onBind( OnModelBoundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestNullStringOverloadsView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestNullStringOverloadsViewModel_ onUnbind( OnModelUnboundListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestNullStringOverloadsView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestNullStringOverloadsViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestNullStringOverloadsView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestNullStringOverloadsViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestNullStringOverloadsViewModel_, TestNullStringOverloadsView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Nullable public CharSequence getTitle(Context context) { return title_StringAttributeData.toString(context); } /** * <i>Optional</i>: Default value is (CharSequence) null * * @see TestNullStringOverloadsView#setTitle(CharSequence) */ public TestNullStringOverloadsViewModel_ title(@Nullable CharSequence title) { onMutation(); title_StringAttributeData.setValue(title); return this; } /** * If a value of 0 is set then this attribute will revert to its default value. * <p> * <i>Optional</i>: Default value is (CharSequence) null * * @see TestNullStringOverloadsView#setTitle(CharSequence) */ public TestNullStringOverloadsViewModel_ title(@StringRes int stringRes) { onMutation(); title_StringAttributeData.setValue(stringRes); return this; } /** * If a value of 0 is set then this attribute will revert to its default value. * <p> * <i>Optional</i>: Default value is (CharSequence) null * * @see TestNullStringOverloadsView#setTitle(CharSequence) */ public TestNullStringOverloadsViewModel_ title(@StringRes int stringRes, Object... formatArgs) { onMutation(); title_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * If a value of 0 is set then this attribute will revert to its default value. * <p> * <i>Optional</i>: Default value is (CharSequence) null * * @see TestNullStringOverloadsView#setTitle(CharSequence) */ public TestNullStringOverloadsViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); title_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TestNullStringOverloadsViewModel_ id(long id) { super.id(id); return this; } @Override public TestNullStringOverloadsViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestNullStringOverloadsViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestNullStringOverloadsViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestNullStringOverloadsViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestNullStringOverloadsViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestNullStringOverloadsViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public TestNullStringOverloadsViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestNullStringOverloadsViewModel_ show() { super.show(); return this; } @Override public TestNullStringOverloadsViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestNullStringOverloadsViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TestNullStringOverloadsViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.title_StringAttributeData = new StringAttributeData((CharSequence) null); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestNullStringOverloadsViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestNullStringOverloadsViewModel_ that = (TestNullStringOverloadsViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TestNullStringOverloadsViewModel_{" + "title_StringAttributeData=" + title_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,506
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropGenerateStringOverloadsOptionView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.AfterPropsSet; import com.airbnb.epoxy.ModelProp; import com.airbnb.epoxy.ModelProp.Option; import com.airbnb.epoxy.ModelView; @ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT) public class TestFieldPropGenerateStringOverloadsOptionView extends View { @ModelProp(options = Option.GenerateStringOverloads) CharSequence value; public TestFieldPropGenerateStringOverloadsOptionView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,507
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DataBindingConfig.java
package com.airbnb.epoxy; @EpoxyDataBindingLayouts({R.layout.model_with_data_binding}) interface EpoxyDataBindingConfig {}
8,508
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnViewRecycledViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class OnViewRecycledViewModel_ extends EpoxyModel<OnViewRecycledView> implements GeneratedModel<OnViewRecycledView>, OnViewRecycledViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private CharSequence title_CharSequence; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setTitle"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final OnViewRecycledView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final OnViewRecycledView object) { super.bind(object); object.setTitle(title_CharSequence); } @Override public void bind(final OnViewRecycledView object, EpoxyModel previousModel) { if (!(previousModel instanceof OnViewRecycledViewModel_)) { bind(object); return; } OnViewRecycledViewModel_ that = (OnViewRecycledViewModel_) previousModel; super.bind(object); if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) { object.setTitle(title_CharSequence); } } @Override public void handlePostBind(final OnViewRecycledView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public OnViewRecycledViewModel_ onBind( OnModelBoundListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(OnViewRecycledView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.onRecycled1(); object.onRecycled2(); } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public OnViewRecycledViewModel_ onUnbind( OnModelUnboundListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final OnViewRecycledView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public OnViewRecycledViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final OnViewRecycledView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public OnViewRecycledViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<OnViewRecycledViewModel_, OnViewRecycledView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see OnViewRecycledView#setTitle(CharSequence) */ public OnViewRecycledViewModel_ title(@NonNull CharSequence title) { if (title == null) { throw new IllegalArgumentException("title cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.title_CharSequence = title; return this; } @NonNull public CharSequence title() { return title_CharSequence; } @Override public OnViewRecycledViewModel_ id(long id) { super.id(id); return this; } @Override public OnViewRecycledViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public OnViewRecycledViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public OnViewRecycledViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public OnViewRecycledViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public OnViewRecycledViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public OnViewRecycledViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public OnViewRecycledViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public OnViewRecycledViewModel_ show() { super.show(); return this; } @Override public OnViewRecycledViewModel_ show(boolean show) { super.show(show); return this; } @Override public OnViewRecycledViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public OnViewRecycledViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.title_CharSequence = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof OnViewRecycledViewModel_)) { return false; } if (!super.equals(o)) { return false; } OnViewRecycledViewModel_ that = (OnViewRecycledViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (title_CharSequence != null ? title_CharSequence.hashCode() : 0); return _result; } @Override public String toString() { return "OnViewRecycledViewModel_{" + "title_CharSequence=" + title_CharSequence + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,509
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithFieldAnnotation.java
package com.airbnb.epoxy; import androidx.annotation.Nullable; public class ModelWithFieldAnnotation extends EpoxyModel<Object> { @EpoxyAttribute @Nullable String title; @Override protected int getDefaultLayout() { return 0; } }
8,510
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/NullOnRecycleView_throwsIfNotNullable.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; import com.airbnb.epoxy.ModelProp.Option; @ModelView(defaultLayout = 1) public class NullOnRecycleView_throwsIfNotNullable extends View { public NullOnRecycleView_throwsIfNotNullable(Context context) { super(context); } @ModelProp(options = Option.NullOnRecycle) public void setTitle(CharSequence title) { } }
8,511
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotation.java
package com.airbnb.epoxy; @EpoxyModelClass @Deprecated public class ModelWithAnnotation extends EpoxyModel<Object> { @Override protected int getDefaultLayout() { return 0; } }
8,512
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAllFieldTypes_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.Boolean; import java.lang.Byte; import java.lang.CharSequence; import java.lang.Character; import java.lang.Double; import java.lang.Float; import java.lang.Integer; import java.lang.Long; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.Short; import java.lang.String; import java.util.Arrays; import java.util.List; /** * Generated file. Do not modify! */ public class ModelWithAllFieldTypes_ extends ModelWithAllFieldTypes implements GeneratedModel<Object>, ModelWithAllFieldTypesBuilder { private OnModelBoundListener<ModelWithAllFieldTypes_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAllFieldTypes_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAllFieldTypes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAllFieldTypes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAllFieldTypes_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithAllFieldTypes_ onBind( OnModelBoundListener<ModelWithAllFieldTypes_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithAllFieldTypes_ onUnbind( OnModelUnboundListener<ModelWithAllFieldTypes_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithAllFieldTypes_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAllFieldTypes_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithAllFieldTypes_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAllFieldTypes_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithAllFieldTypes_ valueInt(int valueInt) { onMutation(); super.valueInt = valueInt; return this; } public int valueInt() { return valueInt; } public ModelWithAllFieldTypes_ valueInteger(Integer valueInteger) { onMutation(); super.valueInteger = valueInteger; return this; } public Integer valueInteger() { return valueInteger; } public ModelWithAllFieldTypes_ valueShort(short valueShort) { onMutation(); super.valueShort = valueShort; return this; } public short valueShort() { return valueShort; } public ModelWithAllFieldTypes_ valueShortWrapper(Short valueShortWrapper) { onMutation(); super.valueShortWrapper = valueShortWrapper; return this; } public Short valueShortWrapper() { return valueShortWrapper; } public ModelWithAllFieldTypes_ valueChar(char valueChar) { onMutation(); super.valueChar = valueChar; return this; } public char valueChar() { return valueChar; } public ModelWithAllFieldTypes_ valueCharacter(Character valueCharacter) { onMutation(); super.valueCharacter = valueCharacter; return this; } public Character valueCharacter() { return valueCharacter; } public ModelWithAllFieldTypes_ valuebByte(byte valuebByte) { onMutation(); super.valuebByte = valuebByte; return this; } public byte valuebByte() { return valuebByte; } public ModelWithAllFieldTypes_ valueByteWrapper(Byte valueByteWrapper) { onMutation(); super.valueByteWrapper = valueByteWrapper; return this; } public Byte valueByteWrapper() { return valueByteWrapper; } public ModelWithAllFieldTypes_ valueLong(long valueLong) { onMutation(); super.valueLong = valueLong; return this; } public long valueLong() { return valueLong; } public ModelWithAllFieldTypes_ valueLongWrapper(Long valueLongWrapper) { onMutation(); super.valueLongWrapper = valueLongWrapper; return this; } public Long valueLongWrapper() { return valueLongWrapper; } public ModelWithAllFieldTypes_ valueDouble(double valueDouble) { onMutation(); super.valueDouble = valueDouble; return this; } public double valueDouble() { return valueDouble; } public ModelWithAllFieldTypes_ valueDoubleWrapper(Double valueDoubleWrapper) { onMutation(); super.valueDoubleWrapper = valueDoubleWrapper; return this; } public Double valueDoubleWrapper() { return valueDoubleWrapper; } public ModelWithAllFieldTypes_ valueFloat(float valueFloat) { onMutation(); super.valueFloat = valueFloat; return this; } public float valueFloat() { return valueFloat; } public ModelWithAllFieldTypes_ valueFloatWrapper(Float valueFloatWrapper) { onMutation(); super.valueFloatWrapper = valueFloatWrapper; return this; } public Float valueFloatWrapper() { return valueFloatWrapper; } public ModelWithAllFieldTypes_ valueBoolean(boolean valueBoolean) { onMutation(); super.valueBoolean = valueBoolean; return this; } public boolean valueBoolean() { return valueBoolean; } public ModelWithAllFieldTypes_ valueBooleanWrapper(Boolean valueBooleanWrapper) { onMutation(); super.valueBooleanWrapper = valueBooleanWrapper; return this; } public Boolean valueBooleanWrapper() { return valueBooleanWrapper; } public ModelWithAllFieldTypes_ valueIntArray(int[] valueIntArray) { onMutation(); super.valueIntArray = valueIntArray; return this; } public int[] valueIntArray() { return valueIntArray; } public ModelWithAllFieldTypes_ valueObjectArray(Object[] valueObjectArray) { onMutation(); super.valueObjectArray = valueObjectArray; return this; } public Object[] valueObjectArray() { return valueObjectArray; } public ModelWithAllFieldTypes_ valueString(String valueString) { onMutation(); super.valueString = valueString; return this; } public String valueString() { return valueString; } public ModelWithAllFieldTypes_ valueObject(Object valueObject) { onMutation(); super.valueObject = valueObject; return this; } public Object valueObject() { return valueObject; } public ModelWithAllFieldTypes_ valueList(List<String> valueList) { onMutation(); super.valueList = valueList; return this; } public List<String> valueList() { return valueList; } @Override public ModelWithAllFieldTypes_ id(long id) { super.id(id); return this; } @Override public ModelWithAllFieldTypes_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithAllFieldTypes_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithAllFieldTypes_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithAllFieldTypes_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithAllFieldTypes_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithAllFieldTypes_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithAllFieldTypes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithAllFieldTypes_ show() { super.show(); return this; } @Override public ModelWithAllFieldTypes_ show(boolean show) { super.show(show); return this; } @Override public ModelWithAllFieldTypes_ hide() { super.hide(); return this; } @Override public ModelWithAllFieldTypes_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.valueInt = 0; super.valueInteger = null; super.valueShort = (short) 0; super.valueShortWrapper = null; super.valueChar = (char) 0; super.valueCharacter = null; super.valuebByte = (byte) 0; super.valueByteWrapper = null; super.valueLong = 0L; super.valueLongWrapper = null; super.valueDouble = 0.0d; super.valueDoubleWrapper = null; super.valueFloat = 0.0f; super.valueFloatWrapper = null; super.valueBoolean = false; super.valueBooleanWrapper = null; super.valueIntArray = null; super.valueObjectArray = null; super.valueString = null; super.valueObject = null; super.valueList = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithAllFieldTypes_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAllFieldTypes_ that = (ModelWithAllFieldTypes_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((valueInt != that.valueInt)) { return false; } if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) { return false; } if ((valueShort != that.valueShort)) { return false; } if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) { return false; } if ((valueChar != that.valueChar)) { return false; } if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) { return false; } if ((valuebByte != that.valuebByte)) { return false; } if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) { return false; } if ((valueLong != that.valueLong)) { return false; } if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) { return false; } if ((Double.compare(that.valueDouble, valueDouble) != 0)) { return false; } if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) { return false; } if ((Float.compare(that.valueFloat, valueFloat) != 0)) { return false; } if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) { return false; } if ((valueBoolean != that.valueBoolean)) { return false; } if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) { return false; } if (!Arrays.equals(valueIntArray, that.valueIntArray)) { return false; } if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) { return false; } if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) { return false; } if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) { return false; } if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); long temp; _result = 31 * _result + valueInt; _result = 31 * _result + (valueInteger != null ? valueInteger.hashCode() : 0); _result = 31 * _result + valueShort; _result = 31 * _result + (valueShortWrapper != null ? valueShortWrapper.hashCode() : 0); _result = 31 * _result + valueChar; _result = 31 * _result + (valueCharacter != null ? valueCharacter.hashCode() : 0); _result = 31 * _result + valuebByte; _result = 31 * _result + (valueByteWrapper != null ? valueByteWrapper.hashCode() : 0); _result = 31 * _result + (int) (valueLong ^ (valueLong >>> 32)); _result = 31 * _result + (valueLongWrapper != null ? valueLongWrapper.hashCode() : 0); temp = Double.doubleToLongBits(valueDouble); _result = 31 * _result + (int) (temp ^ (temp >>> 32)); _result = 31 * _result + (valueDoubleWrapper != null ? valueDoubleWrapper.hashCode() : 0); _result = 31 * _result + (valueFloat != +0.0f ? Float.floatToIntBits(valueFloat) : 0); _result = 31 * _result + (valueFloatWrapper != null ? valueFloatWrapper.hashCode() : 0); _result = 31 * _result + (valueBoolean ? 1 : 0); _result = 31 * _result + (valueBooleanWrapper != null ? valueBooleanWrapper.hashCode() : 0); _result = 31 * _result + Arrays.hashCode(valueIntArray); _result = 31 * _result + Arrays.hashCode(valueObjectArray); _result = 31 * _result + (valueString != null ? valueString.hashCode() : 0); _result = 31 * _result + (valueObject != null ? valueObject.hashCode() : 0); _result = 31 * _result + (valueList != null ? valueList.hashCode() : 0); return _result; } @Override public String toString() { return "ModelWithAllFieldTypes_{" + "valueInt=" + valueInt + ", valueInteger=" + valueInteger + ", valueShort=" + valueShort + ", valueShortWrapper=" + valueShortWrapper + ", valueChar=" + valueChar + ", valueCharacter=" + valueCharacter + ", valuebByte=" + valuebByte + ", valueByteWrapper=" + valueByteWrapper + ", valueLong=" + valueLong + ", valueLongWrapper=" + valueLongWrapper + ", valueDouble=" + valueDouble + ", valueDoubleWrapper=" + valueDoubleWrapper + ", valueFloat=" + valueFloat + ", valueFloatWrapper=" + valueFloatWrapper + ", valueBoolean=" + valueBoolean + ", valueBooleanWrapper=" + valueBooleanWrapper + ", valueIntArray=" + valueIntArray + ", valueObjectArray=" + valueObjectArray + ", valueString=" + valueString + ", valueObject=" + valueObject + ", valueList=" + valueList + "}" + super.toString(); } }
8,513
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelReturningClassTypeWithVarargs.java
package com.airbnb.epoxy; public class ModelReturningClassTypeWithVarargs extends EpoxyModel<Object> { @EpoxyAttribute int value; @Override protected int getDefaultLayout() { return 0; } public ModelReturningClassTypeWithVarargs classType(String... varargs) { return this; } public ModelReturningClassTypeWithVarargs classType(String first, String... varargs) { return this; } }
8,514
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelConfigRequireHashCodeCharSequencePasses.java
package com.airbnb.epoxy; public class ModelConfigRequireHashCodeCharSequencePasses extends EpoxyModel<Object> { @EpoxyAttribute CharSequence charSequence; @Override protected int getDefaultLayout() { return 0; } }
8,515
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelConfigRequireHashCodeInterfaceWithHashCodePasses.java
package com.airbnb.epoxy; public class ModelConfigRequireHashCodeInterfaceWithHashCodePasses extends EpoxyModel<Object> { interface MyInterface { int hashCode(); } @EpoxyAttribute MyInterface myInterfaceImplementation; @Override protected int getDefaultLayout() { return 0; } }
8,516
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerWithAutoModelAndImplicitAdding.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.AutoModel; import com.airbnb.epoxy.BasicModelWithAttribute_; import com.airbnb.epoxy.EpoxyController; public class ControllerWithAutoModelAndImplicitAdding extends EpoxyController { @AutoModel BasicModelWithAttribute_ modelWithAttribute1; @AutoModel BasicModelWithAttribute_ modelWithAttribute2; @Override protected void buildModels() { } }
8,517
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithGetterWithParams.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithGetterWithParams extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @Override protected int getDefaultLayout() { return 0; } public int getValueInt(int param) { return valueInt; } public void setValueInt(int valueInt) { this.valueInt = valueInt; } }
8,518
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithoutHash.java
package com.airbnb.epoxy; public class ModelWithoutHash extends EpoxyModel<Object> { @EpoxyAttribute int value; @EpoxyAttribute(hash = false) int value2; @EpoxyAttribute(hash = false) String value3; @Override protected int getDefaultLayout() { return 0; } }
8,519
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithStaticGetter.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithStaticGetter extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @Override protected int getDefaultLayout() { return 0; } public static int getValueInt() { return 0; } public void setValueInt(int valueInt) { this.valueInt = valueInt; } }
8,520
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/Prop_throwsIfNoParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class Prop_throwsIfNoParams extends View { public Prop_throwsIfNoParams(Context context) { super(context); } @ModelProp public void setTitle() { } }
8,521
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/EpoxyModelGroupWithAnnotations.java
package com.airbnb.epoxy; import java.util.Collection; @EpoxyModelClass public class EpoxyModelGroupWithAnnotations extends EpoxyModelGroup { public EpoxyModelGroupWithAnnotations(int layoutRes, Collection<? extends EpoxyModel<?>> models) { super(layoutRes, models); } @EpoxyAttribute int value; }
8,522
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName extends EpoxyModel<Object> { @EpoxyAttribute private boolean isValue; @Override protected int getDefaultLayout() { return 0; } public boolean isValue() { return isValue; } public void setValue(boolean isValue) { this.isValue = isValue; } }
8,523
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/PropDefaultsView_throwsForWrongType.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class PropDefaultsView_throwsForWrongType extends View { static final String PRIMITIVE_DEFAULT = 23; public PropDefaultsView_throwsForWrongType(Context context) { super(context); } @ModelProp(defaultValue = "PRIMITIVE_DEFAULT") public void primitiveWithExplicitDefault(int title) { } }
8,524
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithoutSetter_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelWithoutSetter_ extends ModelWithoutSetter implements GeneratedModel<Object>, ModelWithoutSetterBuilder { private OnModelBoundListener<ModelWithoutSetter_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithoutSetter_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithoutSetter_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithoutSetter_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithoutSetter_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithoutSetter_ onBind(OnModelBoundListener<ModelWithoutSetter_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithoutSetter_ onUnbind( OnModelUnboundListener<ModelWithoutSetter_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithoutSetter_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithoutSetter_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithoutSetter_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithoutSetter_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public int value() { return value; } @Override public ModelWithoutSetter_ id(long id) { super.id(id); return this; } @Override public ModelWithoutSetter_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithoutSetter_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithoutSetter_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithoutSetter_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithoutSetter_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithoutSetter_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithoutSetter_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithoutSetter_ show() { super.show(); return this; } @Override public ModelWithoutSetter_ show(boolean show) { super.show(show); return this; } @Override public ModelWithoutSetter_ hide() { super.hide(); return this; } @Override public ModelWithoutSetter_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithoutSetter_)) { return false; } if (!super.equals(o)) { return false; } ModelWithoutSetter_ that = (ModelWithoutSetter_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value != that.value)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value; return _result; } @Override public String toString() { return "ModelWithoutSetter_{" + "value=" + value + "}" + super.toString(); } }
8,525
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DataBindingModelWithAllFieldTypesNoValidation_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import androidx.databinding.ViewDataBinding; import java.lang.Boolean; import java.lang.Byte; import java.lang.CharSequence; import java.lang.Character; import java.lang.Double; import java.lang.Float; import java.lang.Integer; import java.lang.Long; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.Short; import java.lang.String; import java.util.Arrays; import java.util.List; /** * Generated file. Do not modify! */ public class DataBindingModelWithAllFieldTypesNoValidation_ extends DataBindingModelWithAllFieldTypesNoValidation implements GeneratedModel<DataBindingEpoxyModel.DataBindingHolder>, DataBindingModelWithAllFieldTypesNoValidationBuilder { private OnModelBoundListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityChangedListener_epoxyGeneratedModel; public DataBindingModelWithAllFieldTypesNoValidation_() { super(); } @Override public void handlePreBind(final EpoxyViewHolder holder, final DataBindingEpoxyModel.DataBindingHolder object, final int position) { } @Override public void handlePostBind(final DataBindingEpoxyModel.DataBindingHolder object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public DataBindingModelWithAllFieldTypesNoValidation_ onBind( OnModelBoundListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(DataBindingEpoxyModel.DataBindingHolder object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public DataBindingModelWithAllFieldTypesNoValidation_ onUnbind( OnModelUnboundListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final DataBindingEpoxyModel.DataBindingHolder object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public DataBindingModelWithAllFieldTypesNoValidation_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final DataBindingEpoxyModel.DataBindingHolder object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public DataBindingModelWithAllFieldTypesNoValidation_ onVisibilityChanged( OnModelVisibilityChangedListener<DataBindingModelWithAllFieldTypesNoValidation_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public DataBindingModelWithAllFieldTypesNoValidation_ valueInt(int valueInt) { onMutation(); super.valueInt = valueInt; return this; } public int valueInt() { return valueInt; } public DataBindingModelWithAllFieldTypesNoValidation_ valueInteger(Integer valueInteger) { onMutation(); super.valueInteger = valueInteger; return this; } public Integer valueInteger() { return valueInteger; } public DataBindingModelWithAllFieldTypesNoValidation_ valueShort(short valueShort) { onMutation(); super.valueShort = valueShort; return this; } public short valueShort() { return valueShort; } public DataBindingModelWithAllFieldTypesNoValidation_ valueShortWrapper(Short valueShortWrapper) { onMutation(); super.valueShortWrapper = valueShortWrapper; return this; } public Short valueShortWrapper() { return valueShortWrapper; } public DataBindingModelWithAllFieldTypesNoValidation_ valueChar(char valueChar) { onMutation(); super.valueChar = valueChar; return this; } public char valueChar() { return valueChar; } public DataBindingModelWithAllFieldTypesNoValidation_ valueCharacter(Character valueCharacter) { onMutation(); super.valueCharacter = valueCharacter; return this; } public Character valueCharacter() { return valueCharacter; } public DataBindingModelWithAllFieldTypesNoValidation_ valuebByte(byte valuebByte) { onMutation(); super.valuebByte = valuebByte; return this; } public byte valuebByte() { return valuebByte; } public DataBindingModelWithAllFieldTypesNoValidation_ valueByteWrapper(Byte valueByteWrapper) { onMutation(); super.valueByteWrapper = valueByteWrapper; return this; } public Byte valueByteWrapper() { return valueByteWrapper; } public DataBindingModelWithAllFieldTypesNoValidation_ valueLong(long valueLong) { onMutation(); super.valueLong = valueLong; return this; } public long valueLong() { return valueLong; } public DataBindingModelWithAllFieldTypesNoValidation_ valueLongWrapper(Long valueLongWrapper) { onMutation(); super.valueLongWrapper = valueLongWrapper; return this; } public Long valueLongWrapper() { return valueLongWrapper; } public DataBindingModelWithAllFieldTypesNoValidation_ valueDouble(double valueDouble) { onMutation(); super.valueDouble = valueDouble; return this; } public double valueDouble() { return valueDouble; } public DataBindingModelWithAllFieldTypesNoValidation_ valueDoubleWrapper( Double valueDoubleWrapper) { onMutation(); super.valueDoubleWrapper = valueDoubleWrapper; return this; } public Double valueDoubleWrapper() { return valueDoubleWrapper; } public DataBindingModelWithAllFieldTypesNoValidation_ valueFloat(float valueFloat) { onMutation(); super.valueFloat = valueFloat; return this; } public float valueFloat() { return valueFloat; } public DataBindingModelWithAllFieldTypesNoValidation_ valueFloatWrapper(Float valueFloatWrapper) { onMutation(); super.valueFloatWrapper = valueFloatWrapper; return this; } public Float valueFloatWrapper() { return valueFloatWrapper; } public DataBindingModelWithAllFieldTypesNoValidation_ valueBoolean(boolean valueBoolean) { onMutation(); super.valueBoolean = valueBoolean; return this; } public boolean valueBoolean() { return valueBoolean; } public DataBindingModelWithAllFieldTypesNoValidation_ valueBooleanWrapper( Boolean valueBooleanWrapper) { onMutation(); super.valueBooleanWrapper = valueBooleanWrapper; return this; } public Boolean valueBooleanWrapper() { return valueBooleanWrapper; } public DataBindingModelWithAllFieldTypesNoValidation_ valueIntArray(int[] valueIntArray) { onMutation(); super.valueIntArray = valueIntArray; return this; } public int[] valueIntArray() { return valueIntArray; } public DataBindingModelWithAllFieldTypesNoValidation_ valueObjectArray( Object[] valueObjectArray) { onMutation(); super.valueObjectArray = valueObjectArray; return this; } public Object[] valueObjectArray() { return valueObjectArray; } public DataBindingModelWithAllFieldTypesNoValidation_ valueString(String valueString) { onMutation(); super.valueString = valueString; return this; } public String valueString() { return valueString; } public DataBindingModelWithAllFieldTypesNoValidation_ valueObject(Object valueObject) { onMutation(); super.valueObject = valueObject; return this; } public Object valueObject() { return valueObject; } public DataBindingModelWithAllFieldTypesNoValidation_ valueList(List<String> valueList) { onMutation(); super.valueList = valueList; return this; } public List<String> valueList() { return valueList; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ id(long id) { super.id(id); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ show() { super.show(); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ show(boolean show) { super.show(show); return this; } @Override public DataBindingModelWithAllFieldTypesNoValidation_ hide() { super.hide(); return this; } @Override protected void setDataBindingVariables(ViewDataBinding binding) { binding.setVariable(BR.valueInt, valueInt); binding.setVariable(BR.valueInteger, valueInteger); binding.setVariable(BR.valueShort, valueShort); binding.setVariable(BR.valueShortWrapper, valueShortWrapper); binding.setVariable(BR.valueChar, valueChar); binding.setVariable(BR.valueCharacter, valueCharacter); binding.setVariable(BR.valuebByte, valuebByte); binding.setVariable(BR.valueByteWrapper, valueByteWrapper); binding.setVariable(BR.valueLong, valueLong); binding.setVariable(BR.valueLongWrapper, valueLongWrapper); binding.setVariable(BR.valueDouble, valueDouble); binding.setVariable(BR.valueDoubleWrapper, valueDoubleWrapper); binding.setVariable(BR.valueFloat, valueFloat); binding.setVariable(BR.valueFloatWrapper, valueFloatWrapper); binding.setVariable(BR.valueBoolean, valueBoolean); binding.setVariable(BR.valueBooleanWrapper, valueBooleanWrapper); binding.setVariable(BR.valueIntArray, valueIntArray); binding.setVariable(BR.valueObjectArray, valueObjectArray); binding.setVariable(BR.valueString, valueString); binding.setVariable(BR.valueObject, valueObject); binding.setVariable(BR.valueList, valueList); } @Override protected void setDataBindingVariables(ViewDataBinding binding, EpoxyModel previousModel) { if (!(previousModel instanceof DataBindingModelWithAllFieldTypesNoValidation_)) { setDataBindingVariables(binding); return; } DataBindingModelWithAllFieldTypesNoValidation_ that = (DataBindingModelWithAllFieldTypesNoValidation_) previousModel; if ((valueInt != that.valueInt)) { binding.setVariable(BR.valueInt, valueInt); } if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) { binding.setVariable(BR.valueInteger, valueInteger); } if ((valueShort != that.valueShort)) { binding.setVariable(BR.valueShort, valueShort); } if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) { binding.setVariable(BR.valueShortWrapper, valueShortWrapper); } if ((valueChar != that.valueChar)) { binding.setVariable(BR.valueChar, valueChar); } if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) { binding.setVariable(BR.valueCharacter, valueCharacter); } if ((valuebByte != that.valuebByte)) { binding.setVariable(BR.valuebByte, valuebByte); } if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) { binding.setVariable(BR.valueByteWrapper, valueByteWrapper); } if ((valueLong != that.valueLong)) { binding.setVariable(BR.valueLong, valueLong); } if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) { binding.setVariable(BR.valueLongWrapper, valueLongWrapper); } if ((Double.compare(that.valueDouble, valueDouble) != 0)) { binding.setVariable(BR.valueDouble, valueDouble); } if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) { binding.setVariable(BR.valueDoubleWrapper, valueDoubleWrapper); } if ((Float.compare(that.valueFloat, valueFloat) != 0)) { binding.setVariable(BR.valueFloat, valueFloat); } if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) { binding.setVariable(BR.valueFloatWrapper, valueFloatWrapper); } if ((valueBoolean != that.valueBoolean)) { binding.setVariable(BR.valueBoolean, valueBoolean); } if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) { binding.setVariable(BR.valueBooleanWrapper, valueBooleanWrapper); } if (!Arrays.equals(valueIntArray, that.valueIntArray)) { binding.setVariable(BR.valueIntArray, valueIntArray); } if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) { binding.setVariable(BR.valueObjectArray, valueObjectArray); } if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) { binding.setVariable(BR.valueString, valueString); } if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) { binding.setVariable(BR.valueObject, valueObject); } if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) { binding.setVariable(BR.valueList, valueList); } } @Override public DataBindingModelWithAllFieldTypesNoValidation_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.valueInt = 0; super.valueInteger = null; super.valueShort = (short) 0; super.valueShortWrapper = null; super.valueChar = (char) 0; super.valueCharacter = null; super.valuebByte = (byte) 0; super.valueByteWrapper = null; super.valueLong = 0L; super.valueLongWrapper = null; super.valueDouble = 0.0d; super.valueDoubleWrapper = null; super.valueFloat = 0.0f; super.valueFloatWrapper = null; super.valueBoolean = false; super.valueBooleanWrapper = null; super.valueIntArray = null; super.valueObjectArray = null; super.valueString = null; super.valueObject = null; super.valueList = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof DataBindingModelWithAllFieldTypesNoValidation_)) { return false; } if (!super.equals(o)) { return false; } DataBindingModelWithAllFieldTypesNoValidation_ that = (DataBindingModelWithAllFieldTypesNoValidation_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((valueInt != that.valueInt)) { return false; } if ((valueInteger != null ? !valueInteger.equals(that.valueInteger) : that.valueInteger != null)) { return false; } if ((valueShort != that.valueShort)) { return false; } if ((valueShortWrapper != null ? !valueShortWrapper.equals(that.valueShortWrapper) : that.valueShortWrapper != null)) { return false; } if ((valueChar != that.valueChar)) { return false; } if ((valueCharacter != null ? !valueCharacter.equals(that.valueCharacter) : that.valueCharacter != null)) { return false; } if ((valuebByte != that.valuebByte)) { return false; } if ((valueByteWrapper != null ? !valueByteWrapper.equals(that.valueByteWrapper) : that.valueByteWrapper != null)) { return false; } if ((valueLong != that.valueLong)) { return false; } if ((valueLongWrapper != null ? !valueLongWrapper.equals(that.valueLongWrapper) : that.valueLongWrapper != null)) { return false; } if ((Double.compare(that.valueDouble, valueDouble) != 0)) { return false; } if ((valueDoubleWrapper != null ? !valueDoubleWrapper.equals(that.valueDoubleWrapper) : that.valueDoubleWrapper != null)) { return false; } if ((Float.compare(that.valueFloat, valueFloat) != 0)) { return false; } if ((valueFloatWrapper != null ? !valueFloatWrapper.equals(that.valueFloatWrapper) : that.valueFloatWrapper != null)) { return false; } if ((valueBoolean != that.valueBoolean)) { return false; } if ((valueBooleanWrapper != null ? !valueBooleanWrapper.equals(that.valueBooleanWrapper) : that.valueBooleanWrapper != null)) { return false; } if (!Arrays.equals(valueIntArray, that.valueIntArray)) { return false; } if (!Arrays.equals(valueObjectArray, that.valueObjectArray)) { return false; } if ((valueString != null ? !valueString.equals(that.valueString) : that.valueString != null)) { return false; } if ((valueObject != null ? !valueObject.equals(that.valueObject) : that.valueObject != null)) { return false; } if ((valueList != null ? !valueList.equals(that.valueList) : that.valueList != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); long temp; _result = 31 * _result + valueInt; _result = 31 * _result + (valueInteger != null ? valueInteger.hashCode() : 0); _result = 31 * _result + valueShort; _result = 31 * _result + (valueShortWrapper != null ? valueShortWrapper.hashCode() : 0); _result = 31 * _result + valueChar; _result = 31 * _result + (valueCharacter != null ? valueCharacter.hashCode() : 0); _result = 31 * _result + valuebByte; _result = 31 * _result + (valueByteWrapper != null ? valueByteWrapper.hashCode() : 0); _result = 31 * _result + (int) (valueLong ^ (valueLong >>> 32)); _result = 31 * _result + (valueLongWrapper != null ? valueLongWrapper.hashCode() : 0); temp = Double.doubleToLongBits(valueDouble); _result = 31 * _result + (int) (temp ^ (temp >>> 32)); _result = 31 * _result + (valueDoubleWrapper != null ? valueDoubleWrapper.hashCode() : 0); _result = 31 * _result + (valueFloat != +0.0f ? Float.floatToIntBits(valueFloat) : 0); _result = 31 * _result + (valueFloatWrapper != null ? valueFloatWrapper.hashCode() : 0); _result = 31 * _result + (valueBoolean ? 1 : 0); _result = 31 * _result + (valueBooleanWrapper != null ? valueBooleanWrapper.hashCode() : 0); _result = 31 * _result + Arrays.hashCode(valueIntArray); _result = 31 * _result + Arrays.hashCode(valueObjectArray); _result = 31 * _result + (valueString != null ? valueString.hashCode() : 0); _result = 31 * _result + (valueObject != null ? valueObject.hashCode() : 0); _result = 31 * _result + (valueList != null ? valueList.hashCode() : 0); return _result; } @Override public String toString() { return "DataBindingModelWithAllFieldTypesNoValidation_{" + "valueInt=" + valueInt + ", valueInteger=" + valueInteger + ", valueShort=" + valueShort + ", valueShortWrapper=" + valueShortWrapper + ", valueChar=" + valueChar + ", valueCharacter=" + valueCharacter + ", valuebByte=" + valuebByte + ", valueByteWrapper=" + valueByteWrapper + ", valueLong=" + valueLong + ", valueLongWrapper=" + valueLongWrapper + ", valueDouble=" + valueDouble + ", valueDoubleWrapper=" + valueDoubleWrapper + ", valueFloat=" + valueFloat + ", valueFloatWrapper=" + valueFloatWrapper + ", valueBoolean=" + valueBoolean + ", valueBooleanWrapper=" + valueBooleanWrapper + ", valueIntArray=" + valueIntArray + ", valueObjectArray=" + valueObjectArray + ", valueString=" + valueString + ", valueObject=" + valueObject + ", valueList=" + valueList + "}" + super.toString(); } }
8,526
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodParentLayout$NoLayout_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class GenerateDefaultLayoutMethodParentLayout$NoLayout_ extends GenerateDefaultLayoutMethodParentLayout.NoLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodParentLayout_NoLayoutBuilder { private OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public GenerateDefaultLayoutMethodParentLayout$NoLayout_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onBind( OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onUnbind( OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodParentLayout$NoLayout_ onVisibilityChanged( OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$NoLayout_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public GenerateDefaultLayoutMethodParentLayout$NoLayout_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(long id) { super.id(id); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ show() { super.show(); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ show(boolean show) { super.show(show); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GenerateDefaultLayoutMethodParentLayout$NoLayout_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GenerateDefaultLayoutMethodParentLayout$NoLayout_)) { return false; } if (!super.equals(o)) { return false; } GenerateDefaultLayoutMethodParentLayout$NoLayout_ that = (GenerateDefaultLayoutMethodParentLayout$NoLayout_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value != that.value)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value; return _result; } @Override public String toString() { return "GenerateDefaultLayoutMethodParentLayout$NoLayout_{" + "value=" + value + "}" + super.toString(); } }
8,527
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/SavedStateViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class SavedStateViewModel_ extends EpoxyModel<SavedStateView> implements GeneratedModel<SavedStateView>, SavedStateViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<SavedStateViewModel_, SavedStateView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<SavedStateViewModel_, SavedStateView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<SavedStateViewModel_, SavedStateView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<SavedStateViewModel_, SavedStateView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String clickListener_String; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setClickListener"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final SavedStateView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final SavedStateView object) { super.bind(object); object.setClickListener(clickListener_String); } @Override public void bind(final SavedStateView object, EpoxyModel previousModel) { if (!(previousModel instanceof SavedStateViewModel_)) { bind(object); return; } SavedStateViewModel_ that = (SavedStateViewModel_) previousModel; super.bind(object); if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { object.setClickListener(clickListener_String); } } @Override public void handlePostBind(final SavedStateView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public SavedStateViewModel_ onBind( OnModelBoundListener<SavedStateViewModel_, SavedStateView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(SavedStateView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public SavedStateViewModel_ onUnbind( OnModelUnboundListener<SavedStateViewModel_, SavedStateView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final SavedStateView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public SavedStateViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<SavedStateViewModel_, SavedStateView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final SavedStateView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public SavedStateViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<SavedStateViewModel_, SavedStateView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see SavedStateView#setClickListener(String) */ public SavedStateViewModel_ clickListener(@NonNull String clickListener) { if (clickListener == null) { throw new IllegalArgumentException("clickListener cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.clickListener_String = clickListener; return this; } @NonNull public String clickListener() { return clickListener_String; } @Override public SavedStateViewModel_ id(long id) { super.id(id); return this; } @Override public SavedStateViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public SavedStateViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public SavedStateViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public SavedStateViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public SavedStateViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public SavedStateViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public SavedStateViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public SavedStateViewModel_ show() { super.show(); return this; } @Override public SavedStateViewModel_ show(boolean show) { super.show(show); return this; } @Override public SavedStateViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public SavedStateViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.clickListener_String = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof SavedStateViewModel_)) { return false; } if (!super.equals(o)) { return false; } SavedStateViewModel_ that = (SavedStateViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (clickListener_String != null ? clickListener_String.hashCode() : 0); return _result; } @Override public String toString() { return "SavedStateViewModel_{" + "clickListener_String=" + clickListener_String + "}" + super.toString(); } @Override public boolean shouldSaveViewState() { return true; } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,528
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ObjectWithoutEqualsThrowsView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class ObjectWithoutEqualsThrowsView extends View { public ObjectWithoutEqualsThrowsView(Context context) { super(context); } @ModelProp public void setClickListener(View.OnClickListener title) { } }
8,529
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropNullOnRecycleOptionView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.AfterPropsSet; import com.airbnb.epoxy.ModelProp; import com.airbnb.epoxy.ModelProp.Option; import com.airbnb.epoxy.ModelView; import javax.annotation.Nullable; @ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT) public class TestFieldPropNullOnRecycleOptionView extends View { @ModelProp(options = {Option.NullOnRecycle, Option.IgnoreRequireHashCode}) @Nullable OnClickListener value; public TestFieldPropNullOnRecycleOptionView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,530
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityStateChangedView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityStateChangedView extends View { public OnVisibilityStateChangedView(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityStateChanged void onVisibilityStateChanged1(int s) { // also testing package private works } @OnVisibilityStateChanged public void onVisibilityStateChanged2(int s) { } }
8,531
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/NullOnRecycleViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class NullOnRecycleViewModel_ extends EpoxyModel<NullOnRecycleView> implements GeneratedModel<NullOnRecycleView>, NullOnRecycleViewModelBuilder { private OnModelBoundListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Nullable private CharSequence title_CharSequence = (CharSequence) null; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final NullOnRecycleView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final NullOnRecycleView object) { super.bind(object); object.setTitle(title_CharSequence); } @Override public void bind(final NullOnRecycleView object, EpoxyModel previousModel) { if (!(previousModel instanceof NullOnRecycleViewModel_)) { bind(object); return; } NullOnRecycleViewModel_ that = (NullOnRecycleViewModel_) previousModel; super.bind(object); if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) { object.setTitle(title_CharSequence); } } @Override public void handlePostBind(final NullOnRecycleView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public NullOnRecycleViewModel_ onBind( OnModelBoundListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(NullOnRecycleView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.setTitle((CharSequence) null); } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public NullOnRecycleViewModel_ onUnbind( OnModelUnboundListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final NullOnRecycleView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public NullOnRecycleViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final NullOnRecycleView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public NullOnRecycleViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<NullOnRecycleViewModel_, NullOnRecycleView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is (CharSequence) null * * @see NullOnRecycleView#setTitle(CharSequence) */ public NullOnRecycleViewModel_ title(@Nullable CharSequence title) { onMutation(); this.title_CharSequence = title; return this; } @Nullable public CharSequence title() { return title_CharSequence; } @Override public NullOnRecycleViewModel_ id(long id) { super.id(id); return this; } @Override public NullOnRecycleViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public NullOnRecycleViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public NullOnRecycleViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public NullOnRecycleViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public NullOnRecycleViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public NullOnRecycleViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public NullOnRecycleViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public NullOnRecycleViewModel_ show() { super.show(); return this; } @Override public NullOnRecycleViewModel_ show(boolean show) { super.show(show); return this; } @Override public NullOnRecycleViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public NullOnRecycleViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.title_CharSequence = (CharSequence) null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof NullOnRecycleViewModel_)) { return false; } if (!super.equals(o)) { return false; } NullOnRecycleViewModel_ that = (NullOnRecycleViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((title_CharSequence != null ? !title_CharSequence.equals(that.title_CharSequence) : that.title_CharSequence != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (title_CharSequence != null ? title_CharSequence.hashCode() : 0); return _result; } @Override public String toString() { return "NullOnRecycleViewModel_{" + "title_CharSequence=" + title_CharSequence + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,532
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelRequiresHashCodeArrayFails.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; public class ModelRequiresHashCodeArrayFails extends EpoxyModel<Object> { @EpoxyAttribute Object[] clickListener; @Override protected int getDefaultLayout() { return 0; } }
8,533
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DataBindingModelWithAllFieldTypesNoValidation.java
package com.airbnb.epoxy; import java.util.List; @EpoxyModelClass public abstract class DataBindingModelWithAllFieldTypesNoValidation extends DataBindingEpoxyModel { @EpoxyAttribute int valueInt; @EpoxyAttribute Integer valueInteger; @EpoxyAttribute short valueShort; @EpoxyAttribute Short valueShortWrapper; @EpoxyAttribute char valueChar; @EpoxyAttribute Character valueCharacter; @EpoxyAttribute byte valuebByte; @EpoxyAttribute Byte valueByteWrapper; @EpoxyAttribute long valueLong; @EpoxyAttribute Long valueLongWrapper; @EpoxyAttribute double valueDouble; @EpoxyAttribute Double valueDoubleWrapper; @EpoxyAttribute float valueFloat; @EpoxyAttribute Float valueFloatWrapper; @EpoxyAttribute boolean valueBoolean; @EpoxyAttribute Boolean valueBooleanWrapper; @EpoxyAttribute int[] valueIntArray; @EpoxyAttribute Object[] valueObjectArray; @EpoxyAttribute String valueString; @EpoxyAttribute Object valueObject; @EpoxyAttribute List<String> valueList; @Override protected int getDefaultLayout() { return 0; } }
8,534
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelPackageWithNoConfigInheritsNearestParentConfig.java
package com.airbnb.epoxy.configtest.sub.sub; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; public class ModelPackageWithNoConfigInheritsNearestParentConfig extends EpoxyModel<Object> { public static class ClassWithoutHashCode { } @EpoxyAttribute ClassWithoutHashCode classWithoutHashCode; @Override protected int getDefaultLayout() { return 0; } }
8,535
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelRequiresEqualsFailsBasicObject.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; public class ModelRequiresEqualsFailsBasicObject extends EpoxyModel<Object> { public static class ClassWithHashCodeAndNotEquals { @Override public int hashCode() { return super.hashCode(); } } @EpoxyAttribute ClassWithHashCodeAndNotEquals classWithoutHashCode; @Override protected int getDefaultLayout() { return 0; } }
8,536
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/BasicModelWithAttribute.java
package com.airbnb.epoxy; public class BasicModelWithAttribute extends EpoxyModel<Object> { @EpoxyAttribute int value; @Override protected int getDefaultLayout() { return 0; } }
8,537
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityChangedView_throwsIfInvalidParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityChangedView_throwsIfInvalidParams extends View { public OnVisibilityChangedView_throwsIfInvalidParams(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityChanged public void onVisibilityChanged(boolean ph, boolean pw, int vh, int vw) { } }
8,538
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithSuperAttributes$SubModelWithSuperAttributes_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelWithSuperAttributes$SubModelWithSuperAttributes_ extends ModelWithSuperAttributes.SubModelWithSuperAttributes implements GeneratedModel<Object>, ModelWithSuperAttributes_SubModelWithSuperAttributesBuilder { private OnModelBoundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithSuperAttributes$SubModelWithSuperAttributes_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onBind( OnModelBoundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onUnbind( OnModelUnboundListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithSuperAttributes$SubModelWithSuperAttributes_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithSuperAttributes$SubModelWithSuperAttributes_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithSuperAttributes$SubModelWithSuperAttributes_ subValue(int subValue) { onMutation(); super.subValue = subValue; return this; } public int subValue() { return subValue; } public ModelWithSuperAttributes$SubModelWithSuperAttributes_ superValue(int superValue) { onMutation(); super.superValue = superValue; return this; } public int superValue() { return superValue; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(long id) { super.id(id); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ show() { super.show(); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ show(boolean show) { super.show(show); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ hide() { super.hide(); return this; } @Override public ModelWithSuperAttributes$SubModelWithSuperAttributes_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.subValue = 0; super.superValue = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithSuperAttributes$SubModelWithSuperAttributes_)) { return false; } if (!super.equals(o)) { return false; } ModelWithSuperAttributes$SubModelWithSuperAttributes_ that = (ModelWithSuperAttributes$SubModelWithSuperAttributes_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((subValue != that.subValue)) { return false; } if ((superValue != that.superValue)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + subValue; _result = 31 * _result + superValue; return _result; } @Override public String toString() { return "ModelWithSuperAttributes$SubModelWithSuperAttributes_{" + "subValue=" + subValue + ", superValue=" + superValue + "}" + super.toString(); } }
8,539
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelForRProcessingTest.java
package com.airbnb.epoxy; @EpoxyModelClass(layout = R.layout.res) public abstract class ModelForRProcessingTest extends EpoxyModel<Object> { @EpoxyAttribute int value; }
8,540
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoModelNotOnModelField.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.AutoModel; import com.airbnb.epoxy.EpoxyController; public class AutoModelNotOnModelField extends EpoxyController { @AutoModel String value; @Override protected void buildModels() { } }
8,541
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodNoLayout.java
package com.airbnb.epoxy; @EpoxyModelClass public abstract class GenerateDefaultLayoutMethodNoLayout extends EpoxyModel<Object> { @EpoxyAttribute int value; }
8,542
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotatedClassAndSuperAttributes.java
package com.airbnb.epoxy; public class ModelWithAnnotatedClassAndSuperAttributes extends EpoxyModel<Object> { @EpoxyAttribute int superValue; @Override protected int getDefaultLayout() { return 0; } @EpoxyModelClass public static class SubModelWithAnnotatedClassAndSuperAttributes extends ModelWithAnnotatedClassAndSuperAttributes { } }
8,543
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityStateChangedView_throwsIfNoParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityStateChangedView_throwsIfNoParams extends View { public OnVisibilityStateChangedView_throwsIfNoParams(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityStateChanged void onVisibilityStateChanged() { } }
8,544
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelRequiresHashCodeArraySucceeds.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; public class ModelRequiresHashCodeArraySucceeds extends EpoxyModel<Object> { @EpoxyAttribute String[] clickListener; @Override protected int getDefaultLayout() { return 0; } }
8,545
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/PropDefaultsView_throwsForNonFinalValue.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; @ModelView(defaultLayout = 1) public class PropDefaultsView_throwsForNonFinalValue extends View { static int PRIMITIVE_DEFAULT = 23; public PropDefaultsView_throwsForNonFinalValue(Context context) { super(context); } @ModelProp(defaultValue = "PRIMITIVE_DEFAULT") public void primitiveWithExplicitDefault(int title) { } }
8,546
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithoutSetter.java
package com.airbnb.epoxy; public class ModelWithoutSetter extends EpoxyModel<Object> { @EpoxyAttribute(setter = false) int value; @Override protected int getDefaultLayout() { return 0; } }
8,547
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DoNotHashView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.ModelProp.Option; @ModelView(defaultLayout = 1) public class DoNotHashView extends View { public DoNotHashView(Context context) { super(context); } @ModelProp(options = Option.DoNotHash) public void setTitle(CharSequence title) { } @ModelProp(options = Option.DoNotHash) public void setClickListener(View.OnClickListener title) { } @ModelProp public void normalProp(CharSequence title) { } }
8,548
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropModelPropView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.AfterPropsSet; import com.airbnb.epoxy.ModelProp; import com.airbnb.epoxy.ModelView; @ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT) public class TestFieldPropModelPropView extends View { @ModelProp int value; public TestFieldPropModelPropView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,549
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithPrivateSetter.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithPrivateSetter extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @Override protected int getDefaultLayout() { return 0; } public int getValueInt() { return valueInt; } private void setValueInt(int valueInt) { this.valueInt = valueInt; } }
8,550
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestTextPropViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.PluralsRes; import androidx.annotation.StringRes; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class TestTextPropViewModel_ extends EpoxyModel<TestTextPropView> implements GeneratedModel<TestTextPropView>, TestTextPropViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<TestTextPropViewModel_, TestTextPropView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestTextPropViewModel_, TestTextPropView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestTextPropViewModel_, TestTextPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestTextPropViewModel_, TestTextPropView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ private StringAttributeData title_StringAttributeData = new StringAttributeData(); @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setTitle"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestTextPropView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestTextPropView object) { super.bind(object); object.setTitle(title_StringAttributeData.toString(object.getContext())); } @Override public void bind(final TestTextPropView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestTextPropViewModel_)) { bind(object); return; } TestTextPropViewModel_ that = (TestTextPropViewModel_) previousModel; super.bind(object); if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { object.setTitle(title_StringAttributeData.toString(object.getContext())); } } @Override public void handlePostBind(final TestTextPropView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestTextPropViewModel_ onBind( OnModelBoundListener<TestTextPropViewModel_, TestTextPropView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestTextPropView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestTextPropViewModel_ onUnbind( OnModelUnboundListener<TestTextPropViewModel_, TestTextPropView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestTextPropView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestTextPropViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestTextPropViewModel_, TestTextPropView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestTextPropView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestTextPropViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestTextPropViewModel_, TestTextPropView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public CharSequence getTitle(Context context) { return title_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TestTextPropView#setTitle(CharSequence) */ public TestTextPropViewModel_ title(@NonNull CharSequence title) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); if (title == null) { throw new IllegalArgumentException("title cannot be null"); } title_StringAttributeData.setValue(title); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestTextPropView#setTitle(CharSequence) */ public TestTextPropViewModel_ title(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); title_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestTextPropView#setTitle(CharSequence) */ public TestTextPropViewModel_ title(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); title_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestTextPropView#setTitle(CharSequence) */ public TestTextPropViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); title_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TestTextPropViewModel_ id(long id) { super.id(id); return this; } @Override public TestTextPropViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestTextPropViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestTextPropViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestTextPropViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestTextPropViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestTextPropViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public TestTextPropViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestTextPropViewModel_ show() { super.show(); return this; } @Override public TestTextPropViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestTextPropViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TestTextPropViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.title_StringAttributeData = new StringAttributeData(); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestTextPropViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestTextPropViewModel_ that = (TestTextPropViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TestTextPropViewModel_{" + "title_StringAttributeData=" + title_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,551
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GeneratedModelSuffixViewSuffix_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class GeneratedModelSuffixViewSuffix_ extends EpoxyModel<GeneratedModelSuffixView> implements GeneratedModel<GeneratedModelSuffixView>, GeneratedModelSuffixViewSuffixBuilder { private OnModelBoundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final GeneratedModelSuffixView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final GeneratedModelSuffixView object) { super.bind(object); } @Override public void bind(final GeneratedModelSuffixView object, EpoxyModel previousModel) { if (!(previousModel instanceof GeneratedModelSuffixViewSuffix_)) { bind(object); return; } GeneratedModelSuffixViewSuffix_ that = (GeneratedModelSuffixViewSuffix_) previousModel; super.bind(object); } @Override public void handlePostBind(final GeneratedModelSuffixView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GeneratedModelSuffixViewSuffix_ onBind( OnModelBoundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(GeneratedModelSuffixView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GeneratedModelSuffixViewSuffix_ onUnbind( OnModelUnboundListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final GeneratedModelSuffixView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GeneratedModelSuffixViewSuffix_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final GeneratedModelSuffixView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GeneratedModelSuffixViewSuffix_ onVisibilityChanged( OnModelVisibilityChangedListener<GeneratedModelSuffixViewSuffix_, GeneratedModelSuffixView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public GeneratedModelSuffixViewSuffix_ id(long id) { super.id(id); return this; } @Override public GeneratedModelSuffixViewSuffix_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GeneratedModelSuffixViewSuffix_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GeneratedModelSuffixViewSuffix_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GeneratedModelSuffixViewSuffix_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GeneratedModelSuffixViewSuffix_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GeneratedModelSuffixViewSuffix_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GeneratedModelSuffixViewSuffix_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GeneratedModelSuffixViewSuffix_ show() { super.show(); return this; } @Override public GeneratedModelSuffixViewSuffix_ show(boolean show) { super.show(show); return this; } @Override public GeneratedModelSuffixViewSuffix_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.generated_model_suffix_view; } @Override public GeneratedModelSuffixViewSuffix_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GeneratedModelSuffixViewSuffix_)) { return false; } if (!super.equals(o)) { return false; } GeneratedModelSuffixViewSuffix_ that = (GeneratedModelSuffixViewSuffix_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "GeneratedModelSuffixViewSuffix_{" + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,552
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithFinalClass.java
package com.airbnb.epoxy; public final class ModelWithFinalClass extends EpoxyModel<Object> { @EpoxyAttribute int valueInt; @Override protected int getDefaultLayout() { return 0; } }
8,553
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestTextPropMustBeCharSequenceView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class TestTextPropMustBeCharSequenceView extends View { public TestTextPropMustBeCharSequenceView(Context context) { super(context); } @TextProp public void setTitle(String title) { } }
8,554
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoLayoutModelViewManualLayoutParamsModel_.java
package com.airbnb.epoxy; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.NullPointerException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; /** * Generated file. Do not modify! */ public class AutoLayoutModelViewManualLayoutParamsModel_ extends EpoxyModel<AutoLayoutModelViewManualLayoutParams> implements GeneratedModel<AutoLayoutModelViewManualLayoutParams>, AutoLayoutModelViewManualLayoutParamsModelBuilder { private OnModelBoundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> onModelVisibilityChangedListener_epoxyGeneratedModel; private int value_Int = 0; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public AutoLayoutModelViewManualLayoutParams buildView(ViewGroup parent) { AutoLayoutModelViewManualLayoutParams v = new AutoLayoutModelViewManualLayoutParams(parent.getContext()); if (v.getLayoutParams() == null) { throw new NullPointerException("Layout params is required to be set for Size.MANUAL"); } return v; } @Override public void handlePreBind(final EpoxyViewHolder holder, final AutoLayoutModelViewManualLayoutParams object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final AutoLayoutModelViewManualLayoutParams object) { super.bind(object); object.setValue(value_Int); } @Override public void bind(final AutoLayoutModelViewManualLayoutParams object, EpoxyModel previousModel) { if (!(previousModel instanceof AutoLayoutModelViewManualLayoutParamsModel_)) { bind(object); return; } AutoLayoutModelViewManualLayoutParamsModel_ that = (AutoLayoutModelViewManualLayoutParamsModel_) previousModel; super.bind(object); if ((value_Int != that.value_Int)) { object.setValue(value_Int); } } @Override public void handlePostBind(final AutoLayoutModelViewManualLayoutParams object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public AutoLayoutModelViewManualLayoutParamsModel_ onBind( OnModelBoundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(AutoLayoutModelViewManualLayoutParams object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public AutoLayoutModelViewManualLayoutParamsModel_ onUnbind( OnModelUnboundListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final AutoLayoutModelViewManualLayoutParams object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public AutoLayoutModelViewManualLayoutParamsModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final AutoLayoutModelViewManualLayoutParams object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public AutoLayoutModelViewManualLayoutParamsModel_ onVisibilityChanged( OnModelVisibilityChangedListener<AutoLayoutModelViewManualLayoutParamsModel_, AutoLayoutModelViewManualLayoutParams> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is 0 * * @see AutoLayoutModelViewManualLayoutParams#setValue(int) */ public AutoLayoutModelViewManualLayoutParamsModel_ value(int value) { onMutation(); this.value_Int = value; return this; } public int value() { return value_Int; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ id(long id) { super.id(id); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public AutoLayoutModelViewManualLayoutParamsModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ show() { super.show(); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ show(boolean show) { super.show(show); return this; } @Override public AutoLayoutModelViewManualLayoutParamsModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public AutoLayoutModelViewManualLayoutParamsModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.value_Int = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof AutoLayoutModelViewManualLayoutParamsModel_)) { return false; } if (!super.equals(o)) { return false; } AutoLayoutModelViewManualLayoutParamsModel_ that = (AutoLayoutModelViewManualLayoutParamsModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value_Int != that.value_Int)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value_Int; return _result; } @Override public String toString() { return "AutoLayoutModelViewManualLayoutParamsModel_{" + "value_Int=" + value_Int + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,555
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithSuper.java
package com.airbnb.epoxy; public class ModelWithSuper extends EpoxyModel<Object> { @EpoxyAttribute int valueInt; public ModelWithSuper valueInt(int valueInt) { this.valueInt = valueInt; return this; } @Override protected int getDefaultLayout() { return 0; } }
8,556
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelDoNotHash.java
package com.airbnb.epoxy; import com.airbnb.epoxy.EpoxyAttribute.Option; public class ModelDoNotHash extends EpoxyModel<Object> { @EpoxyAttribute int value; @EpoxyAttribute({Option.DoNotHash}) int value2; @EpoxyAttribute({Option.DoNotHash}) String value3; @Override protected int getDefaultLayout() { return 0; } }
8,557
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/LayoutOverloadsViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class LayoutOverloadsViewModel_ extends EpoxyModel<LayoutOverloadsView> implements GeneratedModel<LayoutOverloadsView>, LayoutOverloadsViewModelBuilder { private OnModelBoundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final LayoutOverloadsView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final LayoutOverloadsView object) { super.bind(object); } @Override public void bind(final LayoutOverloadsView object, EpoxyModel previousModel) { if (!(previousModel instanceof LayoutOverloadsViewModel_)) { bind(object); return; } LayoutOverloadsViewModel_ that = (LayoutOverloadsViewModel_) previousModel; super.bind(object); } @Override public void handlePostBind(final LayoutOverloadsView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public LayoutOverloadsViewModel_ onBind( OnModelBoundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(LayoutOverloadsView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public LayoutOverloadsViewModel_ onUnbind( OnModelUnboundListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final LayoutOverloadsView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public LayoutOverloadsViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final LayoutOverloadsView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public LayoutOverloadsViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<LayoutOverloadsViewModel_, LayoutOverloadsView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public LayoutOverloadsViewModel_ id(long id) { super.id(id); return this; } @Override public LayoutOverloadsViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public LayoutOverloadsViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public LayoutOverloadsViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public LayoutOverloadsViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public LayoutOverloadsViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public LayoutOverloadsViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public LayoutOverloadsViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public LayoutOverloadsViewModel_ show() { super.show(); return this; } @Override public LayoutOverloadsViewModel_ show(boolean show) { super.show(show); return this; } @Override public LayoutOverloadsViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.layout_overloads_view; } public LayoutOverloadsViewModel_ withOneLayout() { layout(R.layout.layout_overloads_view_one); return this; } public LayoutOverloadsViewModel_ withTwoLayout() { layout(R.layout.layout_overloads_view_two); return this; } @Override public LayoutOverloadsViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof LayoutOverloadsViewModel_)) { return false; } if (!super.equals(o)) { return false; } LayoutOverloadsViewModel_ that = (LayoutOverloadsViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "LayoutOverloadsViewModel_{" + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,558
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithViewClickListener.java
package com.airbnb.epoxy; import android.view.View; import com.airbnb.epoxy.EpoxyAttribute.Option; import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash; public class ModelWithViewClickListener extends EpoxyModel<Object> { @EpoxyAttribute(DoNotHash) View.OnClickListener clickListener; @Override protected int getDefaultLayout() { return 0; } }
8,559
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithViewLongClickListener.java
package com.airbnb.epoxy; import android.view.View; import com.airbnb.epoxy.EpoxyAttribute.Option; import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash; public class ModelWithViewLongClickListener extends EpoxyModel<Object> { @EpoxyAttribute(DoNotHash) View.OnLongClickListener clickListener; @Override protected int getDefaultLayout() { return 0; } }
8,560
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropCallbackPropView.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; import com.airbnb.epoxy.AfterPropsSet; import com.airbnb.epoxy.CallbackProp; import com.airbnb.epoxy.ModelView; @ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT) public class TestFieldPropCallbackPropView extends View { @CallbackProp @Nullable OnClickListener value; public TestFieldPropCallbackPropView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,561
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelConfigRequireHashCodeAllowsMarkedAttributes.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyAttribute.Option; import com.airbnb.epoxy.EpoxyModel; public class ModelConfigRequireHashCodeAllowsMarkedAttributes extends EpoxyModel<Object> { public static class ClassWithoutHashCode { } @EpoxyAttribute(Option.IgnoreRequireHashCode) ClassWithoutHashCode classWithoutHashCode; @Override protected int getDefaultLayout() { return 0; } }
8,562
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropTextPropView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.AfterPropsSet; import com.airbnb.epoxy.ModelView; import com.airbnb.epoxy.TextProp; @ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT) public class TestFieldPropTextPropView extends View { @TextProp CharSequence value; public TestFieldPropTextPropView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,563
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelRequiresHashCodeIterableSucceeds.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; import java.util.List; public class ModelRequiresHashCodeIterableSucceeds extends EpoxyModel<Object> { @EpoxyAttribute List<String> clickListener; @Override protected int getDefaultLayout() { return 0; } }
8,564
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodNextParentLayout.java
package com.airbnb.epoxy; public class GenerateDefaultLayoutMethodNextParentLayout { @EpoxyModelClass public static abstract class NoLayout extends WithLayout { @EpoxyAttribute int value; } @EpoxyModelClass public static abstract class StillNoLayout extends WithLayout { } @EpoxyModelClass(layout = 1) public static abstract class WithLayout extends EpoxyModel<Object> { } }
8,565
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoLayoutModelViewMatchParentModel_.java
package com.airbnb.epoxy; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; /** * Generated file. Do not modify! */ public class AutoLayoutModelViewMatchParentModel_ extends EpoxyModel<AutoLayoutModelViewMatchParent> implements GeneratedModel<AutoLayoutModelViewMatchParent>, AutoLayoutModelViewMatchParentModelBuilder { private OnModelBoundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> onModelVisibilityChangedListener_epoxyGeneratedModel; private int value_Int = 0; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public AutoLayoutModelViewMatchParent buildView(ViewGroup parent) { AutoLayoutModelViewMatchParent v = new AutoLayoutModelViewMatchParent(parent.getContext()); v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.MATCH_PARENT)); return v; } @Override public void handlePreBind(final EpoxyViewHolder holder, final AutoLayoutModelViewMatchParent object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final AutoLayoutModelViewMatchParent object) { super.bind(object); object.setValue(value_Int); } @Override public void bind(final AutoLayoutModelViewMatchParent object, EpoxyModel previousModel) { if (!(previousModel instanceof AutoLayoutModelViewMatchParentModel_)) { bind(object); return; } AutoLayoutModelViewMatchParentModel_ that = (AutoLayoutModelViewMatchParentModel_) previousModel; super.bind(object); if ((value_Int != that.value_Int)) { object.setValue(value_Int); } } @Override public void handlePostBind(final AutoLayoutModelViewMatchParent object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public AutoLayoutModelViewMatchParentModel_ onBind( OnModelBoundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(AutoLayoutModelViewMatchParent object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public AutoLayoutModelViewMatchParentModel_ onUnbind( OnModelUnboundListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final AutoLayoutModelViewMatchParent object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public AutoLayoutModelViewMatchParentModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final AutoLayoutModelViewMatchParent object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public AutoLayoutModelViewMatchParentModel_ onVisibilityChanged( OnModelVisibilityChangedListener<AutoLayoutModelViewMatchParentModel_, AutoLayoutModelViewMatchParent> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is 0 * * @see AutoLayoutModelViewMatchParent#setValue(int) */ public AutoLayoutModelViewMatchParentModel_ value(int value) { onMutation(); this.value_Int = value; return this; } public int value() { return value_Int; } @Override public AutoLayoutModelViewMatchParentModel_ id(long id) { super.id(id); return this; } @Override public AutoLayoutModelViewMatchParentModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public AutoLayoutModelViewMatchParentModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public AutoLayoutModelViewMatchParentModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public AutoLayoutModelViewMatchParentModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public AutoLayoutModelViewMatchParentModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public AutoLayoutModelViewMatchParentModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public AutoLayoutModelViewMatchParentModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public AutoLayoutModelViewMatchParentModel_ show() { super.show(); return this; } @Override public AutoLayoutModelViewMatchParentModel_ show(boolean show) { super.show(show); return this; } @Override public AutoLayoutModelViewMatchParentModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public AutoLayoutModelViewMatchParentModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.value_Int = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof AutoLayoutModelViewMatchParentModel_)) { return false; } if (!super.equals(o)) { return false; } AutoLayoutModelViewMatchParentModel_ that = (AutoLayoutModelViewMatchParentModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value_Int != that.value_Int)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value_Int; return _result; } @Override public String toString() { return "AutoLayoutModelViewMatchParentModel_{" + "value_Int=" + value_Int + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,566
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TextPropDefaultViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.PluralsRes; import androidx.annotation.StringRes; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class TextPropDefaultViewModel_ extends EpoxyModel<TextPropDefaultView> implements GeneratedModel<TextPropDefaultView>, TextPropDefaultViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(2); private OnModelBoundListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ private StringAttributeData textWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value); private StringAttributeData nullableTextWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value); @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for textWithDefault"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final TextPropDefaultView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TextPropDefaultView object) { super.bind(object); object.textWithDefault(textWithDefault_StringAttributeData.toString(object.getContext())); object.nullableTextWithDefault(nullableTextWithDefault_StringAttributeData.toString(object.getContext())); } @Override public void bind(final TextPropDefaultView object, EpoxyModel previousModel) { if (!(previousModel instanceof TextPropDefaultViewModel_)) { bind(object); return; } TextPropDefaultViewModel_ that = (TextPropDefaultViewModel_) previousModel; super.bind(object); if ((textWithDefault_StringAttributeData != null ? !textWithDefault_StringAttributeData.equals(that.textWithDefault_StringAttributeData) : that.textWithDefault_StringAttributeData != null)) { object.textWithDefault(textWithDefault_StringAttributeData.toString(object.getContext())); } if ((nullableTextWithDefault_StringAttributeData != null ? !nullableTextWithDefault_StringAttributeData.equals(that.nullableTextWithDefault_StringAttributeData) : that.nullableTextWithDefault_StringAttributeData != null)) { object.nullableTextWithDefault(nullableTextWithDefault_StringAttributeData.toString(object.getContext())); } } @Override public void handlePostBind(final TextPropDefaultView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TextPropDefaultViewModel_ onBind( OnModelBoundListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TextPropDefaultView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TextPropDefaultViewModel_ onUnbind( OnModelUnboundListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TextPropDefaultView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TextPropDefaultViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TextPropDefaultView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TextPropDefaultViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TextPropDefaultViewModel_, TextPropDefaultView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public CharSequence getTextWithDefault(Context context) { return textWithDefault_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TextPropDefaultView#textWithDefault(CharSequence) */ public TextPropDefaultViewModel_ textWithDefault(@NonNull CharSequence textWithDefault) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); if (textWithDefault == null) { throw new IllegalArgumentException("textWithDefault cannot be null"); } textWithDefault_StringAttributeData.setValue(textWithDefault); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TextPropDefaultView#textWithDefault(CharSequence) */ public TextPropDefaultViewModel_ textWithDefault(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); textWithDefault_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TextPropDefaultView#textWithDefault(CharSequence) */ public TextPropDefaultViewModel_ textWithDefault(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); textWithDefault_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TextPropDefaultView#textWithDefault(CharSequence) */ public TextPropDefaultViewModel_ textWithDefaultQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); textWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Nullable public CharSequence getNullableTextWithDefault(Context context) { return nullableTextWithDefault_StringAttributeData.toString(context); } /** * <i>Optional</i>: Default value is R.string.string_resource_value * * @see TextPropDefaultView#nullableTextWithDefault(CharSequence) */ public TextPropDefaultViewModel_ nullableTextWithDefault( @Nullable CharSequence nullableTextWithDefault) { onMutation(); nullableTextWithDefault_StringAttributeData.setValue(nullableTextWithDefault); return this; } /** * If a value of 0 is set then this attribute will revert to its default value. * <p> * <i>Optional</i>: Default value is R.string.string_resource_value * * @see TextPropDefaultView#nullableTextWithDefault(CharSequence) */ public TextPropDefaultViewModel_ nullableTextWithDefault(@StringRes int stringRes) { onMutation(); nullableTextWithDefault_StringAttributeData.setValue(stringRes); return this; } /** * If a value of 0 is set then this attribute will revert to its default value. * <p> * <i>Optional</i>: Default value is R.string.string_resource_value * * @see TextPropDefaultView#nullableTextWithDefault(CharSequence) */ public TextPropDefaultViewModel_ nullableTextWithDefault(@StringRes int stringRes, Object... formatArgs) { onMutation(); nullableTextWithDefault_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * If a value of 0 is set then this attribute will revert to its default value. * <p> * <i>Optional</i>: Default value is R.string.string_resource_value * * @see TextPropDefaultView#nullableTextWithDefault(CharSequence) */ public TextPropDefaultViewModel_ nullableTextWithDefaultQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); nullableTextWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TextPropDefaultViewModel_ id(long id) { super.id(id); return this; } @Override public TextPropDefaultViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TextPropDefaultViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TextPropDefaultViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TextPropDefaultViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TextPropDefaultViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TextPropDefaultViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public TextPropDefaultViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TextPropDefaultViewModel_ show() { super.show(); return this; } @Override public TextPropDefaultViewModel_ show(boolean show) { super.show(show); return this; } @Override public TextPropDefaultViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TextPropDefaultViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.textWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value); this.nullableTextWithDefault_StringAttributeData = new StringAttributeData(R.string.string_resource_value); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TextPropDefaultViewModel_)) { return false; } if (!super.equals(o)) { return false; } TextPropDefaultViewModel_ that = (TextPropDefaultViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((textWithDefault_StringAttributeData != null ? !textWithDefault_StringAttributeData.equals(that.textWithDefault_StringAttributeData) : that.textWithDefault_StringAttributeData != null)) { return false; } if ((nullableTextWithDefault_StringAttributeData != null ? !nullableTextWithDefault_StringAttributeData.equals(that.nullableTextWithDefault_StringAttributeData) : that.nullableTextWithDefault_StringAttributeData != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (textWithDefault_StringAttributeData != null ? textWithDefault_StringAttributeData.hashCode() : 0); _result = 31 * _result + (nullableTextWithDefault_StringAttributeData != null ? nullableTextWithDefault_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TextPropDefaultViewModel_{" + "textWithDefault_StringAttributeData=" + textWithDefault_StringAttributeData + ", nullableTextWithDefault_StringAttributeData=" + nullableTextWithDefault_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,567
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestAfterBindPropsSuperView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public abstract class TestAfterBindPropsSuperView extends View { public TestAfterBindPropsSuperView(Context context) { super(context); } @ModelProp public void setFlagSuper(boolean flag) { } @AfterPropsSet public void afterFlagSetSuper() { } }
8,568
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodParentLayout$WithLayout_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class GenerateDefaultLayoutMethodParentLayout$WithLayout_ extends GenerateDefaultLayoutMethodParentLayout.WithLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodParentLayout_WithLayoutBuilder { private OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public GenerateDefaultLayoutMethodParentLayout$WithLayout_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onBind( OnModelBoundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onUnbind( OnModelUnboundListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodParentLayout$WithLayout_ onVisibilityChanged( OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(long id) { super.id(id); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ show() { super.show(); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ show(boolean show) { super.show(show); return this; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GenerateDefaultLayoutMethodParentLayout$WithLayout_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GenerateDefaultLayoutMethodParentLayout$WithLayout_)) { return false; } if (!super.equals(o)) { return false; } GenerateDefaultLayoutMethodParentLayout$WithLayout_ that = (GenerateDefaultLayoutMethodParentLayout$WithLayout_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "GenerateDefaultLayoutMethodParentLayout$WithLayout_{" + "}" + super.toString(); } }
8,569
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/RLayoutInViewModelAnnotationWorksViewModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class RLayoutInViewModelAnnotationWorksViewModel_ extends EpoxyModel<RLayoutInViewModelAnnotationWorksView> implements GeneratedModel<RLayoutInViewModelAnnotationWorksView>, RLayoutInViewModelAnnotationWorksViewModelBuilder { private OnModelBoundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final RLayoutInViewModelAnnotationWorksView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final RLayoutInViewModelAnnotationWorksView object) { super.bind(object); } @Override public void bind(final RLayoutInViewModelAnnotationWorksView object, EpoxyModel previousModel) { if (!(previousModel instanceof RLayoutInViewModelAnnotationWorksViewModel_)) { bind(object); return; } RLayoutInViewModelAnnotationWorksViewModel_ that = (RLayoutInViewModelAnnotationWorksViewModel_) previousModel; super.bind(object); } @Override public void handlePostBind(final RLayoutInViewModelAnnotationWorksView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public RLayoutInViewModelAnnotationWorksViewModel_ onBind( OnModelBoundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(RLayoutInViewModelAnnotationWorksView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public RLayoutInViewModelAnnotationWorksViewModel_ onUnbind( OnModelUnboundListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final RLayoutInViewModelAnnotationWorksView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public RLayoutInViewModelAnnotationWorksViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final RLayoutInViewModelAnnotationWorksView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public RLayoutInViewModelAnnotationWorksViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<RLayoutInViewModelAnnotationWorksViewModel_, RLayoutInViewModelAnnotationWorksView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ id(long id) { super.id(id); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ show() { super.show(); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ show(boolean show) { super.show(show); return this; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.res; } @Override public RLayoutInViewModelAnnotationWorksViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof RLayoutInViewModelAnnotationWorksViewModel_)) { return false; } if (!super.equals(o)) { return false; } RLayoutInViewModelAnnotationWorksViewModel_ that = (RLayoutInViewModelAnnotationWorksViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "RLayoutInViewModelAnnotationWorksViewModel_{" + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,570
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotatedClassAndSuperAttributes_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelWithAnnotatedClassAndSuperAttributes_ extends ModelWithAnnotatedClassAndSuperAttributes implements GeneratedModel<Object>, ModelWithAnnotatedClassAndSuperAttributesBuilder { private OnModelBoundListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAnnotatedClassAndSuperAttributes_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithAnnotatedClassAndSuperAttributes_ onBind( OnModelBoundListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithAnnotatedClassAndSuperAttributes_ onUnbind( OnModelUnboundListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithAnnotatedClassAndSuperAttributes_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithAnnotatedClassAndSuperAttributes_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAnnotatedClassAndSuperAttributes_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithAnnotatedClassAndSuperAttributes_ superValue(int superValue) { onMutation(); super.superValue = superValue; return this; } public int superValue() { return superValue; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ id(long id) { super.id(id); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ show() { super.show(); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ show(boolean show) { super.show(show); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ hide() { super.hide(); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.superValue = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithAnnotatedClassAndSuperAttributes_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAnnotatedClassAndSuperAttributes_ that = (ModelWithAnnotatedClassAndSuperAttributes_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((superValue != that.superValue)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + superValue; return _result; } @Override public String toString() { return "ModelWithAnnotatedClassAndSuperAttributes_{" + "superValue=" + superValue + "}" + super.toString(); } }
8,571
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ extends GenerateDefaultLayoutMethodNextParentLayout.StillNoLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodNextParentLayout_StillNoLayoutBuilder { private OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onBind( OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onUnbind( OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ onVisibilityChanged( OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(long id) { super.id(id); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ layout( @LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ show() { super.show(); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ show(boolean show) { super.show(show); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_)) { return false; } if (!super.equals(o)) { return false; } GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_ that = (GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "GenerateDefaultLayoutMethodNextParentLayout$StillNoLayout_{" + "}" + super.toString(); } }
8,572
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotatedClass.java
package com.airbnb.epoxy; @EpoxyModelClass public class ModelWithAnnotatedClass extends EpoxyModel<Object> { @Override protected int getDefaultLayout() { return 0; } }
8,573
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelForTestingDuplicateRValues_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import com.airbnb.epoxy.othermodule.R; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelForTestingDuplicateRValues_ extends ModelForTestingDuplicateRValues implements GeneratedModel<Object>, ModelForTestingDuplicateRValuesBuilder { private OnModelBoundListener<ModelForTestingDuplicateRValues_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelForTestingDuplicateRValues_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelForTestingDuplicateRValues_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelForTestingDuplicateRValues_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelForTestingDuplicateRValues_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelForTestingDuplicateRValues_ onBind( OnModelBoundListener<ModelForTestingDuplicateRValues_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelForTestingDuplicateRValues_ onUnbind( OnModelUnboundListener<ModelForTestingDuplicateRValues_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelForTestingDuplicateRValues_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelForTestingDuplicateRValues_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelForTestingDuplicateRValues_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelForTestingDuplicateRValues_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelForTestingDuplicateRValues_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public ModelForTestingDuplicateRValues_ id(long id) { super.id(id); return this; } @Override public ModelForTestingDuplicateRValues_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelForTestingDuplicateRValues_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelForTestingDuplicateRValues_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelForTestingDuplicateRValues_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelForTestingDuplicateRValues_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelForTestingDuplicateRValues_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelForTestingDuplicateRValues_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelForTestingDuplicateRValues_ show() { super.show(); return this; } @Override public ModelForTestingDuplicateRValues_ show(boolean show) { super.show(show); return this; } @Override public ModelForTestingDuplicateRValues_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.res_in_other_module; } @Override public ModelForTestingDuplicateRValues_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelForTestingDuplicateRValues_)) { return false; } if (!super.equals(o)) { return false; } ModelForTestingDuplicateRValues_ that = (ModelForTestingDuplicateRValues_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value != that.value)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value; return _result; } @Override public String toString() { return "ModelForTestingDuplicateRValues_{" + "value=" + value + "}" + super.toString(); } }
8,574
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithDataBindingWithoutDonothashBinding.java
package com.airbnb.epoxy.databinding; import android.view.View; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.airbnb.epoxy.R; import com.airbnb.epoxy.BR; @SuppressWarnings("unchecked") public class ModelWithDataBindingWithoutDonothashBinding extends androidx.databinding.ViewDataBinding { @Nullable private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes; @Nullable private static final android.util.SparseIntArray sViewsWithIds; static { sIncludes = null; sViewsWithIds = null; } // views @NonNull public final android.widget.Button button; // variables @Nullable private java.lang.String mStringValue; @Nullable private android.view.View.OnClickListener mClickListener; // values // listeners // Inverse Binding Event Handlers public ModelWithDataBindingWithoutDonothashBinding(@NonNull androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) { super(bindingComponent, root, 0); final Object[] bindings = mapBindings(bindingComponent, root, 1, sIncludes, sViewsWithIds); this.button = (android.widget.Button) bindings[0]; this.button.setTag(null); setRootTag(root); // listeners invalidateAll(); } @Override public void invalidateAll() { synchronized(this) { mDirtyFlags = 0x4L; } requestRebind(); } @Override public boolean hasPendingBindings() { synchronized(this) { if (mDirtyFlags != 0) { return true; } } return false; } @Override public boolean setVariable(int variableId, @Nullable Object variable) { boolean variableSet = true; if (BR.stringValue == variableId) { setStringValue((java.lang.String) variable); } else if (BR.clickListener == variableId) { setClickListener((android.view.View.OnClickListener) variable); } else { variableSet = false; } return variableSet; } public void setStringValue(@Nullable java.lang.String StringValue) { this.mStringValue = StringValue; synchronized(this) { mDirtyFlags |= 0x1L; } notifyPropertyChanged(BR.stringValue); super.requestRebind(); } @Nullable public java.lang.String getStringValue() { return mStringValue; } public void setClickListener(@Nullable android.view.View.OnClickListener ClickListener) { this.mClickListener = ClickListener; synchronized(this) { mDirtyFlags |= 0x2L; } notifyPropertyChanged(BR.clickListener); super.requestRebind(); } @Nullable public android.view.View.OnClickListener getClickListener() { return mClickListener; } @Override protected boolean onFieldChange(int localFieldId, Object object, int fieldId) { switch (localFieldId) { } return false; } @Override protected void executeBindings() { long dirtyFlags = 0; synchronized(this) { dirtyFlags = mDirtyFlags; mDirtyFlags = 0; } java.lang.String stringValue = mStringValue; android.view.View.OnClickListener clickListener = mClickListener; if ((dirtyFlags & 0x5L) != 0) { } if ((dirtyFlags & 0x6L) != 0) { } // batch finished if ((dirtyFlags & 0x6L) != 0) { // api target 1 this.button.setOnClickListener(clickListener); } if ((dirtyFlags & 0x5L) != 0) { // api target 1 androidx.databinding.adapters.TextViewBindingAdapter.setText(this.button, stringValue); } } // Listener Stub Implementations // callback impls // dirty flag private long mDirtyFlags = 0xffffffffffffffffL; @NonNull public static ModelWithDataBindingWithoutDonothashBinding inflate(@NonNull android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup root, boolean attachToRoot) { return inflate(inflater, root, attachToRoot, androidx.databinding.DataBindingUtil.getDefaultComponent()); } @NonNull public static ModelWithDataBindingWithoutDonothashBinding inflate(@NonNull android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup root, boolean attachToRoot, @Nullable androidx.databinding.DataBindingComponent bindingComponent) { return androidx.databinding.DataBindingUtil.<ModelWithDataBindingWithoutDonothashBinding>inflate(inflater, com.airbnb.epoxy.R.layout.model_with_data_binding_without_donothash, root, attachToRoot, bindingComponent); } @NonNull public static ModelWithDataBindingWithoutDonothashBinding inflate(@NonNull android.view.LayoutInflater inflater) { return inflate(inflater, androidx.databinding.DataBindingUtil.getDefaultComponent()); } @NonNull public static ModelWithDataBindingWithoutDonothashBinding inflate(@NonNull android.view.LayoutInflater inflater, @Nullable androidx.databinding.DataBindingComponent bindingComponent) { return bind(inflater.inflate(com.airbnb.epoxy.R.layout.model_with_data_binding_without_donothash, null, false), bindingComponent); } @NonNull public static ModelWithDataBindingWithoutDonothashBinding bind(@NonNull android.view.View view) { return bind(view, androidx.databinding.DataBindingUtil.getDefaultComponent()); } @NonNull public static ModelWithDataBindingWithoutDonothashBinding bind(@NonNull android.view.View view, @Nullable androidx.databinding.DataBindingComponent bindingComponent) { if (!"layout/model_with_data_binding_without_donothash_0".equals(view.getTag())) { throw new RuntimeException("view tag isn't correct on view:" + view.getTag()); } return new ModelWithDataBindingWithoutDonothashBinding(bindingComponent, view); } /* flag mapping flag 0 (0x1L): stringValue flag 1 (0x2L): clickListener flag 2 (0x3L): null flag mapping end*/ //end }
8,575
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelReturningClassTypeWithVarargs_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelReturningClassTypeWithVarargs_ extends ModelReturningClassTypeWithVarargs implements GeneratedModel<Object>, ModelReturningClassTypeWithVarargsBuilder { private OnModelBoundListener<ModelReturningClassTypeWithVarargs_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelReturningClassTypeWithVarargs_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelReturningClassTypeWithVarargs_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelReturningClassTypeWithVarargs_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelReturningClassTypeWithVarargs_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelReturningClassTypeWithVarargs_ onBind( OnModelBoundListener<ModelReturningClassTypeWithVarargs_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelReturningClassTypeWithVarargs_ onUnbind( OnModelUnboundListener<ModelReturningClassTypeWithVarargs_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelReturningClassTypeWithVarargs_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelReturningClassTypeWithVarargs_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelReturningClassTypeWithVarargs_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelReturningClassTypeWithVarargs_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelReturningClassTypeWithVarargs_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public ModelReturningClassTypeWithVarargs_ classType(String... varargs) { super.classType(varargs); return this; } @Override public ModelReturningClassTypeWithVarargs_ classType(String first, String... varargs) { super.classType(first, varargs); return this; } @Override public ModelReturningClassTypeWithVarargs_ id(long id) { super.id(id); return this; } @Override public ModelReturningClassTypeWithVarargs_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelReturningClassTypeWithVarargs_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelReturningClassTypeWithVarargs_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelReturningClassTypeWithVarargs_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelReturningClassTypeWithVarargs_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelReturningClassTypeWithVarargs_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelReturningClassTypeWithVarargs_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelReturningClassTypeWithVarargs_ show() { super.show(); return this; } @Override public ModelReturningClassTypeWithVarargs_ show(boolean show) { super.show(show); return this; } @Override public ModelReturningClassTypeWithVarargs_ hide() { super.hide(); return this; } @Override public ModelReturningClassTypeWithVarargs_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelReturningClassTypeWithVarargs_)) { return false; } if (!super.equals(o)) { return false; } ModelReturningClassTypeWithVarargs_ that = (ModelReturningClassTypeWithVarargs_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value != that.value)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value; return _result; } @Override public String toString() { return "ModelReturningClassTypeWithVarargs_{" + "value=" + value + "}" + super.toString(); } }
8,576
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TextPropDefaultView.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; @ModelView(defaultLayout = 1) public class TextPropDefaultView extends View { public TextPropDefaultView(Context context) { super(context); } @TextProp(defaultRes = R.string.string_resource_value) public void textWithDefault(CharSequence title) { } @TextProp(defaultRes = R.string.string_resource_value) public void nullableTextWithDefault(@Nullable CharSequence title) { } }
8,577
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithCheckedChangeListener.java
package com.airbnb.epoxy; import android.view.View; import android.widget.CompoundButton; import com.airbnb.epoxy.EpoxyAttribute.Option; import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash; public class ModelWithCheckedChangeListener extends EpoxyModel<Object> { @EpoxyAttribute(DoNotHash) CompoundButton.OnCheckedChangeListener checkedListener; @Override protected int getDefaultLayout() { return 0; } }
8,578
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelViewExtendingSuperClassModel_.java
package com.airbnb.epoxy; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; /** * Generated file. Do not modify! */ public class ModelViewExtendingSuperClassModel_ extends EpoxyModel<ModelViewExtendingSuperClass> implements GeneratedModel<ModelViewExtendingSuperClass>, ModelViewExtendingSuperClassModelBuilder { private OnModelBoundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> onModelVisibilityChangedListener_epoxyGeneratedModel; private int subClassValue_Int = 0; private int superClassValue_Int = 0; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public ModelViewExtendingSuperClass buildView(ViewGroup parent) { ModelViewExtendingSuperClass v = new ModelViewExtendingSuperClass(parent.getContext()); v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.MATCH_PARENT)); return v; } @Override public void handlePreBind(final EpoxyViewHolder holder, final ModelViewExtendingSuperClass object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final ModelViewExtendingSuperClass object) { super.bind(object); object.subClassValue(subClassValue_Int); object.superClassValue(superClassValue_Int); } @Override public void bind(final ModelViewExtendingSuperClass object, EpoxyModel previousModel) { if (!(previousModel instanceof ModelViewExtendingSuperClassModel_)) { bind(object); return; } ModelViewExtendingSuperClassModel_ that = (ModelViewExtendingSuperClassModel_) previousModel; super.bind(object); if ((subClassValue_Int != that.subClassValue_Int)) { object.subClassValue(subClassValue_Int); } if ((superClassValue_Int != that.superClassValue_Int)) { object.superClassValue(superClassValue_Int); } } @Override public void handlePostBind(final ModelViewExtendingSuperClass object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); object.afterProps(); object.onSubclassAfterPropsSet(); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelViewExtendingSuperClassModel_ onBind( OnModelBoundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(ModelViewExtendingSuperClass object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.onClear(); object.onSubClassCleared(); } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelViewExtendingSuperClassModel_ onUnbind( OnModelUnboundListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final ModelViewExtendingSuperClass object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelViewExtendingSuperClassModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final ModelViewExtendingSuperClass object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelViewExtendingSuperClassModel_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelViewExtendingSuperClassModel_, ModelViewExtendingSuperClass> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is 0 * * @see ModelViewExtendingSuperClass#subClassValue(int) */ public ModelViewExtendingSuperClassModel_ subClassValue(int subClassValue) { onMutation(); this.subClassValue_Int = subClassValue; return this; } public int subClassValue() { return subClassValue_Int; } /** * <i>Optional</i>: Default value is 0 * * @see ModelViewExtendingSuperClass#superClassValue(int) */ public ModelViewExtendingSuperClassModel_ superClassValue(int superClassValue) { onMutation(); this.superClassValue_Int = superClassValue; return this; } public int superClassValue() { return superClassValue_Int; } @Override public ModelViewExtendingSuperClassModel_ id(long id) { super.id(id); return this; } @Override public ModelViewExtendingSuperClassModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelViewExtendingSuperClassModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelViewExtendingSuperClassModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelViewExtendingSuperClassModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelViewExtendingSuperClassModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelViewExtendingSuperClassModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public ModelViewExtendingSuperClassModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelViewExtendingSuperClassModel_ show() { super.show(); return this; } @Override public ModelViewExtendingSuperClassModel_ show(boolean show) { super.show(show); return this; } @Override public ModelViewExtendingSuperClassModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public ModelViewExtendingSuperClassModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.subClassValue_Int = 0; this.superClassValue_Int = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelViewExtendingSuperClassModel_)) { return false; } if (!super.equals(o)) { return false; } ModelViewExtendingSuperClassModel_ that = (ModelViewExtendingSuperClassModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((subClassValue_Int != that.subClassValue_Int)) { return false; } if ((superClassValue_Int != that.superClassValue_Int)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + subClassValue_Int; _result = 31 * _result + superClassValue_Int; return _result; } @Override public String toString() { return "ModelViewExtendingSuperClassModel_{" + "subClassValue_Int=" + subClassValue_Int + ", superClassValue_Int=" + superClassValue_Int + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,579
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityChangedView_throwsIfStatic.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityChangedView_throwsIfStatic extends View { public OnVisibilityChangedView_throwsIfStatic(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityChanged static void onVisibilityChanged(float ph, float pw, int vh, int vw) { } }
8,580
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestTextPropView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class TestTextPropView extends View { public TestTextPropView(Context context) { super(context); } @TextProp public void setTitle(CharSequence title) { } }
8,581
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropThrowsIfStaticView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.AfterPropsSet; import com.airbnb.epoxy.ModelProp; import com.airbnb.epoxy.ModelProp.Option; import com.airbnb.epoxy.ModelView; @ModelView(autoLayout = ModelView.Size.WRAP_WIDTH_WRAP_HEIGHT) public class TestFieldPropThrowsIfStaticView extends View { @ModelProp public static String value; public TestFieldPropThrowsIfStaticView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,582
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelNoValidation.java
package com.airbnb.epoxy; public class ModelNoValidation extends EpoxyModel<Object> { @EpoxyAttribute int value; @Override protected int getDefaultLayout() { return 0; } }
8,583
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AbstractModelWithHolder.java
package com.airbnb.epoxy; import android.view.View; import androidx.annotation.NonNull; @EpoxyModelClass public abstract class AbstractModelWithHolder extends EpoxyModelWithHolder<AbstractModelWithHolder.Holder> { @EpoxyAttribute int value; @Override protected int getDefaultLayout() { return 0; } static class Holder extends EpoxyHolder { protected void bindView(@NonNull View itemView) { } } }
8,584
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropIgnoreRequireHashCodeOptionViewModel_.java
package com.airbnb.epoxy; import android.view.View; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; import java.util.BitSet; /** * Generated file. Do not modify! */ public class TestFieldPropIgnoreRequireHashCodeOptionViewModel_ extends EpoxyModel<TestFieldPropIgnoreRequireHashCodeOptionView> implements GeneratedModel<TestFieldPropIgnoreRequireHashCodeOptionView>, TestFieldPropIgnoreRequireHashCodeOptionViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private View.OnClickListener value_OnClickListener; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for value"); } } @Override protected int getViewType() { return 0; } @Override public TestFieldPropIgnoreRequireHashCodeOptionView buildView(ViewGroup parent) { TestFieldPropIgnoreRequireHashCodeOptionView v = new TestFieldPropIgnoreRequireHashCodeOptionView(parent.getContext()); v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT)); return v; } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestFieldPropIgnoreRequireHashCodeOptionView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropIgnoreRequireHashCodeOptionView object) { super.bind(object); object.value = value_OnClickListener; } @Override public void bind(final TestFieldPropIgnoreRequireHashCodeOptionView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropIgnoreRequireHashCodeOptionViewModel_)) { bind(object); return; } TestFieldPropIgnoreRequireHashCodeOptionViewModel_ that = (TestFieldPropIgnoreRequireHashCodeOptionViewModel_) previousModel; super.bind(object); if ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) { object.value = value_OnClickListener; } } @Override public void handlePostBind(final TestFieldPropIgnoreRequireHashCodeOptionView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); object.call(); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onBind( OnModelBoundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropIgnoreRequireHashCodeOptionView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropIgnoreRequireHashCodeOptionView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropIgnoreRequireHashCodeOptionView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set */ public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ value( @NonNull final OnModelClickListener<TestFieldPropIgnoreRequireHashCodeOptionViewModel_, TestFieldPropIgnoreRequireHashCodeOptionView> value) { assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); if (value == null) { this.value_OnClickListener = null; } else { this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value); } return this; } /** * <i>Required.</i> * * @see TestFieldPropIgnoreRequireHashCodeOptionView#value */ public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ value( @NonNull View.OnClickListener value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.value_OnClickListener = value; return this; } @NonNull public View.OnClickListener value() { return value_OnClickListener; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(long id) { super.id(id); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ show() { super.show(); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropIgnoreRequireHashCodeOptionViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.value_OnClickListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropIgnoreRequireHashCodeOptionViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropIgnoreRequireHashCodeOptionViewModel_ that = (TestFieldPropIgnoreRequireHashCodeOptionViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (value_OnClickListener != null ? value_OnClickListener.hashCode() : 0); return _result; } @Override public String toString() { return "TestFieldPropIgnoreRequireHashCodeOptionViewModel_{" + "value_OnClickListener=" + value_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,585
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithDataBindingBindingModel_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import androidx.databinding.ViewDataBinding; import java.lang.CharSequence; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelWithDataBindingBindingModel_ extends DataBindingEpoxyModel implements GeneratedModel<DataBindingEpoxyModel.DataBindingHolder>, ModelWithDataBindingBindingModelBuilder { private OnModelBoundListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityChangedListener_epoxyGeneratedModel; private String stringValue; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final DataBindingEpoxyModel.DataBindingHolder object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final DataBindingEpoxyModel.DataBindingHolder object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithDataBindingBindingModel_ onBind( OnModelBoundListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(DataBindingEpoxyModel.DataBindingHolder object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithDataBindingBindingModel_ onUnbind( OnModelUnboundListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final DataBindingEpoxyModel.DataBindingHolder object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithDataBindingBindingModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final DataBindingEpoxyModel.DataBindingHolder object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithDataBindingBindingModel_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithDataBindingBindingModel_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithDataBindingBindingModel_ stringValue(String stringValue) { onMutation(); this.stringValue = stringValue; return this; } public String stringValue() { return stringValue; } @Override public ModelWithDataBindingBindingModel_ id(long id) { super.id(id); return this; } @Override public ModelWithDataBindingBindingModel_ id(@Nullable Number... arg0) { super.id(arg0); return this; } @Override public ModelWithDataBindingBindingModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithDataBindingBindingModel_ id(@Nullable CharSequence arg0) { super.id(arg0); return this; } @Override public ModelWithDataBindingBindingModel_ id(@Nullable CharSequence arg0, @Nullable CharSequence... arg1) { super.id(arg0, arg1); return this; } @Override public ModelWithDataBindingBindingModel_ id(@Nullable CharSequence arg0, long arg1) { super.id(arg0, arg1); return this; } @Override public ModelWithDataBindingBindingModel_ layout(@LayoutRes int arg0) { super.layout(arg0); return this; } @Override public ModelWithDataBindingBindingModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback arg0) { super.spanSizeOverride(arg0); return this; } @Override public ModelWithDataBindingBindingModel_ show() { super.show(); return this; } @Override public ModelWithDataBindingBindingModel_ show(boolean show) { super.show(show); return this; } @Override public ModelWithDataBindingBindingModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.model_with_data_binding; } @Override protected void setDataBindingVariables(ViewDataBinding binding) { if (!binding.setVariable(BR.stringValue, stringValue)) { throw new IllegalStateException("The attribute stringValue was defined in your data binding model (com.airbnb.epoxy.DataBindingEpoxyModel) but a data variable of that name was not found in the layout."); } } @Override protected void setDataBindingVariables(ViewDataBinding binding, EpoxyModel previousModel) { if (!(previousModel instanceof ModelWithDataBindingBindingModel_)) { setDataBindingVariables(binding); return; } ModelWithDataBindingBindingModel_ that = (ModelWithDataBindingBindingModel_) previousModel; if ((stringValue != null ? !stringValue.equals(that.stringValue) : that.stringValue != null)) { binding.setVariable(BR.stringValue, stringValue); } } @Override public ModelWithDataBindingBindingModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.stringValue = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithDataBindingBindingModel_)) { return false; } if (!super.equals(o)) { return false; } ModelWithDataBindingBindingModel_ that = (ModelWithDataBindingBindingModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((stringValue != null ? !stringValue.equals(that.stringValue) : that.stringValue != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (stringValue != null ? stringValue.hashCode() : 0); return _result; } @Override public String toString() { return "ModelWithDataBindingBindingModel_{" + "stringValue=" + stringValue + "}" + super.toString(); } }
8,586
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelViewSuperClass.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.ModelView.Size; @ModelView(autoLayout = Size.MATCH_WIDTH_MATCH_HEIGHT) public class ModelViewSuperClass extends View { public ModelViewSuperClass(Context context) { super(context); } @ModelProp void superClassValue(int value) { } @OnViewRecycled void onClear() { } @AfterPropsSet void afterProps() { } }
8,587
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/RequireAbstractModelPassesEpoxyModelClass.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyModel; import com.airbnb.epoxy.EpoxyModelClass; @EpoxyModelClass public abstract class RequireAbstractModelPassesEpoxyModelClass extends EpoxyModel<Object> { @Override protected int getDefaultLayout() { return 0; } }
8,588
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithSuperAttributes.java
package com.airbnb.epoxy; public class ModelWithSuperAttributes extends EpoxyModel<Object> { @EpoxyAttribute int superValue; @Override protected int getDefaultLayout() { return 0; } public static class SubModelWithSuperAttributes extends ModelWithSuperAttributes { @EpoxyAttribute int subValue; } }
8,589
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithConstructors.java
package com.airbnb.epoxy; public class ModelWithConstructors extends EpoxyModel<Object> { @EpoxyAttribute int valueInt; public ModelWithConstructors(long id, int valueInt) { super(id); this.valueInt = valueInt; } public ModelWithConstructors(int valueInt) { this.valueInt = valueInt; } public ModelWithConstructors() { } @Override protected int getDefaultLayout() { return 0; } }
8,590
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodNextParentLayout$WithLayout_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ extends GenerateDefaultLayoutMethodNextParentLayout.WithLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodNextParentLayout_WithLayoutBuilder { private OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onBind( OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onUnbind( OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ onVisibilityChanged( OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$WithLayout_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(long id) { super.id(id); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ show() { super.show(); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ show(boolean show) { super.show(show); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof GenerateDefaultLayoutMethodNextParentLayout$WithLayout_)) { return false; } if (!super.equals(o)) { return false; } GenerateDefaultLayoutMethodNextParentLayout$WithLayout_ that = (GenerateDefaultLayoutMethodNextParentLayout$WithLayout_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "GenerateDefaultLayoutMethodNextParentLayout$WithLayout_{" + "}" + super.toString(); } }
8,591
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/IgnoreRequireHashCodeViewModel_.java
package com.airbnb.epoxy; import android.view.View; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class IgnoreRequireHashCodeViewModel_ extends EpoxyModel<IgnoreRequireHashCodeView> implements GeneratedModel<IgnoreRequireHashCodeView>, IgnoreRequireHashCodeViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private View.OnClickListener clickListener_OnClickListener; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setClickListener"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final IgnoreRequireHashCodeView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final IgnoreRequireHashCodeView object) { super.bind(object); object.setClickListener(clickListener_OnClickListener); } @Override public void bind(final IgnoreRequireHashCodeView object, EpoxyModel previousModel) { if (!(previousModel instanceof IgnoreRequireHashCodeViewModel_)) { bind(object); return; } IgnoreRequireHashCodeViewModel_ that = (IgnoreRequireHashCodeViewModel_) previousModel; super.bind(object); if ((clickListener_OnClickListener != null ? !clickListener_OnClickListener.equals(that.clickListener_OnClickListener) : that.clickListener_OnClickListener != null)) { object.setClickListener(clickListener_OnClickListener); } } @Override public void handlePostBind(final IgnoreRequireHashCodeView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public IgnoreRequireHashCodeViewModel_ onBind( OnModelBoundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(IgnoreRequireHashCodeView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public IgnoreRequireHashCodeViewModel_ onUnbind( OnModelUnboundListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final IgnoreRequireHashCodeView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public IgnoreRequireHashCodeViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final IgnoreRequireHashCodeView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public IgnoreRequireHashCodeViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set */ public IgnoreRequireHashCodeViewModel_ clickListener( @NonNull final OnModelClickListener<IgnoreRequireHashCodeViewModel_, IgnoreRequireHashCodeView> clickListener) { assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); if (clickListener == null) { this.clickListener_OnClickListener = null; } else { this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener); } return this; } /** * <i>Required.</i> * * @see IgnoreRequireHashCodeView#setClickListener(View.OnClickListener) */ public IgnoreRequireHashCodeViewModel_ clickListener( @NonNull View.OnClickListener clickListener) { if (clickListener == null) { throw new IllegalArgumentException("clickListener cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.clickListener_OnClickListener = clickListener; return this; } @NonNull public View.OnClickListener clickListener() { return clickListener_OnClickListener; } @Override public IgnoreRequireHashCodeViewModel_ id(long id) { super.id(id); return this; } @Override public IgnoreRequireHashCodeViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public IgnoreRequireHashCodeViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public IgnoreRequireHashCodeViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public IgnoreRequireHashCodeViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public IgnoreRequireHashCodeViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public IgnoreRequireHashCodeViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public IgnoreRequireHashCodeViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public IgnoreRequireHashCodeViewModel_ show() { super.show(); return this; } @Override public IgnoreRequireHashCodeViewModel_ show(boolean show) { super.show(show); return this; } @Override public IgnoreRequireHashCodeViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public IgnoreRequireHashCodeViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.clickListener_OnClickListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof IgnoreRequireHashCodeViewModel_)) { return false; } if (!super.equals(o)) { return false; } IgnoreRequireHashCodeViewModel_ that = (IgnoreRequireHashCodeViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((clickListener_OnClickListener != null ? !clickListener_OnClickListener.equals(that.clickListener_OnClickListener) : that.clickListener_OnClickListener != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (clickListener_OnClickListener != null ? clickListener_OnClickListener.hashCode() : 0); return _result; } @Override public String toString() { return "IgnoreRequireHashCodeViewModel_{" + "clickListener_OnClickListener=" + clickListener_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,592
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/Prop_throwsIfStatic.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class Prop_throwsIfStatic extends View { public Prop_throwsIfStatic(Context context) { super(context); } @ModelProp public static void setTitle(CharSequence title) { } }
8,593
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestStringOverloadsViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.PluralsRes; import androidx.annotation.StringRes; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; import java.util.List; /** * Generated file. Do not modify! */ public class TestStringOverloadsViewModel_ extends EpoxyModel<TestStringOverloadsView> implements GeneratedModel<TestStringOverloadsView>, TestStringOverloadsViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(3); private OnModelBoundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ private StringAttributeData title_StringAttributeData = new StringAttributeData(); /** * Bitset index: 1 */ @Nullable private List<CharSequence> title_List = (List<CharSequence>) null; /** * Bitset index: 2 */ private StringAttributeData titleViaValueShortcut_StringAttributeData = new StringAttributeData(); @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(2)) { throw new IllegalStateException("A value is required for setTitleViaValueShortcut"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestStringOverloadsView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestStringOverloadsView object) { super.bind(object); object.setTitleViaValueShortcut(titleViaValueShortcut_StringAttributeData.toString(object.getContext())); if (assignedAttributes_epoxyGeneratedModel.get(0)) { object.setTitle(title_StringAttributeData.toString(object.getContext())); } else if (assignedAttributes_epoxyGeneratedModel.get(1)) { object.setTitle(title_List); } else { object.setTitle(title_List); } } @Override public void bind(final TestStringOverloadsView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestStringOverloadsViewModel_)) { bind(object); return; } TestStringOverloadsViewModel_ that = (TestStringOverloadsViewModel_) previousModel; super.bind(object); if ((titleViaValueShortcut_StringAttributeData != null ? !titleViaValueShortcut_StringAttributeData.equals(that.titleViaValueShortcut_StringAttributeData) : that.titleViaValueShortcut_StringAttributeData != null)) { object.setTitleViaValueShortcut(titleViaValueShortcut_StringAttributeData.toString(object.getContext())); } if (assignedAttributes_epoxyGeneratedModel.get(0)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(0) || (title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { object.setTitle(title_StringAttributeData.toString(object.getContext())); } } else if (assignedAttributes_epoxyGeneratedModel.get(1)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(1) || (title_List != null ? !title_List.equals(that.title_List) : that.title_List != null)) { object.setTitle(title_List); } } // A value was not set so we should use the default value, but we only need to set it if the previous model had a custom value set. else if (that.assignedAttributes_epoxyGeneratedModel.get(0) || that.assignedAttributes_epoxyGeneratedModel.get(1)) { object.setTitle(title_List); } } @Override public void handlePostBind(final TestStringOverloadsView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestStringOverloadsViewModel_ onBind( OnModelBoundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestStringOverloadsView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestStringOverloadsViewModel_ onUnbind( OnModelUnboundListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestStringOverloadsView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestStringOverloadsViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestStringOverloadsView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestStringOverloadsViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestStringOverloadsViewModel_, TestStringOverloadsView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public CharSequence titleStringAttributeData(Context context) { return title_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TestStringOverloadsView#setTitle(CharSequence) */ public TestStringOverloadsViewModel_ title(@NonNull CharSequence title) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); if (title == null) { throw new IllegalArgumentException("title cannot be null"); } title_StringAttributeData.setValue(title); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestStringOverloadsView#setTitle(CharSequence) */ public TestStringOverloadsViewModel_ title(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); title_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestStringOverloadsView#setTitle(CharSequence) */ public TestStringOverloadsViewModel_ title(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); title_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestStringOverloadsView#setTitle(CharSequence) */ public TestStringOverloadsViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); title_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } /** * <i>Optional</i>: Default value is (List<CharSequence>) null * * @see TestStringOverloadsView#setTitle(List<CharSequence>) */ public TestStringOverloadsViewModel_ title(@Nullable List<CharSequence> title) { assignedAttributes_epoxyGeneratedModel.set(1); assignedAttributes_epoxyGeneratedModel.clear(0); this.title_StringAttributeData = new StringAttributeData(); onMutation(); this.title_List = title; return this; } @Nullable public List<CharSequence> titleList() { return title_List; } public CharSequence getTitleViaValueShortcut(Context context) { return titleViaValueShortcut_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence) */ public TestStringOverloadsViewModel_ titleViaValueShortcut( @NonNull CharSequence titleViaValueShortcut) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(2); if (titleViaValueShortcut == null) { throw new IllegalArgumentException("titleViaValueShortcut cannot be null"); } titleViaValueShortcut_StringAttributeData.setValue(titleViaValueShortcut); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence) */ public TestStringOverloadsViewModel_ titleViaValueShortcut(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(2); titleViaValueShortcut_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence) */ public TestStringOverloadsViewModel_ titleViaValueShortcut(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(2); titleViaValueShortcut_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestStringOverloadsView#setTitleViaValueShortcut(CharSequence) */ public TestStringOverloadsViewModel_ titleViaValueShortcutQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(2); titleViaValueShortcut_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TestStringOverloadsViewModel_ id(long id) { super.id(id); return this; } @Override public TestStringOverloadsViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestStringOverloadsViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestStringOverloadsViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestStringOverloadsViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestStringOverloadsViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestStringOverloadsViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public TestStringOverloadsViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestStringOverloadsViewModel_ show() { super.show(); return this; } @Override public TestStringOverloadsViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestStringOverloadsViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TestStringOverloadsViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.title_StringAttributeData = new StringAttributeData(); this.title_List = (List<CharSequence>) null; this.titleViaValueShortcut_StringAttributeData = new StringAttributeData(); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestStringOverloadsViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestStringOverloadsViewModel_ that = (TestStringOverloadsViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { return false; } if ((title_List != null ? !title_List.equals(that.title_List) : that.title_List != null)) { return false; } if ((titleViaValueShortcut_StringAttributeData != null ? !titleViaValueShortcut_StringAttributeData.equals(that.titleViaValueShortcut_StringAttributeData) : that.titleViaValueShortcut_StringAttributeData != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0); _result = 31 * _result + (title_List != null ? title_List.hashCode() : 0); _result = 31 * _result + (titleViaValueShortcut_StringAttributeData != null ? titleViaValueShortcut_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TestStringOverloadsViewModel_{" + "title_StringAttributeData=" + title_StringAttributeData + ", title_List=" + title_List + ", titleViaValueShortcut_StringAttributeData=" + titleViaValueShortcut_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,594
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DoNotHashViewModel_.java
package com.airbnb.epoxy; import android.view.View; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.BitSet; /** * Generated file. Do not modify! */ public class DoNotHashViewModel_ extends EpoxyModel<DoNotHashView> implements GeneratedModel<DoNotHashView>, DoNotHashViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(3); private OnModelBoundListener<DoNotHashViewModel_, DoNotHashView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<DoNotHashViewModel_, DoNotHashView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<DoNotHashViewModel_, DoNotHashView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<DoNotHashViewModel_, DoNotHashView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private CharSequence title_CharSequence; /** * Bitset index: 1 */ @NonNull private View.OnClickListener clickListener_OnClickListener; /** * Bitset index: 2 */ @NonNull private CharSequence normalProp_CharSequence; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(1)) { throw new IllegalStateException("A value is required for setClickListener"); } if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setTitle"); } if (!assignedAttributes_epoxyGeneratedModel.get(2)) { throw new IllegalStateException("A value is required for normalProp"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final DoNotHashView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final DoNotHashView object) { super.bind(object); object.setClickListener(clickListener_OnClickListener); object.setTitle(title_CharSequence); object.normalProp(normalProp_CharSequence); } @Override public void bind(final DoNotHashView object, EpoxyModel previousModel) { if (!(previousModel instanceof DoNotHashViewModel_)) { bind(object); return; } DoNotHashViewModel_ that = (DoNotHashViewModel_) previousModel; super.bind(object); if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) { object.setClickListener(clickListener_OnClickListener); } if (((title_CharSequence == null) != (that.title_CharSequence == null))) { object.setTitle(title_CharSequence); } if ((normalProp_CharSequence != null ? !normalProp_CharSequence.equals(that.normalProp_CharSequence) : that.normalProp_CharSequence != null)) { object.normalProp(normalProp_CharSequence); } } @Override public void handlePostBind(final DoNotHashView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public DoNotHashViewModel_ onBind( OnModelBoundListener<DoNotHashViewModel_, DoNotHashView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(DoNotHashView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public DoNotHashViewModel_ onUnbind( OnModelUnboundListener<DoNotHashViewModel_, DoNotHashView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final DoNotHashView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public DoNotHashViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<DoNotHashViewModel_, DoNotHashView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final DoNotHashView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public DoNotHashViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<DoNotHashViewModel_, DoNotHashView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see DoNotHashView#setTitle(CharSequence) */ public DoNotHashViewModel_ title(@NonNull CharSequence title) { if (title == null) { throw new IllegalArgumentException("title cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.title_CharSequence = title; return this; } @NonNull public CharSequence title() { return title_CharSequence; } /** * Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set */ public DoNotHashViewModel_ clickListener( @NonNull final OnModelClickListener<DoNotHashViewModel_, DoNotHashView> clickListener) { assignedAttributes_epoxyGeneratedModel.set(1); onMutation(); if (clickListener == null) { this.clickListener_OnClickListener = null; } else { this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener); } return this; } /** * <i>Required.</i> * * @see DoNotHashView#setClickListener(View.OnClickListener) */ public DoNotHashViewModel_ clickListener(@NonNull View.OnClickListener clickListener) { if (clickListener == null) { throw new IllegalArgumentException("clickListener cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(1); onMutation(); this.clickListener_OnClickListener = clickListener; return this; } @NonNull public View.OnClickListener clickListener() { return clickListener_OnClickListener; } /** * <i>Required.</i> * * @see DoNotHashView#normalProp(CharSequence) */ public DoNotHashViewModel_ normalProp(@NonNull CharSequence normalProp) { if (normalProp == null) { throw new IllegalArgumentException("normalProp cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(2); onMutation(); this.normalProp_CharSequence = normalProp; return this; } @NonNull public CharSequence normalProp() { return normalProp_CharSequence; } @Override public DoNotHashViewModel_ id(long id) { super.id(id); return this; } @Override public DoNotHashViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public DoNotHashViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public DoNotHashViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public DoNotHashViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public DoNotHashViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public DoNotHashViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public DoNotHashViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public DoNotHashViewModel_ show() { super.show(); return this; } @Override public DoNotHashViewModel_ show(boolean show) { super.show(show); return this; } @Override public DoNotHashViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public DoNotHashViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.title_CharSequence = null; this.clickListener_OnClickListener = null; this.normalProp_CharSequence = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof DoNotHashViewModel_)) { return false; } if (!super.equals(o)) { return false; } DoNotHashViewModel_ that = (DoNotHashViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if (((title_CharSequence == null) != (that.title_CharSequence == null))) { return false; } if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) { return false; } if ((normalProp_CharSequence != null ? !normalProp_CharSequence.equals(that.normalProp_CharSequence) : that.normalProp_CharSequence != null)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (title_CharSequence != null ? 1 : 0); _result = 31 * _result + (clickListener_OnClickListener != null ? 1 : 0); _result = 31 * _result + (normalProp_CharSequence != null ? normalProp_CharSequence.hashCode() : 0); return _result; } @Override public String toString() { return "DoNotHashViewModel_{" + "title_CharSequence=" + title_CharSequence + ", clickListener_OnClickListener=" + clickListener_OnClickListener + ", normalProp_CharSequence=" + normalProp_CharSequence + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,595
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropModelPropViewModel_.java
package com.airbnb.epoxy; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; /** * Generated file. Do not modify! */ public class TestFieldPropModelPropViewModel_ extends EpoxyModel<TestFieldPropModelPropView> implements GeneratedModel<TestFieldPropModelPropView>, TestFieldPropModelPropViewModelBuilder { private OnModelBoundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> onModelVisibilityChangedListener_epoxyGeneratedModel; private int value_Int = 0; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public TestFieldPropModelPropView buildView(ViewGroup parent) { TestFieldPropModelPropView v = new TestFieldPropModelPropView(parent.getContext()); v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT)); return v; } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestFieldPropModelPropView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropModelPropView object) { super.bind(object); object.value = value_Int; } @Override public void bind(final TestFieldPropModelPropView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropModelPropViewModel_)) { bind(object); return; } TestFieldPropModelPropViewModel_ that = (TestFieldPropModelPropViewModel_) previousModel; super.bind(object); if ((value_Int != that.value_Int)) { object.value = value_Int; } } @Override public void handlePostBind(final TestFieldPropModelPropView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); object.call(); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestFieldPropModelPropViewModel_ onBind( OnModelBoundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropModelPropView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestFieldPropModelPropViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropModelPropView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestFieldPropModelPropViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropModelPropView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestFieldPropModelPropViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropModelPropViewModel_, TestFieldPropModelPropView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is 0 * * @see TestFieldPropModelPropView#value */ public TestFieldPropModelPropViewModel_ value(int value) { onMutation(); this.value_Int = value; return this; } public int value() { return value_Int; } @Override public TestFieldPropModelPropViewModel_ id(long id) { super.id(id); return this; } @Override public TestFieldPropModelPropViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestFieldPropModelPropViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestFieldPropModelPropViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestFieldPropModelPropViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestFieldPropModelPropViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestFieldPropModelPropViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropModelPropViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestFieldPropModelPropViewModel_ show() { super.show(); return this; } @Override public TestFieldPropModelPropViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestFieldPropModelPropViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropModelPropViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.value_Int = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropModelPropViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropModelPropViewModel_ that = (TestFieldPropModelPropViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value_Int != that.value_Int)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value_Int; return _result; } @Override public String toString() { return "TestFieldPropModelPropViewModel_{" + "value_Int=" + value_Int + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,596
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelReturningClassType_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.List; /** * Generated file. Do not modify! */ public class ModelReturningClassType_ extends ModelReturningClassType implements GeneratedModel<Object>, ModelReturningClassTypeBuilder { private OnModelBoundListener<ModelReturningClassType_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelReturningClassType_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelReturningClassType_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelReturningClassType_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelReturningClassType_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelReturningClassType_ onBind( OnModelBoundListener<ModelReturningClassType_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelReturningClassType_ onUnbind( OnModelUnboundListener<ModelReturningClassType_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelReturningClassType_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelReturningClassType_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelReturningClassType_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelReturningClassType_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelReturningClassType_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public ModelReturningClassType_ classType(int classType) { super.classType(classType); return this; } @Override public ModelReturningClassType_ classType(int param1, int param2) { super.classType(param1, param2); return this; } @Override public ModelReturningClassType_ list(List<String> list) { super.list(list); return this; } @Override public ModelReturningClassType_ id(long id) { super.id(id); return this; } @Override public ModelReturningClassType_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelReturningClassType_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelReturningClassType_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelReturningClassType_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelReturningClassType_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelReturningClassType_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelReturningClassType_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelReturningClassType_ show() { super.show(); return this; } @Override public ModelReturningClassType_ show(boolean show) { super.show(show); return this; } @Override public ModelReturningClassType_ hide() { super.hide(); return this; } @Override public ModelReturningClassType_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelReturningClassType_)) { return false; } if (!super.equals(o)) { return false; } ModelReturningClassType_ that = (ModelReturningClassType_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if ((value != that.value)) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + value; return _result; } @Override public String toString() { return "ModelReturningClassType_{" + "value=" + value + "}" + super.toString(); } }
8,597
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropDoNotHashOptionViewModel_.java
package com.airbnb.epoxy; import android.view.View; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; import java.util.BitSet; /** * Generated file. Do not modify! */ public class TestFieldPropDoNotHashOptionViewModel_ extends EpoxyModel<TestFieldPropDoNotHashOptionView> implements GeneratedModel<TestFieldPropDoNotHashOptionView>, TestFieldPropDoNotHashOptionViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private View.OnClickListener value_OnClickListener; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for value"); } } @Override protected int getViewType() { return 0; } @Override public TestFieldPropDoNotHashOptionView buildView(ViewGroup parent) { TestFieldPropDoNotHashOptionView v = new TestFieldPropDoNotHashOptionView(parent.getContext()); v.setLayoutParams(new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.WRAP_CONTENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT)); return v; } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestFieldPropDoNotHashOptionView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropDoNotHashOptionView object) { super.bind(object); object.value = value_OnClickListener; } @Override public void bind(final TestFieldPropDoNotHashOptionView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropDoNotHashOptionViewModel_)) { bind(object); return; } TestFieldPropDoNotHashOptionViewModel_ that = (TestFieldPropDoNotHashOptionViewModel_) previousModel; super.bind(object); if (((value_OnClickListener == null) != (that.value_OnClickListener == null))) { object.value = value_OnClickListener; } } @Override public void handlePostBind(final TestFieldPropDoNotHashOptionView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); object.call(); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestFieldPropDoNotHashOptionViewModel_ onBind( OnModelBoundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropDoNotHashOptionView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public TestFieldPropDoNotHashOptionViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropDoNotHashOptionView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestFieldPropDoNotHashOptionViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropDoNotHashOptionView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public TestFieldPropDoNotHashOptionViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * Set a click listener that will provide the parent view, model, and adapter position of the clicked view. This will clear the normal View.OnClickListener if one has been set */ public TestFieldPropDoNotHashOptionViewModel_ value( @NonNull final OnModelClickListener<TestFieldPropDoNotHashOptionViewModel_, TestFieldPropDoNotHashOptionView> value) { assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); if (value == null) { this.value_OnClickListener = null; } else { this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value); } return this; } /** * <i>Required.</i> * * @see TestFieldPropDoNotHashOptionView#value */ public TestFieldPropDoNotHashOptionViewModel_ value(@NonNull View.OnClickListener value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.value_OnClickListener = value; return this; } @NonNull public View.OnClickListener value() { return value_OnClickListener; } @Override public TestFieldPropDoNotHashOptionViewModel_ id(long id) { super.id(id); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropDoNotHashOptionViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ show() { super.show(); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestFieldPropDoNotHashOptionViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropDoNotHashOptionViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.value_OnClickListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropDoNotHashOptionViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropDoNotHashOptionViewModel_ that = (TestFieldPropDoNotHashOptionViewModel_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } if (((value_OnClickListener == null) != (that.value_OnClickListener == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (value_OnClickListener != null ? 1 : 0); return _result; } @Override public String toString() { return "TestFieldPropDoNotHashOptionViewModel_{" + "value_OnClickListener=" + value_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,598
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAbstractClassAndAnnotation_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ModelWithAbstractClassAndAnnotation_ extends ModelWithAbstractClassAndAnnotation implements GeneratedModel<Object>, ModelWithAbstractClassAndAnnotationBuilder { private OnModelBoundListener<ModelWithAbstractClassAndAnnotation_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAbstractClassAndAnnotation_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAbstractClassAndAnnotation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAbstractClassAndAnnotation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAbstractClassAndAnnotation_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Object object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); } /** * Register a listener that will be called when this model is bound to a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithAbstractClassAndAnnotation_ onBind( OnModelBoundListener<ModelWithAbstractClassAndAnnotation_, Object> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Object object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } } /** * Register a listener that will be called when this model is unbound from a view. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. * <p> * You may clear the listener by setting a null value, or by calling {@link #reset()} */ public ModelWithAbstractClassAndAnnotation_ onUnbind( OnModelUnboundListener<ModelWithAbstractClassAndAnnotation_, Object> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Object object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } super.onVisibilityStateChanged(visibilityState, object); } /** * Register a listener that will be called when this model visibility state has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithAbstractClassAndAnnotation_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAbstractClassAndAnnotation_, Object> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Object object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } super.onVisibilityChanged(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth, object); } /** * Register a listener that will be called when this model visibility has changed. * <p> * The listener will contribute to this model's hashCode state per the {@link * com.airbnb.epoxy.EpoxyAttribute.Option#DoNotHash} rules. */ public ModelWithAbstractClassAndAnnotation_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAbstractClassAndAnnotation_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public ModelWithAbstractClassAndAnnotation_ id(long id) { super.id(id); return this; } @Override public ModelWithAbstractClassAndAnnotation_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithAbstractClassAndAnnotation_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithAbstractClassAndAnnotation_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithAbstractClassAndAnnotation_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithAbstractClassAndAnnotation_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithAbstractClassAndAnnotation_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithAbstractClassAndAnnotation_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithAbstractClassAndAnnotation_ show() { super.show(); return this; } @Override public ModelWithAbstractClassAndAnnotation_ show(boolean show) { super.show(show); return this; } @Override public ModelWithAbstractClassAndAnnotation_ hide() { super.hide(); return this; } @Override public ModelWithAbstractClassAndAnnotation_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithAbstractClassAndAnnotation_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAbstractClassAndAnnotation_ that = (ModelWithAbstractClassAndAnnotation_) o; if (((onModelBoundListener_epoxyGeneratedModel == null) != (that.onModelBoundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelUnboundListener_epoxyGeneratedModel == null) != (that.onModelUnboundListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityStateChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityStateChangedListener_epoxyGeneratedModel == null))) { return false; } if (((onModelVisibilityChangedListener_epoxyGeneratedModel == null) != (that.onModelVisibilityChangedListener_epoxyGeneratedModel == null))) { return false; } return true; } @Override public int hashCode() { int _result = super.hashCode(); _result = 31 * _result + (onModelBoundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelUnboundListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null ? 1 : 0); _result = 31 * _result + (onModelVisibilityChangedListener_epoxyGeneratedModel != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithAbstractClassAndAnnotation_{" + "}" + super.toString(); } }
8,599