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/ModelWithFieldAnnotation_.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 ModelWithFieldAnnotation_ extends ModelWithFieldAnnotation implements GeneratedModel<Object>, ModelWithFieldAnnotationBuilder { private OnModelBoundListener<ModelWithFieldAnnotation_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithFieldAnnotation_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithFieldAnnotation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithFieldAnnotation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithFieldAnnotation_() { 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 ModelWithFieldAnnotation_ onBind( OnModelBoundListener<ModelWithFieldAnnotation_, 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 ModelWithFieldAnnotation_ onUnbind( OnModelUnboundListener<ModelWithFieldAnnotation_, 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 ModelWithFieldAnnotation_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithFieldAnnotation_, 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 ModelWithFieldAnnotation_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithFieldAnnotation_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithFieldAnnotation_ title(@Nullable String title) { onMutation(); super.title = title; return this; } @Nullable public String title() { return title; } @Override public ModelWithFieldAnnotation_ id(long id) { super.id(id); return this; } @Override public ModelWithFieldAnnotation_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithFieldAnnotation_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithFieldAnnotation_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithFieldAnnotation_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithFieldAnnotation_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithFieldAnnotation_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithFieldAnnotation_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithFieldAnnotation_ show() { super.show(); return this; } @Override public ModelWithFieldAnnotation_ show(boolean show) { super.show(show); return this; } @Override public ModelWithFieldAnnotation_ hide() { super.hide(); return this; } @Override public ModelWithFieldAnnotation_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.title = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithFieldAnnotation_)) { return false; } if (!super.equals(o)) { return false; } ModelWithFieldAnnotation_ that = (ModelWithFieldAnnotation_) 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 != null ? !title.equals(that.title) : that.title != 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 != null ? title.hashCode() : 0); return _result; } @Override public String toString() { return "ModelWithFieldAnnotation_{" + "title=" + title + "}" + super.toString(); } }
8,600
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DataBindingModelWithAllFieldTypes_.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.IllegalStateException; 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 DataBindingModelWithAllFieldTypes_ extends DataBindingModelWithAllFieldTypes implements GeneratedModel<DataBindingEpoxyModel.DataBindingHolder>, DataBindingModelWithAllFieldTypesBuilder { private OnModelBoundListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityChangedListener_epoxyGeneratedModel; public DataBindingModelWithAllFieldTypes_() { super(); } @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 DataBindingModelWithAllFieldTypes_ onBind( OnModelBoundListener<DataBindingModelWithAllFieldTypes_, 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 DataBindingModelWithAllFieldTypes_ onUnbind( OnModelUnboundListener<DataBindingModelWithAllFieldTypes_, 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 DataBindingModelWithAllFieldTypes_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<DataBindingModelWithAllFieldTypes_, 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 DataBindingModelWithAllFieldTypes_ onVisibilityChanged( OnModelVisibilityChangedListener<DataBindingModelWithAllFieldTypes_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public DataBindingModelWithAllFieldTypes_ valueInt(int valueInt) { onMutation(); super.valueInt = valueInt; return this; } public int valueInt() { return valueInt; } public DataBindingModelWithAllFieldTypes_ valueInteger(Integer valueInteger) { onMutation(); super.valueInteger = valueInteger; return this; } public Integer valueInteger() { return valueInteger; } public DataBindingModelWithAllFieldTypes_ valueShort(short valueShort) { onMutation(); super.valueShort = valueShort; return this; } public short valueShort() { return valueShort; } public DataBindingModelWithAllFieldTypes_ valueShortWrapper(Short valueShortWrapper) { onMutation(); super.valueShortWrapper = valueShortWrapper; return this; } public Short valueShortWrapper() { return valueShortWrapper; } public DataBindingModelWithAllFieldTypes_ valueChar(char valueChar) { onMutation(); super.valueChar = valueChar; return this; } public char valueChar() { return valueChar; } public DataBindingModelWithAllFieldTypes_ valueCharacter(Character valueCharacter) { onMutation(); super.valueCharacter = valueCharacter; return this; } public Character valueCharacter() { return valueCharacter; } public DataBindingModelWithAllFieldTypes_ valuebByte(byte valuebByte) { onMutation(); super.valuebByte = valuebByte; return this; } public byte valuebByte() { return valuebByte; } public DataBindingModelWithAllFieldTypes_ valueByteWrapper(Byte valueByteWrapper) { onMutation(); super.valueByteWrapper = valueByteWrapper; return this; } public Byte valueByteWrapper() { return valueByteWrapper; } public DataBindingModelWithAllFieldTypes_ valueLong(long valueLong) { onMutation(); super.valueLong = valueLong; return this; } public long valueLong() { return valueLong; } public DataBindingModelWithAllFieldTypes_ valueLongWrapper(Long valueLongWrapper) { onMutation(); super.valueLongWrapper = valueLongWrapper; return this; } public Long valueLongWrapper() { return valueLongWrapper; } public DataBindingModelWithAllFieldTypes_ valueDouble(double valueDouble) { onMutation(); super.valueDouble = valueDouble; return this; } public double valueDouble() { return valueDouble; } public DataBindingModelWithAllFieldTypes_ valueDoubleWrapper(Double valueDoubleWrapper) { onMutation(); super.valueDoubleWrapper = valueDoubleWrapper; return this; } public Double valueDoubleWrapper() { return valueDoubleWrapper; } public DataBindingModelWithAllFieldTypes_ valueFloat(float valueFloat) { onMutation(); super.valueFloat = valueFloat; return this; } public float valueFloat() { return valueFloat; } public DataBindingModelWithAllFieldTypes_ valueFloatWrapper(Float valueFloatWrapper) { onMutation(); super.valueFloatWrapper = valueFloatWrapper; return this; } public Float valueFloatWrapper() { return valueFloatWrapper; } public DataBindingModelWithAllFieldTypes_ valueBoolean(boolean valueBoolean) { onMutation(); super.valueBoolean = valueBoolean; return this; } public boolean valueBoolean() { return valueBoolean; } public DataBindingModelWithAllFieldTypes_ valueBooleanWrapper(Boolean valueBooleanWrapper) { onMutation(); super.valueBooleanWrapper = valueBooleanWrapper; return this; } public Boolean valueBooleanWrapper() { return valueBooleanWrapper; } public DataBindingModelWithAllFieldTypes_ valueIntArray(int[] valueIntArray) { onMutation(); super.valueIntArray = valueIntArray; return this; } public int[] valueIntArray() { return valueIntArray; } public DataBindingModelWithAllFieldTypes_ valueObjectArray(Object[] valueObjectArray) { onMutation(); super.valueObjectArray = valueObjectArray; return this; } public Object[] valueObjectArray() { return valueObjectArray; } public DataBindingModelWithAllFieldTypes_ valueString(String valueString) { onMutation(); super.valueString = valueString; return this; } public String valueString() { return valueString; } public DataBindingModelWithAllFieldTypes_ valueObject(Object valueObject) { onMutation(); super.valueObject = valueObject; return this; } public Object valueObject() { return valueObject; } public DataBindingModelWithAllFieldTypes_ valueList(List<String> valueList) { onMutation(); super.valueList = valueList; return this; } public List<String> valueList() { return valueList; } @Override public DataBindingModelWithAllFieldTypes_ id(long id) { super.id(id); return this; } @Override public DataBindingModelWithAllFieldTypes_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public DataBindingModelWithAllFieldTypes_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public DataBindingModelWithAllFieldTypes_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public DataBindingModelWithAllFieldTypes_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public DataBindingModelWithAllFieldTypes_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public DataBindingModelWithAllFieldTypes_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public DataBindingModelWithAllFieldTypes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public DataBindingModelWithAllFieldTypes_ show() { super.show(); return this; } @Override public DataBindingModelWithAllFieldTypes_ show(boolean show) { super.show(show); return this; } @Override public DataBindingModelWithAllFieldTypes_ hide() { super.hide(); return this; } @Override protected void setDataBindingVariables(ViewDataBinding binding) { if (!binding.setVariable(BR.valueInt, valueInt)) { throw new IllegalStateException("The attribute valueInt was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueInteger, valueInteger)) { throw new IllegalStateException("The attribute valueInteger was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueShort, valueShort)) { throw new IllegalStateException("The attribute valueShort was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueShortWrapper, valueShortWrapper)) { throw new IllegalStateException("The attribute valueShortWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueChar, valueChar)) { throw new IllegalStateException("The attribute valueChar was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueCharacter, valueCharacter)) { throw new IllegalStateException("The attribute valueCharacter was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valuebByte, valuebByte)) { throw new IllegalStateException("The attribute valuebByte was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueByteWrapper, valueByteWrapper)) { throw new IllegalStateException("The attribute valueByteWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueLong, valueLong)) { throw new IllegalStateException("The attribute valueLong was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueLongWrapper, valueLongWrapper)) { throw new IllegalStateException("The attribute valueLongWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueDouble, valueDouble)) { throw new IllegalStateException("The attribute valueDouble was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueDoubleWrapper, valueDoubleWrapper)) { throw new IllegalStateException("The attribute valueDoubleWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueFloat, valueFloat)) { throw new IllegalStateException("The attribute valueFloat was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueFloatWrapper, valueFloatWrapper)) { throw new IllegalStateException("The attribute valueFloatWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueBoolean, valueBoolean)) { throw new IllegalStateException("The attribute valueBoolean was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueBooleanWrapper, valueBooleanWrapper)) { throw new IllegalStateException("The attribute valueBooleanWrapper was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueIntArray, valueIntArray)) { throw new IllegalStateException("The attribute valueIntArray was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueObjectArray, valueObjectArray)) { throw new IllegalStateException("The attribute valueObjectArray was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueString, valueString)) { throw new IllegalStateException("The attribute valueString was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueObject, valueObject)) { throw new IllegalStateException("The attribute valueObject was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } if (!binding.setVariable(BR.valueList, valueList)) { throw new IllegalStateException("The attribute valueList was defined in your data binding model (com.airbnb.epoxy.DataBindingModelWithAllFieldTypes) but a data variable of that name was not found in the layout."); } } @Override protected void setDataBindingVariables(ViewDataBinding binding, EpoxyModel previousModel) { if (!(previousModel instanceof DataBindingModelWithAllFieldTypes_)) { setDataBindingVariables(binding); return; } DataBindingModelWithAllFieldTypes_ that = (DataBindingModelWithAllFieldTypes_) 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 DataBindingModelWithAllFieldTypes_ 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 DataBindingModelWithAllFieldTypes_)) { return false; } if (!super.equals(o)) { return false; } DataBindingModelWithAllFieldTypes_ that = (DataBindingModelWithAllFieldTypes_) 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 "DataBindingModelWithAllFieldTypes_{" + "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,601
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoLayoutModelViewModel_.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 AutoLayoutModelViewModel_ extends EpoxyModel<AutoLayoutModelView> implements GeneratedModel<AutoLayoutModelView>, AutoLayoutModelViewModelBuilder { private OnModelBoundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> 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 AutoLayoutModelView buildView(ViewGroup parent) { AutoLayoutModelView v = new AutoLayoutModelView(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 AutoLayoutModelView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final AutoLayoutModelView object) { super.bind(object); object.setValue(value_Int); } @Override public void bind(final AutoLayoutModelView object, EpoxyModel previousModel) { if (!(previousModel instanceof AutoLayoutModelViewModel_)) { bind(object); return; } AutoLayoutModelViewModel_ that = (AutoLayoutModelViewModel_) previousModel; super.bind(object); if ((value_Int != that.value_Int)) { object.setValue(value_Int); } } @Override public void handlePostBind(final AutoLayoutModelView 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 AutoLayoutModelViewModel_ onBind( OnModelBoundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(AutoLayoutModelView 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 AutoLayoutModelViewModel_ onUnbind( OnModelUnboundListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final AutoLayoutModelView 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 AutoLayoutModelViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final AutoLayoutModelView 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 AutoLayoutModelViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<AutoLayoutModelViewModel_, AutoLayoutModelView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is 0 * * @see AutoLayoutModelView#setValue(int) */ public AutoLayoutModelViewModel_ value(int value) { onMutation(); this.value_Int = value; return this; } public int value() { return value_Int; } @Override public AutoLayoutModelViewModel_ id(long id) { super.id(id); return this; } @Override public AutoLayoutModelViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public AutoLayoutModelViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public AutoLayoutModelViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public AutoLayoutModelViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public AutoLayoutModelViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public AutoLayoutModelViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public AutoLayoutModelViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public AutoLayoutModelViewModel_ show() { super.show(); return this; } @Override public AutoLayoutModelViewModel_ show(boolean show) { super.show(show); return this; } @Override public AutoLayoutModelViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public AutoLayoutModelViewModel_ 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 AutoLayoutModelViewModel_)) { return false; } if (!super.equals(o)) { return false; } AutoLayoutModelViewModel_ that = (AutoLayoutModelViewModel_) 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 "AutoLayoutModelViewModel_{" + "value_Int=" + value_Int + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,602
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoLayoutModelViewMatchParent.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 AutoLayoutModelViewMatchParent extends View { public AutoLayoutModelViewMatchParent(Context context) { super(context); } @ModelProp void setValue(int value) { } }
8,603
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestManyTypesViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import androidx.annotation.Dimension; import androidx.annotation.IntRange; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.PluralsRes; import androidx.annotation.StringRes; import java.lang.Boolean; import java.lang.CharSequence; import java.lang.IllegalArgumentException; import java.lang.IllegalStateException; import java.lang.Integer; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.util.Arrays; import java.util.BitSet; import java.util.List; import java.util.Map; import kotlin.jvm.functions.Function3; /** * Generated file. Do not modify! */ public class TestManyTypesViewModel_ extends EpoxyModel<TestManyTypesView> implements GeneratedModel<TestManyTypesView>, TestManyTypesViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(17); private OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String stringValue_String; @Nullable private String nullableStringValue_String = (String) null; /** * Bitset index: 2 */ @NonNull private Function3<Integer, Integer, Integer, Integer> function_Function3; private int intValue_Int = 0; @StringRes private int intValueWithAnnotation_Int = 0; @IntRange( from = 0, to = 200 ) private int intValueWithRangeAnnotation_Int = 0; @Dimension( unit = 0 ) private int intValueWithDimenTypeAnnotation_Int = 0; @IntRange( from = 0, to = 200 ) @Dimension( unit = 0 ) private int intWithMultipleAnnotations_Int = 0; /** * Bitset index: 8 */ @NonNull private Integer integerValue_Integer; private boolean boolValue_Boolean = false; /** * Bitset index: 10 */ @NonNull private List<? extends EpoxyModel<?>> models_List; /** * Bitset index: 11 */ @NonNull private Boolean booleanValue_Boolean; /** * Bitset index: 12 */ @NonNull private String[] arrayValue_StringArray; /** * Bitset index: 13 */ @NonNull private List<String> listValue_List; /** * Bitset index: 14 */ @NonNull private Map<Integer, Integer> mapValue_Map; /** * Bitset index: 15 */ @NonNull private View.OnClickListener clickListener_OnClickListener; private StringAttributeData title_StringAttributeData = new StringAttributeData((CharSequence) null); @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(14)) { throw new IllegalStateException("A value is required for setMapValue"); } if (!assignedAttributes_epoxyGeneratedModel.get(12)) { throw new IllegalStateException("A value is required for setArrayValue"); } if (!assignedAttributes_epoxyGeneratedModel.get(15)) { throw new IllegalStateException("A value is required for setClickListener"); } if (!assignedAttributes_epoxyGeneratedModel.get(11)) { throw new IllegalStateException("A value is required for setBooleanValue"); } if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for setStringValue"); } if (!assignedAttributes_epoxyGeneratedModel.get(8)) { throw new IllegalStateException("A value is required for setIntegerValue"); } if (!assignedAttributes_epoxyGeneratedModel.get(13)) { throw new IllegalStateException("A value is required for setListValue"); } if (!assignedAttributes_epoxyGeneratedModel.get(2)) { throw new IllegalStateException("A value is required for setFunction"); } if (!assignedAttributes_epoxyGeneratedModel.get(10)) { throw new IllegalStateException("A value is required for setModels"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestManyTypesView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestManyTypesView object) { super.bind(object); object.setMapValue(mapValue_Map); object.setArrayValue(arrayValue_StringArray); object.setClickListener(clickListener_OnClickListener); object.setBooleanValue(booleanValue_Boolean); object.setTitle(title_StringAttributeData.toString(object.getContext())); object.setStringValue(stringValue_String); object.setNullableStringValue(nullableStringValue_String); object.setIntValueWithAnnotation(intValueWithAnnotation_Int); object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int); object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int); object.setIntegerValue(integerValue_Integer); object.setListValue(listValue_List); object.setIntValue(intValue_Int); object.setFunction(function_Function3); object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int); object.setBoolValue(boolValue_Boolean); object.setModels(models_List); } @Override public void bind(final TestManyTypesView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestManyTypesViewModel_)) { bind(object); return; } TestManyTypesViewModel_ that = (TestManyTypesViewModel_) previousModel; super.bind(object); if ((mapValue_Map != null ? !mapValue_Map.equals(that.mapValue_Map) : that.mapValue_Map != null)) { object.setMapValue(mapValue_Map); } if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) { object.setArrayValue(arrayValue_StringArray); } if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == null))) { object.setClickListener(clickListener_OnClickListener); } if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) { object.setBooleanValue(booleanValue_Boolean); } if ((title_StringAttributeData != null ? !title_StringAttributeData.equals(that.title_StringAttributeData) : that.title_StringAttributeData != null)) { object.setTitle(title_StringAttributeData.toString(object.getContext())); } if ((stringValue_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) { object.setStringValue(stringValue_String); } if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) { object.setNullableStringValue(nullableStringValue_String); } if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) { object.setIntValueWithAnnotation(intValueWithAnnotation_Int); } if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) { object.setIntValueWithDimenTypeAnnotation(intValueWithDimenTypeAnnotation_Int); } if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) { object.setIntWithMultipleAnnotations(intWithMultipleAnnotations_Int); } if ((integerValue_Integer != null ? !integerValue_Integer.equals(that.integerValue_Integer) : that.integerValue_Integer != null)) { object.setIntegerValue(integerValue_Integer); } if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) { object.setListValue(listValue_List); } if ((intValue_Int != that.intValue_Int)) { object.setIntValue(intValue_Int); } if (((function_Function3 == null) != (that.function_Function3 == null))) { object.setFunction(function_Function3); } if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) { object.setIntValueWithRangeAnnotation(intValueWithRangeAnnotation_Int); } if ((boolValue_Boolean != that.boolValue_Boolean)) { object.setBoolValue(boolValue_Boolean); } if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) { object.setModels(models_List); } } @Override public void handlePostBind(final TestManyTypesView 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 TestManyTypesViewModel_ onBind( OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestManyTypesView 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 TestManyTypesViewModel_ onUnbind( OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestManyTypesView 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 TestManyTypesViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestManyTypesView 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 TestManyTypesViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see TestManyTypesView#setStringValue(String) */ public TestManyTypesViewModel_ stringValue(@NonNull String stringValue) { if (stringValue == null) { throw new IllegalArgumentException("stringValue cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(0); onMutation(); this.stringValue_String = stringValue; return this; } @NonNull public String stringValue() { return stringValue_String; } /** * <i>Optional</i>: Default value is (String) null * * @see TestManyTypesView#setNullableStringValue(String) */ public TestManyTypesViewModel_ nullableStringValue(@Nullable String nullableStringValue) { onMutation(); this.nullableStringValue_String = nullableStringValue; return this; } @Nullable public String nullableStringValue() { return nullableStringValue_String; } /** * <i>Required.</i> * * @see TestManyTypesView#setFunction(Function3<Integer, Integer, Integer, Integer>) */ public TestManyTypesViewModel_ function( @NonNull Function3<Integer, Integer, Integer, Integer> function) { if (function == null) { throw new IllegalArgumentException("function cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(2); onMutation(); this.function_Function3 = function; return this; } @NonNull public Function3<Integer, Integer, Integer, Integer> function() { return function_Function3; } /** * <i>Optional</i>: Default value is 0 * * @see TestManyTypesView#setIntValue(int) */ public TestManyTypesViewModel_ intValue(int intValue) { onMutation(); this.intValue_Int = intValue; return this; } public int intValue() { return intValue_Int; } /** * <i>Optional</i>: Default value is 0 * * @see TestManyTypesView#setIntValueWithAnnotation(int) */ public TestManyTypesViewModel_ intValueWithAnnotation(@StringRes int intValueWithAnnotation) { onMutation(); this.intValueWithAnnotation_Int = intValueWithAnnotation; return this; } @StringRes public int intValueWithAnnotation() { return intValueWithAnnotation_Int; } /** * <i>Optional</i>: Default value is 0 * * @see TestManyTypesView#setIntValueWithRangeAnnotation(int) */ public TestManyTypesViewModel_ intValueWithRangeAnnotation( @IntRange(from = 0, to = 200) int intValueWithRangeAnnotation) { onMutation(); this.intValueWithRangeAnnotation_Int = intValueWithRangeAnnotation; return this; } @IntRange( from = 0, to = 200 ) public int intValueWithRangeAnnotation() { return intValueWithRangeAnnotation_Int; } /** * <i>Optional</i>: Default value is 0 * * @see TestManyTypesView#setIntValueWithDimenTypeAnnotation(int) */ public TestManyTypesViewModel_ intValueWithDimenTypeAnnotation( @Dimension(unit = 0) int intValueWithDimenTypeAnnotation) { onMutation(); this.intValueWithDimenTypeAnnotation_Int = intValueWithDimenTypeAnnotation; return this; } @Dimension( unit = 0 ) public int intValueWithDimenTypeAnnotation() { return intValueWithDimenTypeAnnotation_Int; } /** * <i>Optional</i>: Default value is 0 * * @see TestManyTypesView#setIntWithMultipleAnnotations(int) */ public TestManyTypesViewModel_ intWithMultipleAnnotations( @IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations) { onMutation(); this.intWithMultipleAnnotations_Int = intWithMultipleAnnotations; return this; } @IntRange( from = 0, to = 200 ) @Dimension( unit = 0 ) public int intWithMultipleAnnotations() { return intWithMultipleAnnotations_Int; } /** * <i>Required.</i> * * @see TestManyTypesView#setIntegerValue(Integer) */ public TestManyTypesViewModel_ integerValue(@NonNull Integer integerValue) { if (integerValue == null) { throw new IllegalArgumentException("integerValue cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(8); onMutation(); this.integerValue_Integer = integerValue; return this; } @NonNull public Integer integerValue() { return integerValue_Integer; } /** * <i>Optional</i>: Default value is false * * @see TestManyTypesView#setBoolValue(boolean) */ public TestManyTypesViewModel_ boolValue(boolean boolValue) { onMutation(); this.boolValue_Boolean = boolValue; return this; } public boolean boolValue() { return boolValue_Boolean; } /** * <i>Required.</i> * * @see TestManyTypesView#setModels(List<? extends EpoxyModel<?>>) */ public TestManyTypesViewModel_ models(@NonNull List<? extends EpoxyModel<?>> models) { if (models == null) { throw new IllegalArgumentException("models cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(10); onMutation(); this.models_List = models; return this; } @NonNull public List<? extends EpoxyModel<?>> models() { return models_List; } /** * <i>Required.</i> * * @see TestManyTypesView#setBooleanValue(Boolean) */ public TestManyTypesViewModel_ booleanValue(@NonNull Boolean booleanValue) { if (booleanValue == null) { throw new IllegalArgumentException("booleanValue cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(11); onMutation(); this.booleanValue_Boolean = booleanValue; return this; } @NonNull public Boolean booleanValue() { return booleanValue_Boolean; } /** * <i>Required.</i> * * @see TestManyTypesView#setArrayValue(String[]) */ public TestManyTypesViewModel_ arrayValue(@NonNull String[] arrayValue) { if (arrayValue == null) { throw new IllegalArgumentException("arrayValue cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(12); onMutation(); this.arrayValue_StringArray = arrayValue; return this; } @NonNull public String[] arrayValue() { return arrayValue_StringArray; } /** * <i>Required.</i> * * @see TestManyTypesView#setListValue(List<String>) */ public TestManyTypesViewModel_ listValue(@NonNull List<String> listValue) { if (listValue == null) { throw new IllegalArgumentException("listValue cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(13); onMutation(); this.listValue_List = listValue; return this; } @NonNull public List<String> listValue() { return listValue_List; } /** * <i>Required.</i> * * @see TestManyTypesView#setMapValue(Map<Integer, Integer>) */ public TestManyTypesViewModel_ mapValue(@NonNull Map<Integer, Integer> mapValue) { if (mapValue == null) { throw new IllegalArgumentException("mapValue cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(14); onMutation(); this.mapValue_Map = mapValue; return this; } @NonNull public Map<Integer, Integer> mapValue() { return mapValue_Map; } /** * 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 TestManyTypesViewModel_ clickListener( @NonNull final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener) { assignedAttributes_epoxyGeneratedModel.set(15); onMutation(); if (clickListener == null) { this.clickListener_OnClickListener = null; } else { this.clickListener_OnClickListener = new WrappedEpoxyModelClickListener<>(clickListener); } return this; } /** * <i>Required.</i> * * @see TestManyTypesView#setClickListener(View.OnClickListener) */ public TestManyTypesViewModel_ clickListener(@NonNull View.OnClickListener clickListener) { if (clickListener == null) { throw new IllegalArgumentException("clickListener cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(15); onMutation(); this.clickListener_OnClickListener = clickListener; return this; } @NonNull public View.OnClickListener clickListener() { return clickListener_OnClickListener; } @Nullable public CharSequence getTitle(Context context) { return title_StringAttributeData.toString(context); } /** * <i>Optional</i>: Default value is (CharSequence) null * * @see TestManyTypesView#setTitle(CharSequence) */ public TestManyTypesViewModel_ 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 TestManyTypesView#setTitle(CharSequence) */ public TestManyTypesViewModel_ 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 TestManyTypesView#setTitle(CharSequence) */ public TestManyTypesViewModel_ 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 TestManyTypesView#setTitle(CharSequence) */ public TestManyTypesViewModel_ titleQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); title_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TestManyTypesViewModel_ id(long id) { super.id(id); return this; } @Override public TestManyTypesViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestManyTypesViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestManyTypesViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestManyTypesViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestManyTypesViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestManyTypesViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public TestManyTypesViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestManyTypesViewModel_ show() { super.show(); return this; } @Override public TestManyTypesViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestManyTypesViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TestManyTypesViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.stringValue_String = null; this.nullableStringValue_String = (String) null; this.function_Function3 = null; this.intValue_Int = 0; this.intValueWithAnnotation_Int = 0; this.intValueWithRangeAnnotation_Int = 0; this.intValueWithDimenTypeAnnotation_Int = 0; this.intWithMultipleAnnotations_Int = 0; this.integerValue_Integer = null; this.boolValue_Boolean = false; this.models_List = null; this.booleanValue_Boolean = null; this.arrayValue_StringArray = null; this.listValue_List = null; this.mapValue_Map = null; this.clickListener_OnClickListener = 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 TestManyTypesViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestManyTypesViewModel_ that = (TestManyTypesViewModel_) 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_String != null ? !stringValue_String.equals(that.stringValue_String) : that.stringValue_String != null)) { return false; } if ((nullableStringValue_String != null ? !nullableStringValue_String.equals(that.nullableStringValue_String) : that.nullableStringValue_String != null)) { return false; } if (((function_Function3 == null) != (that.function_Function3 == null))) { return false; } if ((intValue_Int != that.intValue_Int)) { return false; } if ((intValueWithAnnotation_Int != that.intValueWithAnnotation_Int)) { return false; } if ((intValueWithRangeAnnotation_Int != that.intValueWithRangeAnnotation_Int)) { return false; } if ((intValueWithDimenTypeAnnotation_Int != that.intValueWithDimenTypeAnnotation_Int)) { return false; } if ((intWithMultipleAnnotations_Int != that.intWithMultipleAnnotations_Int)) { return false; } if ((integerValue_Integer != null ? !integerValue_Integer.equals(that.integerValue_Integer) : that.integerValue_Integer != null)) { return false; } if ((boolValue_Boolean != that.boolValue_Boolean)) { return false; } if ((models_List != null ? !models_List.equals(that.models_List) : that.models_List != null)) { return false; } if ((booleanValue_Boolean != null ? !booleanValue_Boolean.equals(that.booleanValue_Boolean) : that.booleanValue_Boolean != null)) { return false; } if (!Arrays.equals(arrayValue_StringArray, that.arrayValue_StringArray)) { return false; } if ((listValue_List != null ? !listValue_List.equals(that.listValue_List) : that.listValue_List != null)) { return false; } if ((mapValue_Map != null ? !mapValue_Map.equals(that.mapValue_Map) : that.mapValue_Map != null)) { return false; } if (((clickListener_OnClickListener == null) != (that.clickListener_OnClickListener == 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 + (stringValue_String != null ? stringValue_String.hashCode() : 0); _result = 31 * _result + (nullableStringValue_String != null ? nullableStringValue_String.hashCode() : 0); _result = 31 * _result + (function_Function3 != null ? 1 : 0); _result = 31 * _result + intValue_Int; _result = 31 * _result + intValueWithAnnotation_Int; _result = 31 * _result + intValueWithRangeAnnotation_Int; _result = 31 * _result + intValueWithDimenTypeAnnotation_Int; _result = 31 * _result + intWithMultipleAnnotations_Int; _result = 31 * _result + (integerValue_Integer != null ? integerValue_Integer.hashCode() : 0); _result = 31 * _result + (boolValue_Boolean ? 1 : 0); _result = 31 * _result + (models_List != null ? models_List.hashCode() : 0); _result = 31 * _result + (booleanValue_Boolean != null ? booleanValue_Boolean.hashCode() : 0); _result = 31 * _result + Arrays.hashCode(arrayValue_StringArray); _result = 31 * _result + (listValue_List != null ? listValue_List.hashCode() : 0); _result = 31 * _result + (mapValue_Map != null ? mapValue_Map.hashCode() : 0); _result = 31 * _result + (clickListener_OnClickListener != null ? 1 : 0); _result = 31 * _result + (title_StringAttributeData != null ? title_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TestManyTypesViewModel_{" + "stringValue_String=" + stringValue_String + ", nullableStringValue_String=" + nullableStringValue_String + ", intValue_Int=" + intValue_Int + ", intValueWithAnnotation_Int=" + intValueWithAnnotation_Int + ", intValueWithRangeAnnotation_Int=" + intValueWithRangeAnnotation_Int + ", intValueWithDimenTypeAnnotation_Int=" + intValueWithDimenTypeAnnotation_Int + ", intWithMultipleAnnotations_Int=" + intWithMultipleAnnotations_Int + ", integerValue_Integer=" + integerValue_Integer + ", boolValue_Boolean=" + boolValue_Boolean + ", models_List=" + models_List + ", booleanValue_Boolean=" + booleanValue_Boolean + ", arrayValue_StringArray=" + arrayValue_StringArray + ", listValue_List=" + listValue_List + ", mapValue_Map=" + mapValue_Map + ", clickListener_OnClickListener=" + clickListener_OnClickListener + ", title_StringAttributeData=" + title_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,604
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityStateChangedView_throwsIfInvalidParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityStateChangedView_throwsIfInvalidParams extends View { public OnVisibilityStateChangedView_throwsIfInvalidParams(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityStateChanged public void onVisibilityStateChanged(boolean s) { } }
8,605
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelReturningClassType.java
package com.airbnb.epoxy; import java.util.List; public class ModelReturningClassType extends EpoxyModel<Object> { @EpoxyAttribute int value; @Override protected int getDefaultLayout() { return 0; } public ModelReturningClassType classType(int classType) { return this; } public ModelReturningClassType classType(int param1, int param2) { return this; } public ModelReturningClassType list(List<String> list) { return this; } }
8,606
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelViewSuperClassModel_.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 ModelViewSuperClassModel_ extends EpoxyModel<ModelViewSuperClass> implements GeneratedModel<ModelViewSuperClass>, ModelViewSuperClassModelBuilder { private OnModelBoundListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> onModelVisibilityChangedListener_epoxyGeneratedModel; private int superClassValue_Int = 0; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public ModelViewSuperClass buildView(ViewGroup parent) { ModelViewSuperClass v = new ModelViewSuperClass(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 ModelViewSuperClass object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final ModelViewSuperClass object) { super.bind(object); object.superClassValue(superClassValue_Int); } @Override public void bind(final ModelViewSuperClass object, EpoxyModel previousModel) { if (!(previousModel instanceof ModelViewSuperClassModel_)) { bind(object); return; } ModelViewSuperClassModel_ that = (ModelViewSuperClassModel_) previousModel; super.bind(object); if ((superClassValue_Int != that.superClassValue_Int)) { object.superClassValue(superClassValue_Int); } } @Override public void handlePostBind(final ModelViewSuperClass 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(); } /** * 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 ModelViewSuperClassModel_ onBind( OnModelBoundListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(ModelViewSuperClass object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.onClear(); } /** * 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 ModelViewSuperClassModel_ onUnbind( OnModelUnboundListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final ModelViewSuperClass 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 ModelViewSuperClassModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final ModelViewSuperClass 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 ModelViewSuperClassModel_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelViewSuperClassModel_, ModelViewSuperClass> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is 0 * * @see ModelViewSuperClass#superClassValue(int) */ public ModelViewSuperClassModel_ superClassValue(int superClassValue) { onMutation(); this.superClassValue_Int = superClassValue; return this; } public int superClassValue() { return superClassValue_Int; } @Override public ModelViewSuperClassModel_ id(long id) { super.id(id); return this; } @Override public ModelViewSuperClassModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelViewSuperClassModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelViewSuperClassModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelViewSuperClassModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelViewSuperClassModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelViewSuperClassModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public ModelViewSuperClassModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelViewSuperClassModel_ show() { super.show(); return this; } @Override public ModelViewSuperClassModel_ show(boolean show) { super.show(show); return this; } @Override public ModelViewSuperClassModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public ModelViewSuperClassModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.superClassValue_Int = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelViewSuperClassModel_)) { return false; } if (!super.equals(o)) { return false; } ModelViewSuperClassModel_ that = (ModelViewSuperClassModel_) 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 ((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 + superClassValue_Int; return _result; } @Override public String toString() { return "ModelViewSuperClassModel_{" + "superClassValue_Int=" + superClassValue_Int + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,607
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnViewRecycledView_throwsIfHasParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnViewRecycledView_throwsIfHasParams extends View { public OnViewRecycledView_throwsIfHasParams(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnViewRecycled private void onRecycled1(int param) { } }
8,608
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/PropDefaultsView.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; @ModelView(defaultLayout = 1) public class PropDefaultsView extends View { static final int PRIMITIVE_DEFAULT = 23; static final String STRING_DEFAULT = "hello world"; public PropDefaultsView(Context context) { super(context); } @ModelProp public void defaultsToNull(@Nullable CharSequence title) { } @ModelProp public void noDefaultSoItIsRequired(CharSequence title) { } @ModelProp public void primitivesHaveImplicitDefaultsAndCannotBeRequired(int title) { } @ModelProp(defaultValue = "PRIMITIVE_DEFAULT") public void primitiveWithExplicitDefault(int title) { } @ModelProp(defaultValue = "STRING_DEFAULT") public void objectWithDefault(String title) { } @ModelProp(defaultValue = "STRING_DEFAULT") public void objectWithDefaultAndNullable(@Nullable String title) { } }
8,609
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropTextPropViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import android.view.ViewGroup; 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.lang.UnsupportedOperationException; import java.util.BitSet; /** * Generated file. Do not modify! */ public class TestFieldPropTextPropViewModel_ extends EpoxyModel<TestFieldPropTextPropView> implements GeneratedModel<TestFieldPropTextPropView>, TestFieldPropTextPropViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ private StringAttributeData value_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 value"); } } @Override protected int getViewType() { return 0; } @Override public TestFieldPropTextPropView buildView(ViewGroup parent) { TestFieldPropTextPropView v = new TestFieldPropTextPropView(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 TestFieldPropTextPropView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropTextPropView object) { super.bind(object); object.value = value_StringAttributeData.toString(object.getContext()); } @Override public void bind(final TestFieldPropTextPropView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropTextPropViewModel_)) { bind(object); return; } TestFieldPropTextPropViewModel_ that = (TestFieldPropTextPropViewModel_) previousModel; super.bind(object); if ((value_StringAttributeData != null ? !value_StringAttributeData.equals(that.value_StringAttributeData) : that.value_StringAttributeData != null)) { object.value = value_StringAttributeData.toString(object.getContext()); } } @Override public void handlePostBind(final TestFieldPropTextPropView 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 TestFieldPropTextPropViewModel_ onBind( OnModelBoundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropTextPropView 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 TestFieldPropTextPropViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropTextPropView 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 TestFieldPropTextPropViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropTextPropView 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 TestFieldPropTextPropViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropTextPropViewModel_, TestFieldPropTextPropView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public CharSequence getValue(Context context) { return value_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TestFieldPropTextPropView#value */ public TestFieldPropTextPropViewModel_ value(@NonNull CharSequence value) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); if (value == null) { throw new IllegalArgumentException("value cannot be null"); } value_StringAttributeData.setValue(value); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropTextPropView#value */ public TestFieldPropTextPropViewModel_ value(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); value_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropTextPropView#value */ public TestFieldPropTextPropViewModel_ value(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); value_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropTextPropView#value */ public TestFieldPropTextPropViewModel_ valueQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); value_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TestFieldPropTextPropViewModel_ id(long id) { super.id(id); return this; } @Override public TestFieldPropTextPropViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestFieldPropTextPropViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestFieldPropTextPropViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestFieldPropTextPropViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestFieldPropTextPropViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestFieldPropTextPropViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropTextPropViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestFieldPropTextPropViewModel_ show() { super.show(); return this; } @Override public TestFieldPropTextPropViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestFieldPropTextPropViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropTextPropViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.value_StringAttributeData = new StringAttributeData(); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropTextPropViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropTextPropViewModel_ that = (TestFieldPropTextPropViewModel_) 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_StringAttributeData != null ? !value_StringAttributeData.equals(that.value_StringAttributeData) : that.value_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 + (value_StringAttributeData != null ? value_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TestFieldPropTextPropViewModel_{" + "value_StringAttributeData=" + value_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,610
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithFinalField_.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 ModelWithFinalField_ extends ModelWithFinalField implements GeneratedModel<Object>, ModelWithFinalFieldBuilder { private OnModelBoundListener<ModelWithFinalField_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithFinalField_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithFinalField_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithFinalField_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithFinalField_(long id, int valueInt) { super(id, valueInt); } @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 ModelWithFinalField_ onBind(OnModelBoundListener<ModelWithFinalField_, 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 ModelWithFinalField_ onUnbind( OnModelUnboundListener<ModelWithFinalField_, 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 ModelWithFinalField_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithFinalField_, 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 ModelWithFinalField_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithFinalField_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public int finalValueInt() { return finalValueInt; } public ModelWithFinalField_ nonFinalValueInt(int nonFinalValueInt) { onMutation(); super.nonFinalValueInt = nonFinalValueInt; return this; } public int nonFinalValueInt() { return nonFinalValueInt; } @Override public ModelWithFinalField_ id(long id) { super.id(id); return this; } @Override public ModelWithFinalField_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithFinalField_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithFinalField_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithFinalField_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithFinalField_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithFinalField_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithFinalField_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithFinalField_ show() { super.show(); return this; } @Override public ModelWithFinalField_ show(boolean show) { super.show(show); return this; } @Override public ModelWithFinalField_ hide() { super.hide(); return this; } @Override public ModelWithFinalField_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.nonFinalValueInt = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithFinalField_)) { return false; } if (!super.equals(o)) { return false; } ModelWithFinalField_ that = (ModelWithFinalField_) 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 ((finalValueInt != that.finalValueInt)) { return false; } if ((nonFinalValueInt != that.nonFinalValueInt)) { 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 + finalValueInt; _result = 31 * _result + nonFinalValueInt; return _result; } @Override public String toString() { return "ModelWithFinalField_{" + "finalValueInt=" + finalValueInt + ", nonFinalValueInt=" + nonFinalValueInt + "}" + super.toString(); } }
8,611
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/RequireAbstractModelFailsClassWithAttribute.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; public class RequireAbstractModelFailsClassWithAttribute extends EpoxyModel<Object> { @EpoxyAttribute String value; @Override protected int getDefaultLayout() { return 0; } }
8,612
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DataBindingModelWithAllFieldTypes.java
package com.airbnb.epoxy; import java.util.List; @EpoxyModelClass public abstract class DataBindingModelWithAllFieldTypes 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,613
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityChangedView_throwsIfPrivate.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityChangedView_throwsIfPrivate extends View { public OnVisibilityChangedView_throwsIfPrivate(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityChanged private void onVisibilityChanged(float ph, float pw, int vh, int vw) { } }
8,614
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotatedClass_.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 ModelWithAnnotatedClass_ extends ModelWithAnnotatedClass implements GeneratedModel<Object>, ModelWithAnnotatedClassBuilder { private OnModelBoundListener<ModelWithAnnotatedClass_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAnnotatedClass_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAnnotatedClass_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAnnotatedClass_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAnnotatedClass_() { 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 ModelWithAnnotatedClass_ onBind( OnModelBoundListener<ModelWithAnnotatedClass_, 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 ModelWithAnnotatedClass_ onUnbind( OnModelUnboundListener<ModelWithAnnotatedClass_, 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 ModelWithAnnotatedClass_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAnnotatedClass_, 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 ModelWithAnnotatedClass_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAnnotatedClass_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public ModelWithAnnotatedClass_ id(long id) { super.id(id); return this; } @Override public ModelWithAnnotatedClass_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithAnnotatedClass_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithAnnotatedClass_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithAnnotatedClass_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithAnnotatedClass_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithAnnotatedClass_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithAnnotatedClass_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithAnnotatedClass_ show() { super.show(); return this; } @Override public ModelWithAnnotatedClass_ show(boolean show) { super.show(show); return this; } @Override public ModelWithAnnotatedClass_ hide() { super.hide(); return this; } @Override public ModelWithAnnotatedClass_ 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 ModelWithAnnotatedClass_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAnnotatedClass_ that = (ModelWithAnnotatedClass_) 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 "ModelWithAnnotatedClass_{" + "}" + super.toString(); } }
8,615
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelForTestingDuplicateRValues.java
package com.airbnb.epoxy; import com.airbnb.epoxy.othermodule.R; @EpoxyModelClass(layout = R.layout.res_in_other_module) public abstract class ModelForTestingDuplicateRValues extends EpoxyModel<Object> { @EpoxyAttribute int value; }
8,616
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithSuperAttributes_.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_ extends ModelWithSuperAttributes implements GeneratedModel<Object>, ModelWithSuperAttributesBuilder { private OnModelBoundListener<ModelWithSuperAttributes_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithSuperAttributes_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithSuperAttributes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithSuperAttributes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithSuperAttributes_() { 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_ onBind( OnModelBoundListener<ModelWithSuperAttributes_, 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_ onUnbind( OnModelUnboundListener<ModelWithSuperAttributes_, 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_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithSuperAttributes_, 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_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithSuperAttributes_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithSuperAttributes_ superValue(int superValue) { onMutation(); super.superValue = superValue; return this; } public int superValue() { return superValue; } @Override public ModelWithSuperAttributes_ id(long id) { super.id(id); return this; } @Override public ModelWithSuperAttributes_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithSuperAttributes_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithSuperAttributes_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithSuperAttributes_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithSuperAttributes_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithSuperAttributes_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithSuperAttributes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithSuperAttributes_ show() { super.show(); return this; } @Override public ModelWithSuperAttributes_ show(boolean show) { super.show(show); return this; } @Override public ModelWithSuperAttributes_ hide() { super.hide(); return this; } @Override public ModelWithSuperAttributes_ 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 ModelWithSuperAttributes_)) { return false; } if (!super.equals(o)) { return false; } ModelWithSuperAttributes_ that = (ModelWithSuperAttributes_) 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 "ModelWithSuperAttributes_{" + "superValue=" + superValue + "}" + super.toString(); } }
8,617
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AbstractEpoxyModelWithView_.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 AbstractEpoxyModelWithView_ extends AbstractEpoxyModelWithView implements GeneratedModel<View>, AbstractEpoxyModelWithViewBuilder { private OnModelBoundListener<AbstractEpoxyModelWithView_, View> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<AbstractEpoxyModelWithView_, View> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<AbstractEpoxyModelWithView_, View> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<AbstractEpoxyModelWithView_, View> onModelVisibilityChangedListener_epoxyGeneratedModel; public AbstractEpoxyModelWithView_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final View object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final View 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 AbstractEpoxyModelWithView_ onBind( OnModelBoundListener<AbstractEpoxyModelWithView_, View> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(View 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 AbstractEpoxyModelWithView_ onUnbind( OnModelUnboundListener<AbstractEpoxyModelWithView_, View> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final View 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 AbstractEpoxyModelWithView_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<AbstractEpoxyModelWithView_, View> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final View 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 AbstractEpoxyModelWithView_ onVisibilityChanged( OnModelVisibilityChangedListener<AbstractEpoxyModelWithView_, View> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public AbstractEpoxyModelWithView_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public AbstractEpoxyModelWithView_ id(long id) { super.id(id); return this; } @Override public AbstractEpoxyModelWithView_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public AbstractEpoxyModelWithView_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public AbstractEpoxyModelWithView_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public AbstractEpoxyModelWithView_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public AbstractEpoxyModelWithView_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public AbstractEpoxyModelWithView_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public AbstractEpoxyModelWithView_ show() { super.show(); return this; } @Override public AbstractEpoxyModelWithView_ show(boolean show) { super.show(show); return this; } @Override public AbstractEpoxyModelWithView_ hide() { super.hide(); return this; } @Override public AbstractEpoxyModelWithView_ 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 AbstractEpoxyModelWithView_)) { return false; } if (!super.equals(o)) { return false; } AbstractEpoxyModelWithView_ that = (AbstractEpoxyModelWithView_) 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 "AbstractEpoxyModelWithView_{" + "}" + super.toString(); } }
8,618
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithDataBindingWithoutDonothashBindingModel_.java
package com.airbnb.epoxy; import android.view.View; 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 ModelWithDataBindingWithoutDonothashBindingModel_ extends DataBindingEpoxyModel implements GeneratedModel<DataBindingEpoxyModel.DataBindingHolder>, ModelWithDataBindingWithoutDonothashBindingModelBuilder { private OnModelBoundListener<ModelWithDataBindingWithoutDonothashBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithDataBindingWithoutDonothashBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithDataBindingWithoutDonothashBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithDataBindingWithoutDonothashBindingModel_, DataBindingEpoxyModel.DataBindingHolder> onModelVisibilityChangedListener_epoxyGeneratedModel; private String stringValue; private View.OnClickListener clickListener; @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 ModelWithDataBindingWithoutDonothashBindingModel_ onBind( OnModelBoundListener<ModelWithDataBindingWithoutDonothashBindingModel_, 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 ModelWithDataBindingWithoutDonothashBindingModel_ onUnbind( OnModelUnboundListener<ModelWithDataBindingWithoutDonothashBindingModel_, 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 ModelWithDataBindingWithoutDonothashBindingModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithDataBindingWithoutDonothashBindingModel_, 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 ModelWithDataBindingWithoutDonothashBindingModel_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithDataBindingWithoutDonothashBindingModel_, DataBindingEpoxyModel.DataBindingHolder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithDataBindingWithoutDonothashBindingModel_ stringValue(String stringValue) { onMutation(); this.stringValue = stringValue; return this; } public String stringValue() { return stringValue; } /** * 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 ModelWithDataBindingWithoutDonothashBindingModel_ clickListener( final OnModelClickListener<ModelWithDataBindingWithoutDonothashBindingModel_, DataBindingEpoxyModel.DataBindingHolder> clickListener) { onMutation(); if (clickListener == null) { this.clickListener = null; } else { this.clickListener = new WrappedEpoxyModelClickListener<>(clickListener); } return this; } public ModelWithDataBindingWithoutDonothashBindingModel_ clickListener( View.OnClickListener clickListener) { onMutation(); this.clickListener = clickListener; return this; } public View.OnClickListener clickListener() { return clickListener; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ id(long id) { super.id(id); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ id(@Nullable Number... arg0) { super.id(arg0); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ id(@Nullable CharSequence arg0) { super.id(arg0); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ id(@Nullable CharSequence arg0, @Nullable CharSequence... arg1) { super.id(arg0, arg1); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ id(@Nullable CharSequence arg0, long arg1) { super.id(arg0, arg1); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ layout(@LayoutRes int arg0) { super.layout(arg0); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback arg0) { super.spanSizeOverride(arg0); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ show() { super.show(); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ show(boolean show) { super.show(show); return this; } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.model_with_data_binding_without_donothash; } @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."); } if (!binding.setVariable(BR.clickListener, clickListener)) { throw new IllegalStateException("The attribute clickListener 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 ModelWithDataBindingWithoutDonothashBindingModel_)) { setDataBindingVariables(binding); return; } ModelWithDataBindingWithoutDonothashBindingModel_ that = (ModelWithDataBindingWithoutDonothashBindingModel_) previousModel; if ((stringValue != null ? !stringValue.equals(that.stringValue) : that.stringValue != null)) { binding.setVariable(BR.stringValue, stringValue); } if ((clickListener != null ? !clickListener.equals(that.clickListener) : that.clickListener != null)) { binding.setVariable(BR.clickListener, clickListener); } } @Override public ModelWithDataBindingWithoutDonothashBindingModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.stringValue = null; this.clickListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithDataBindingWithoutDonothashBindingModel_)) { return false; } if (!super.equals(o)) { return false; } ModelWithDataBindingWithoutDonothashBindingModel_ that = (ModelWithDataBindingWithoutDonothashBindingModel_) 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; } if ((clickListener != null ? !clickListener.equals(that.clickListener) : that.clickListener != 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); _result = 31 * _result + (clickListener != null ? clickListener.hashCode() : 0); return _result; } @Override public String toString() { return "ModelWithDataBindingWithoutDonothashBindingModel_{" + "stringValue=" + stringValue + ", clickListener=" + clickListener + "}" + super.toString(); } }
8,619
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelNoValidation_.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 ModelNoValidation_ extends ModelNoValidation implements GeneratedModel<Object>, ModelNoValidationBuilder { private OnModelBoundListener<ModelNoValidation_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelNoValidation_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelNoValidation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelNoValidation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelNoValidation_() { super(); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Object object, final int position) { } @Override public void handlePostBind(final Object 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 ModelNoValidation_ onBind(OnModelBoundListener<ModelNoValidation_, 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 ModelNoValidation_ onUnbind(OnModelUnboundListener<ModelNoValidation_, 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 ModelNoValidation_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelNoValidation_, 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 ModelNoValidation_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelNoValidation_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelNoValidation_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public ModelNoValidation_ id(long id) { super.id(id); return this; } @Override public ModelNoValidation_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelNoValidation_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelNoValidation_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelNoValidation_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelNoValidation_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelNoValidation_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelNoValidation_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelNoValidation_ show() { super.show(); return this; } @Override public ModelNoValidation_ show(boolean show) { super.show(show); return this; } @Override public ModelNoValidation_ hide() { super.hide(); return this; } @Override public ModelNoValidation_ 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 ModelNoValidation_)) { return false; } if (!super.equals(o)) { return false; } ModelNoValidation_ that = (ModelNoValidation_) 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 "ModelNoValidation_{" + "value=" + value + "}" + super.toString(); } }
8,620
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelRequiresHashCodeFailsBasicObject.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; public class ModelRequiresHashCodeFailsBasicObject extends EpoxyModel<Object> { public static class ClassWithoutHashCode { @Override public boolean equals(Object obj) { return super.equals(obj); } } @EpoxyAttribute ClassWithoutHashCode classWithoutHashCode; @Override protected int getDefaultLayout() { return 0; } }
8,621
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithSuper_.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 ModelWithSuper_ extends ModelWithSuper implements GeneratedModel<Object>, ModelWithSuperBuilder { private OnModelBoundListener<ModelWithSuper_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithSuper_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithSuper_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithSuper_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithSuper_() { 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 ModelWithSuper_ onBind(OnModelBoundListener<ModelWithSuper_, 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 ModelWithSuper_ onUnbind(OnModelUnboundListener<ModelWithSuper_, 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 ModelWithSuper_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithSuper_, 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 ModelWithSuper_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithSuper_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithSuper_ valueInt(int valueInt) { onMutation(); super.valueInt = valueInt; super.valueInt(valueInt); return this; } public int valueInt() { return valueInt; } @Override public ModelWithSuper_ id(long id) { super.id(id); return this; } @Override public ModelWithSuper_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithSuper_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithSuper_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithSuper_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithSuper_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithSuper_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithSuper_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithSuper_ show() { super.show(); return this; } @Override public ModelWithSuper_ show(boolean show) { super.show(show); return this; } @Override public ModelWithSuper_ hide() { super.hide(); return this; } @Override public ModelWithSuper_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.valueInt = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithSuper_)) { return false; } if (!super.equals(o)) { return false; } ModelWithSuper_ that = (ModelWithSuper_) 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; } 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 + valueInt; return _result; } @Override public String toString() { return "ModelWithSuper_{" + "valueInt=" + valueInt + "}" + super.toString(); } }
8,622
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestCallbackPropView.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; @ModelView(defaultLayout = 1) public class TestCallbackPropView extends View { public TestCallbackPropView(Context context) { super(context); } @CallbackProp public void setListener(@Nullable View.OnClickListener clickListener) { } }
8,623
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerWithAutoModelWithSuperClass_EpoxyHelper.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.BasicModelWithAttribute_; import com.airbnb.epoxy.ControllerHelper; import com.airbnb.epoxy.EpoxyModel; import java.lang.IllegalStateException; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ControllerWithAutoModelWithSuperClass_EpoxyHelper extends ControllerHelper<ControllerWithAutoModelWithSuperClass> { private final ControllerWithAutoModelWithSuperClass controller; private EpoxyModel modelWithAttribute2; private EpoxyModel modelWithAttribute1; public ControllerWithAutoModelWithSuperClass_EpoxyHelper( ControllerWithAutoModelWithSuperClass controller) { this.controller = controller; } @Override public void resetAutoModels() { validateModelsHaveNotChanged(); controller.modelWithAttribute2 = new BasicModelWithAttribute_(); controller.modelWithAttribute2.id(-1); controller.modelWithAttribute1 = new BasicModelWithAttribute_(); controller.modelWithAttribute1.id(-2); saveModelsForNextValidation(); } private void validateModelsHaveNotChanged() { validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -1); validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -2); validateModelHashCodesHaveNotChanged(controller); } private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject, String fieldName, int id) { if (expectedObject != actualObject) { throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")"); } if (actualObject != null && actualObject.id() != id) { throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")"); } } private void saveModelsForNextValidation() { modelWithAttribute2 = controller.modelWithAttribute2; modelWithAttribute1 = controller.modelWithAttribute1; } }
8,624
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithStaticField.java
package com.airbnb.epoxy; public class ModelWithStaticField extends EpoxyModel<Object> { @EpoxyAttribute static int valueInt; @Override protected int getDefaultLayout() { return 0; } }
8,625
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithFinalField.java
package com.airbnb.epoxy; public class ModelWithFinalField extends EpoxyModel<Object> { @EpoxyAttribute final int finalValueInt; @EpoxyAttribute int nonFinalValueInt; public ModelWithFinalField(long id, int valueInt) { super(id); this.finalValueInt = valueInt; } @Override protected int getDefaultLayout() { return 0; } }
8,626
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/BaseModelViewModel_.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 BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String clickListener_String; public BaseModelViewModel_(long id) { super(id); } @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 BaseModelView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final BaseModelView object) { super.bind(object); object.setClickListener(clickListener_String); } @Override public void bind(final BaseModelView object, EpoxyModel previousModel) { if (!(previousModel instanceof BaseModelViewModel_)) { bind(object); return; } BaseModelViewModel_ that = (BaseModelViewModel_) 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 BaseModelView 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 BaseModelViewModel_ onBind( OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(BaseModelView 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 BaseModelViewModel_ onUnbind( OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final BaseModelView 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 BaseModelViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final BaseModelView 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 BaseModelViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see BaseModelView#setClickListener(String) */ public BaseModelViewModel_ 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 BaseModelViewModel_ id(long id) { super.id(id); return this; } @Override public BaseModelViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public BaseModelViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public BaseModelViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public BaseModelViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public BaseModelViewModel_ show() { super.show(); return this; } @Override public BaseModelViewModel_ show(boolean show) { super.show(show); return this; } @Override public BaseModelViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public BaseModelViewModel_ 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 BaseModelViewModel_)) { return false; } if (!super.equals(o)) { return false; } BaseModelViewModel_ that = (BaseModelViewModel_) 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 "BaseModelViewModel_{" + "clickListener_String=" + clickListener_String + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,627
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/PropDefaultsViewModel_.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 PropDefaultsViewModel_ extends EpoxyModel<PropDefaultsView> implements GeneratedModel<PropDefaultsView>, PropDefaultsViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(6); private OnModelBoundListener<PropDefaultsViewModel_, PropDefaultsView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<PropDefaultsViewModel_, PropDefaultsView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<PropDefaultsViewModel_, PropDefaultsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<PropDefaultsViewModel_, PropDefaultsView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Nullable private CharSequence defaultsToNull_CharSequence = (CharSequence) null; /** * Bitset index: 1 */ @NonNull private CharSequence noDefaultSoItIsRequired_CharSequence; private int primitivesHaveImplicitDefaultsAndCannotBeRequired_Int = 0; private int primitiveWithExplicitDefault_Int = PropDefaultsView.PRIMITIVE_DEFAULT; @NonNull private String objectWithDefault_String = PropDefaultsView.STRING_DEFAULT; @Nullable private String objectWithDefaultAndNullable_String = PropDefaultsView.STRING_DEFAULT; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(1)) { throw new IllegalStateException("A value is required for noDefaultSoItIsRequired"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final PropDefaultsView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final PropDefaultsView object) { super.bind(object); object.primitiveWithExplicitDefault(primitiveWithExplicitDefault_Int); object.defaultsToNull(defaultsToNull_CharSequence); object.noDefaultSoItIsRequired(noDefaultSoItIsRequired_CharSequence); object.objectWithDefaultAndNullable(objectWithDefaultAndNullable_String); object.objectWithDefault(objectWithDefault_String); object.primitivesHaveImplicitDefaultsAndCannotBeRequired(primitivesHaveImplicitDefaultsAndCannotBeRequired_Int); } @Override public void bind(final PropDefaultsView object, EpoxyModel previousModel) { if (!(previousModel instanceof PropDefaultsViewModel_)) { bind(object); return; } PropDefaultsViewModel_ that = (PropDefaultsViewModel_) previousModel; super.bind(object); if ((primitiveWithExplicitDefault_Int != that.primitiveWithExplicitDefault_Int)) { object.primitiveWithExplicitDefault(primitiveWithExplicitDefault_Int); } if ((defaultsToNull_CharSequence != null ? !defaultsToNull_CharSequence.equals(that.defaultsToNull_CharSequence) : that.defaultsToNull_CharSequence != null)) { object.defaultsToNull(defaultsToNull_CharSequence); } if ((noDefaultSoItIsRequired_CharSequence != null ? !noDefaultSoItIsRequired_CharSequence.equals(that.noDefaultSoItIsRequired_CharSequence) : that.noDefaultSoItIsRequired_CharSequence != null)) { object.noDefaultSoItIsRequired(noDefaultSoItIsRequired_CharSequence); } if ((objectWithDefaultAndNullable_String != null ? !objectWithDefaultAndNullable_String.equals(that.objectWithDefaultAndNullable_String) : that.objectWithDefaultAndNullable_String != null)) { object.objectWithDefaultAndNullable(objectWithDefaultAndNullable_String); } if ((objectWithDefault_String != null ? !objectWithDefault_String.equals(that.objectWithDefault_String) : that.objectWithDefault_String != null)) { object.objectWithDefault(objectWithDefault_String); } if ((primitivesHaveImplicitDefaultsAndCannotBeRequired_Int != that.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int)) { object.primitivesHaveImplicitDefaultsAndCannotBeRequired(primitivesHaveImplicitDefaultsAndCannotBeRequired_Int); } } @Override public void handlePostBind(final PropDefaultsView 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 PropDefaultsViewModel_ onBind( OnModelBoundListener<PropDefaultsViewModel_, PropDefaultsView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(PropDefaultsView 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 PropDefaultsViewModel_ onUnbind( OnModelUnboundListener<PropDefaultsViewModel_, PropDefaultsView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final PropDefaultsView 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 PropDefaultsViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<PropDefaultsViewModel_, PropDefaultsView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final PropDefaultsView 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 PropDefaultsViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<PropDefaultsViewModel_, PropDefaultsView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is (CharSequence) null * * @see PropDefaultsView#defaultsToNull(CharSequence) */ public PropDefaultsViewModel_ defaultsToNull(@Nullable CharSequence defaultsToNull) { onMutation(); this.defaultsToNull_CharSequence = defaultsToNull; return this; } @Nullable public CharSequence defaultsToNull() { return defaultsToNull_CharSequence; } /** * <i>Required.</i> * * @see PropDefaultsView#noDefaultSoItIsRequired(CharSequence) */ public PropDefaultsViewModel_ noDefaultSoItIsRequired( @NonNull CharSequence noDefaultSoItIsRequired) { if (noDefaultSoItIsRequired == null) { throw new IllegalArgumentException("noDefaultSoItIsRequired cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(1); onMutation(); this.noDefaultSoItIsRequired_CharSequence = noDefaultSoItIsRequired; return this; } @NonNull public CharSequence noDefaultSoItIsRequired() { return noDefaultSoItIsRequired_CharSequence; } /** * <i>Optional</i>: Default value is 0 * * @see PropDefaultsView#primitivesHaveImplicitDefaultsAndCannotBeRequired(int) */ public PropDefaultsViewModel_ primitivesHaveImplicitDefaultsAndCannotBeRequired( int primitivesHaveImplicitDefaultsAndCannotBeRequired) { onMutation(); this.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int = primitivesHaveImplicitDefaultsAndCannotBeRequired; return this; } public int primitivesHaveImplicitDefaultsAndCannotBeRequired() { return primitivesHaveImplicitDefaultsAndCannotBeRequired_Int; } /** * <i>Optional</i>: Default value is <b>{@value PropDefaultsView#PRIMITIVE_DEFAULT}</b> * * @see PropDefaultsView#primitiveWithExplicitDefault(int) */ public PropDefaultsViewModel_ primitiveWithExplicitDefault(int primitiveWithExplicitDefault) { onMutation(); this.primitiveWithExplicitDefault_Int = primitiveWithExplicitDefault; return this; } public int primitiveWithExplicitDefault() { return primitiveWithExplicitDefault_Int; } /** * <i>Optional</i>: Default value is <b>{@value PropDefaultsView#STRING_DEFAULT}</b> * * @see PropDefaultsView#objectWithDefault(String) */ public PropDefaultsViewModel_ objectWithDefault(@NonNull String objectWithDefault) { if (objectWithDefault == null) { throw new IllegalArgumentException("objectWithDefault cannot be null"); } onMutation(); this.objectWithDefault_String = objectWithDefault; return this; } @NonNull public String objectWithDefault() { return objectWithDefault_String; } /** * <i>Optional</i>: Default value is <b>{@value PropDefaultsView#STRING_DEFAULT}</b> * * @see PropDefaultsView#objectWithDefaultAndNullable(String) */ public PropDefaultsViewModel_ objectWithDefaultAndNullable( @Nullable String objectWithDefaultAndNullable) { onMutation(); this.objectWithDefaultAndNullable_String = objectWithDefaultAndNullable; return this; } @Nullable public String objectWithDefaultAndNullable() { return objectWithDefaultAndNullable_String; } @Override public PropDefaultsViewModel_ id(long id) { super.id(id); return this; } @Override public PropDefaultsViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public PropDefaultsViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public PropDefaultsViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public PropDefaultsViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public PropDefaultsViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public PropDefaultsViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public PropDefaultsViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public PropDefaultsViewModel_ show() { super.show(); return this; } @Override public PropDefaultsViewModel_ show(boolean show) { super.show(show); return this; } @Override public PropDefaultsViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public PropDefaultsViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.defaultsToNull_CharSequence = (CharSequence) null; this.noDefaultSoItIsRequired_CharSequence = null; this.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int = 0; this.primitiveWithExplicitDefault_Int = PropDefaultsView.PRIMITIVE_DEFAULT; this.objectWithDefault_String = PropDefaultsView.STRING_DEFAULT; this.objectWithDefaultAndNullable_String = PropDefaultsView.STRING_DEFAULT; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PropDefaultsViewModel_)) { return false; } if (!super.equals(o)) { return false; } PropDefaultsViewModel_ that = (PropDefaultsViewModel_) 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 ((defaultsToNull_CharSequence != null ? !defaultsToNull_CharSequence.equals(that.defaultsToNull_CharSequence) : that.defaultsToNull_CharSequence != null)) { return false; } if ((noDefaultSoItIsRequired_CharSequence != null ? !noDefaultSoItIsRequired_CharSequence.equals(that.noDefaultSoItIsRequired_CharSequence) : that.noDefaultSoItIsRequired_CharSequence != null)) { return false; } if ((primitivesHaveImplicitDefaultsAndCannotBeRequired_Int != that.primitivesHaveImplicitDefaultsAndCannotBeRequired_Int)) { return false; } if ((primitiveWithExplicitDefault_Int != that.primitiveWithExplicitDefault_Int)) { return false; } if ((objectWithDefault_String != null ? !objectWithDefault_String.equals(that.objectWithDefault_String) : that.objectWithDefault_String != null)) { return false; } if ((objectWithDefaultAndNullable_String != null ? !objectWithDefaultAndNullable_String.equals(that.objectWithDefaultAndNullable_String) : that.objectWithDefaultAndNullable_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 + (defaultsToNull_CharSequence != null ? defaultsToNull_CharSequence.hashCode() : 0); _result = 31 * _result + (noDefaultSoItIsRequired_CharSequence != null ? noDefaultSoItIsRequired_CharSequence.hashCode() : 0); _result = 31 * _result + primitivesHaveImplicitDefaultsAndCannotBeRequired_Int; _result = 31 * _result + primitiveWithExplicitDefault_Int; _result = 31 * _result + (objectWithDefault_String != null ? objectWithDefault_String.hashCode() : 0); _result = 31 * _result + (objectWithDefaultAndNullable_String != null ? objectWithDefaultAndNullable_String.hashCode() : 0); return _result; } @Override public String toString() { return "PropDefaultsViewModel_{" + "defaultsToNull_CharSequence=" + defaultsToNull_CharSequence + ", noDefaultSoItIsRequired_CharSequence=" + noDefaultSoItIsRequired_CharSequence + ", primitivesHaveImplicitDefaultsAndCannotBeRequired_Int=" + primitivesHaveImplicitDefaultsAndCannotBeRequired_Int + ", primitiveWithExplicitDefault_Int=" + primitiveWithExplicitDefault_Int + ", objectWithDefault_String=" + objectWithDefault_String + ", objectWithDefaultAndNullable_String=" + objectWithDefaultAndNullable_String + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,628
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestCallbackPropMustBeNullableView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class TestCallbackPropMustBeNullableView extends View { public TestCallbackPropMustBeNullableView(Context context) { super(context); } @CallbackProp public void setListener(View.OnClickListener clickListener) { } }
8,629
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithSettterWithoutParams.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithSettterWithoutParams extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @Override protected int getDefaultLayout() { return 0; } public int getValueInt() { return valueInt; } public void setValueInt() { this.valueInt = 0; } }
8,630
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_.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$SubModelWithAnnotatedClassAndSuperAttributes_ extends ModelWithAnnotatedClassAndSuperAttributes.SubModelWithAnnotatedClassAndSuperAttributes implements GeneratedModel<Object>, ModelWithAnnotatedClassAndSuperAttributes_SubModelWithAnnotatedClassAndSuperAttributesBuilder { private OnModelBoundListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_() { 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$SubModelWithAnnotatedClassAndSuperAttributes_ onBind( OnModelBoundListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, 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$SubModelWithAnnotatedClassAndSuperAttributes_ onUnbind( OnModelUnboundListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, 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$SubModelWithAnnotatedClassAndSuperAttributes_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, 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$SubModelWithAnnotatedClassAndSuperAttributes_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ superValue( int superValue) { onMutation(); super.superValue = superValue; return this; } public int superValue() { return superValue; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ id( long id) { super.id(id); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ id( @Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ id( long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ id( @Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ id( @Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ id( @Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ layout( @LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ show( ) { super.show(); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ show( boolean show) { super.show(show); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ hide( ) { super.hide(); return this; } @Override public ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ 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$SubModelWithAnnotatedClassAndSuperAttributes_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_ that = (ModelWithAnnotatedClassAndSuperAttributes$SubModelWithAnnotatedClassAndSuperAttributes_) 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$SubModelWithAnnotatedClassAndSuperAttributes_{" + "superValue=" + superValue + "}" + super.toString(); } }
8,631
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelViewWithParis.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 com.airbnb.paris.annotations.Style; import com.airbnb.paris.annotations.Styleable; @Styleable @ModelView public class ModelViewWithParis extends View { @ModelProp int value; public ModelViewWithParis(Context context) { super(context); } @Style(isDefault = true) static void headerStyle(ModelViewWithParisStyleApplier.StyleBuilder builder) { } @Style static void otherStyle(ModelViewWithParisStyleApplier.StyleBuilder builder) { } }
8,632
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/Prop_throwsIfMultipleParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class Prop_throwsIfMultipleParams extends View { public Prop_throwsIfMultipleParams(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title, int prop) { } }
8,633
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/IgnoreRequireHashCodeView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import com.airbnb.epoxy.ModelProp.Option; @ModelView(defaultLayout = 1) public class IgnoreRequireHashCodeView extends View { public IgnoreRequireHashCodeView(Context context) { super(context); } @ModelProp(options = Option.IgnoreRequireHashCode) public void setClickListener(View.OnClickListener title) { } }
8,634
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAnnotation_.java
package com.airbnb.epoxy; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import java.lang.CharSequence; import java.lang.Deprecated; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ @Deprecated( since = "", forRemoval = false ) public class ModelWithAnnotation_ extends ModelWithAnnotation implements GeneratedModel<Object>, ModelWithAnnotationBuilder { private OnModelBoundListener<ModelWithAnnotation_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAnnotation_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAnnotation_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAnnotation_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAnnotation_() { 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 ModelWithAnnotation_ onBind(OnModelBoundListener<ModelWithAnnotation_, 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 ModelWithAnnotation_ onUnbind( OnModelUnboundListener<ModelWithAnnotation_, 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 ModelWithAnnotation_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAnnotation_, 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 ModelWithAnnotation_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAnnotation_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public ModelWithAnnotation_ id(long id) { super.id(id); return this; } @Override public ModelWithAnnotation_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelWithAnnotation_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelWithAnnotation_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelWithAnnotation_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelWithAnnotation_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelWithAnnotation_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelWithAnnotation_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelWithAnnotation_ show() { super.show(); return this; } @Override public ModelWithAnnotation_ show(boolean show) { super.show(show); return this; } @Override public ModelWithAnnotation_ hide() { super.hide(); return this; } @Override public ModelWithAnnotation_ 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 ModelWithAnnotation_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAnnotation_ that = (ModelWithAnnotation_) 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 "ModelWithAnnotation_{" + "}" + super.toString(); } }
8,635
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithIsPrefixGetter.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithIsPrefixGetter extends EpoxyModel<Object> { @EpoxyAttribute private boolean valueBoolean; @Override protected int getDefaultLayout() { return 0; } public boolean isValueBoolean() { return valueBoolean; } public void setValueBoolean(boolean valueBoolean) { this.valueBoolean = valueBoolean; } }
8,636
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestManyTypesView.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Dimension; import androidx.annotation.IntRange; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.StringRes; import kotlin.jvm.functions.Function3; import android.view.View; import com.airbnb.epoxy.ModelProp.Option; import com.airbnb.epoxy.EpoxyModel; import java.util.List; import java.util.Map; @ModelView(defaultLayout = 1) public class TestManyTypesView extends View { public static final int TO_RANGE = 200; public TestManyTypesView(Context context) { super(context); } // Also testing package private setters @ModelProp void setStringValue(String value) { } @ModelProp void setNullableStringValue(@Nullable String value) { } @ModelProp(Option.DoNotHash) void setFunction(Function3<Integer, Integer, Integer, Integer> funct) { } @ModelProp void setIntValue(int value) { } @ModelProp void setIntValueWithAnnotation(@StringRes int value) { } @ModelProp void setIntValueWithRangeAnnotation(@IntRange(from = 0, to = TO_RANGE) int value) { } @ModelProp void setIntValueWithDimenTypeAnnotation(@Dimension(unit = Dimension.DP) int value) { } @ModelProp void setIntWithMultipleAnnotations(@IntRange(from = 0, to = TO_RANGE) @Dimension(unit = Dimension.DP) int value) { } @ModelProp void setIntegerValue(Integer value) { } @ModelProp void setBoolValue(boolean value) { } @ModelProp void setModels(List<? extends EpoxyModel<?>> models) { } @ModelProp public void setBooleanValue(Boolean value) { } @ModelProp public void setArrayValue(String[] value) { } @ModelProp public void setListValue(List<String> value) { } @ModelProp public void setMapValue(Map<Integer, Integer> value) { } @ModelProp(options = Option.DoNotHash) public void setClickListener(View.OnClickListener value) { } @ModelProp(options = ModelProp.Option.GenerateStringOverloads) public void setTitle(@Nullable CharSequence title) { } }
8,637
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityChangedView_throwsIfNoParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityChangedView_throwsIfNoParams extends View { public OnVisibilityChangedView_throwsIfNoParams(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityChanged void onVisibilityChanged() { } }
8,638
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/StringOverloads_throwsIfNotCharSequence.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class StringOverloads_throwsIfNotCharSequence extends View { public StringOverloads_throwsIfNotCharSequence(Context context) { super(context); } @ModelProp(options = ModelProp.Option.GenerateStringOverloads) public void setTitle(String title) { } }
8,639
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateFieldWithoutGetterAndSetter.java
package com.airbnb.epoxy; public class ModelWithPrivateFieldWithoutGetterAndSetter extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @Override protected int getDefaultLayout() { return 0; } }
8,640
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelRequiresHashCodeIterableFails.java
package com.airbnb.epoxy.configtest; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; import java.util.List; public class ModelRequiresHashCodeIterableFails extends EpoxyModel<Object> { @EpoxyAttribute List<Object> clickListener; @Override protected int getDefaultLayout() { return 0; } }
8,641
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AbstractEpoxyModelWithView.java
package com.airbnb.epoxy; import android.view.View; import android.view.ViewGroup; import com.airbnb.epoxy.EpoxyModelClass; import com.airbnb.epoxy.EpoxyModelWithView; import androidx.annotation.NonNull; @EpoxyModelClass public abstract class AbstractEpoxyModelWithView extends EpoxyModelWithView<View> { @Override public View buildView(@NonNull ViewGroup parent) { return new View(parent.getContext()); } }
8,642
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithIntDef.java
package com.airbnb.epoxy.models; import androidx.annotation.IntDef; import com.airbnb.epoxy.EpoxyAttribute; import com.airbnb.epoxy.EpoxyModel; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.SOURCE; public class ModelWithIntDef extends EpoxyModel<Object> { @Retention(SOURCE) @IntDef({TYPE_1}) public @interface MyType {} public static final int TYPE_1 = 1; @EpoxyAttribute @MyType int type; @Override protected int getDefaultLayout() { return 0; } }
8,643
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAbstractClass.java
package com.airbnb.epoxy; public abstract class ModelWithAbstractClass extends EpoxyModel<Object> { @Override protected int getDefaultLayout() { return 0; } }
8,644
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityStateChangedView_throwsIfStatic.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityStateChangedView_throwsIfStatic extends View { public OnVisibilityStateChangedView_throwsIfStatic(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityStateChanged static void onVisibilityStateChanged(int s) { } }
8,645
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnViewRecycledView.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnViewRecycledView extends View { public OnViewRecycledView(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnViewRecycled void onRecycled1() { // also testing package private works } @OnViewRecycled public void onRecycled2() { } }
8,646
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelForRProcessingTest_.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 ModelForRProcessingTest_ extends ModelForRProcessingTest implements GeneratedModel<Object>, ModelForRProcessingTestBuilder { private OnModelBoundListener<ModelForRProcessingTest_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelForRProcessingTest_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelForRProcessingTest_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelForRProcessingTest_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelForRProcessingTest_() { 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 ModelForRProcessingTest_ onBind( OnModelBoundListener<ModelForRProcessingTest_, 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 ModelForRProcessingTest_ onUnbind( OnModelUnboundListener<ModelForRProcessingTest_, 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 ModelForRProcessingTest_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelForRProcessingTest_, 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 ModelForRProcessingTest_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelForRProcessingTest_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelForRProcessingTest_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public ModelForRProcessingTest_ id(long id) { super.id(id); return this; } @Override public ModelForRProcessingTest_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelForRProcessingTest_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelForRProcessingTest_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelForRProcessingTest_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelForRProcessingTest_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelForRProcessingTest_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelForRProcessingTest_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelForRProcessingTest_ show() { super.show(); return this; } @Override public ModelForRProcessingTest_ show(boolean show) { super.show(show); return this; } @Override public ModelForRProcessingTest_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.res; } @Override public ModelForRProcessingTest_ 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 ModelForRProcessingTest_)) { return false; } if (!super.equals(o)) { return false; } ModelForRProcessingTest_ that = (ModelForRProcessingTest_) 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 "ModelForRProcessingTest_{" + "value=" + value + "}" + super.toString(); } }
8,647
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestTextPropIfNotCharSequenceView.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 TestTextPropIfNotCharSequenceView extends View { @TextProp OnClickListener value; public TestTextPropIfNotCharSequenceView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,648
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/PropDefaultsView_throwsForNotFound.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class PropDefaultsView_throwsForNotFound extends View { public PropDefaultsView_throwsForNotFound(Context context) { super(context); } @ModelProp(defaultValue = "PRIMITIVE_DEFAULT") public void primitiveWithExplicitDefault(int title) { } }
8,649
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/EpoxyModelGroupWithAnnotations_.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.Collection; /** * Generated file. Do not modify! */ public class EpoxyModelGroupWithAnnotations_ extends EpoxyModelGroupWithAnnotations implements GeneratedModel<ModelGroupHolder>, EpoxyModelGroupWithAnnotationsBuilder { private OnModelBoundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> onModelVisibilityChangedListener_epoxyGeneratedModel; public EpoxyModelGroupWithAnnotations_(int layoutRes, Collection<? extends EpoxyModel<?>> models) { super(layoutRes, models); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final ModelGroupHolder object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final ModelGroupHolder 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 EpoxyModelGroupWithAnnotations_ onBind( OnModelBoundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(ModelGroupHolder 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 EpoxyModelGroupWithAnnotations_ onUnbind( OnModelUnboundListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final ModelGroupHolder 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 EpoxyModelGroupWithAnnotations_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final ModelGroupHolder 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 EpoxyModelGroupWithAnnotations_ onVisibilityChanged( OnModelVisibilityChangedListener<EpoxyModelGroupWithAnnotations_, ModelGroupHolder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public EpoxyModelGroupWithAnnotations_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public EpoxyModelGroupWithAnnotations_ shouldSaveViewState(boolean shouldSaveViewState) { super.shouldSaveViewState(shouldSaveViewState); return this; } @Override public EpoxyModelGroupWithAnnotations_ id(long id) { super.id(id); return this; } @Override public EpoxyModelGroupWithAnnotations_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public EpoxyModelGroupWithAnnotations_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public EpoxyModelGroupWithAnnotations_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public EpoxyModelGroupWithAnnotations_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public EpoxyModelGroupWithAnnotations_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public EpoxyModelGroupWithAnnotations_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public EpoxyModelGroupWithAnnotations_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public EpoxyModelGroupWithAnnotations_ show() { super.show(); return this; } @Override public EpoxyModelGroupWithAnnotations_ show(boolean show) { super.show(show); return this; } @Override public EpoxyModelGroupWithAnnotations_ hide() { super.hide(); return this; } @Override public EpoxyModelGroupWithAnnotations_ 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 EpoxyModelGroupWithAnnotations_)) { return false; } if (!super.equals(o)) { return false; } EpoxyModelGroupWithAnnotations_ that = (EpoxyModelGroupWithAnnotations_) 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 "EpoxyModelGroupWithAnnotations_{" + "value=" + value + "}" + super.toString(); } }
8,650
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAllPrivateFieldTypes.java
package com.airbnb.epoxy; import java.util.List; public class ModelWithAllPrivateFieldTypes extends EpoxyModel<Object> { @EpoxyAttribute private int valueInt; @EpoxyAttribute private Integer valueInteger; @EpoxyAttribute private short valueShort; @EpoxyAttribute private Short valueShortWrapper; @EpoxyAttribute private char valueChar; @EpoxyAttribute private Character valueCharacter; @EpoxyAttribute private byte valuebByte; @EpoxyAttribute private Byte valueByteWrapper; @EpoxyAttribute private long valueLong; @EpoxyAttribute private Long valueLongWrapper; @EpoxyAttribute private double valueDouble; @EpoxyAttribute private Double valueDoubleWrapper; @EpoxyAttribute private float valueFloat; @EpoxyAttribute private Float valueFloatWrapper; @EpoxyAttribute private boolean valueBoolean; @EpoxyAttribute private Boolean valueBooleanWrapper; @EpoxyAttribute private int[] valueIntArray; @EpoxyAttribute private Object[] valueObjectArray; @EpoxyAttribute private String valueString; @EpoxyAttribute private Object valueObject; @EpoxyAttribute private List<String> valueList; @Override protected int getDefaultLayout() { return 0; } public int getValueInt() { return valueInt; } public void setValueInt(int valueInt) { this.valueInt = valueInt; } public Integer getValueInteger() { return valueInteger; } public void setValueInteger(Integer valueInteger) { this.valueInteger = valueInteger; } public short getValueShort() { return valueShort; } public void setValueShort(short valueShort) { this.valueShort = valueShort; } public Short getValueShortWrapper() { return valueShortWrapper; } public void setValueShortWrapper(Short valueShortWrapper) { this.valueShortWrapper = valueShortWrapper; } public char getValueChar() { return valueChar; } public void setValueChar(char valueChar) { this.valueChar = valueChar; } public Character getValueCharacter() { return valueCharacter; } public void setValueCharacter(Character valueCharacter) { this.valueCharacter = valueCharacter; } public byte getValuebByte() { return valuebByte; } public void setValuebByte(byte valuebByte) { this.valuebByte = valuebByte; } public Byte getValueByteWrapper() { return valueByteWrapper; } public void setValueByteWrapper(Byte valueByteWrapper) { this.valueByteWrapper = valueByteWrapper; } public long getValueLong() { return valueLong; } public void setValueLong(long valueLong) { this.valueLong = valueLong; } public Long getValueLongWrapper() { return valueLongWrapper; } public void setValueLongWrapper(Long valueLongWrapper) { this.valueLongWrapper = valueLongWrapper; } public double getValueDouble() { return valueDouble; } public void setValueDouble(double valueDouble) { this.valueDouble = valueDouble; } public Double getValueDoubleWrapper() { return valueDoubleWrapper; } public void setValueDoubleWrapper(Double valueDoubleWrapper) { this.valueDoubleWrapper = valueDoubleWrapper; } public float getValueFloat() { return valueFloat; } public void setValueFloat(float valueFloat) { this.valueFloat = valueFloat; } public Float getValueFloatWrapper() { return valueFloatWrapper; } public void setValueFloatWrapper(Float valueFloatWrapper) { this.valueFloatWrapper = valueFloatWrapper; } public boolean isValueBoolean() { return valueBoolean; } public void setValueBoolean(boolean valueBoolean) { this.valueBoolean = valueBoolean; } public Boolean getValueBooleanWrapper() { return valueBooleanWrapper; } public void setValueBooleanWrapper(Boolean valueBooleanWrapper) { this.valueBooleanWrapper = valueBooleanWrapper; } public int[] getValueIntArray() { return valueIntArray; } public void setValueIntArray(int[] valueIntArray) { this.valueIntArray = valueIntArray; } public Object[] getValueObjectArray() { return valueObjectArray; } public void setValueObjectArray(Object[] valueObjectArray) { this.valueObjectArray = valueObjectArray; } public String getValueString() { return valueString; } public void setValueString(String valueString) { this.valueString = valueString; } public Object getValueObject() { return valueObject; } public void setValueObject(Object valueObject) { this.valueObject = valueObject; } public List<String> getValueList() { return valueList; } public void setValueList(List<String> valueList) { this.valueList = valueList; } }
8,651
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityChangedViewModel_.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 OnVisibilityChangedViewModel_ extends EpoxyModel<OnVisibilityChangedView> implements GeneratedModel<OnVisibilityChangedView>, OnVisibilityChangedViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> 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 OnVisibilityChangedView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final OnVisibilityChangedView object) { super.bind(object); object.setTitle(title_CharSequence); } @Override public void bind(final OnVisibilityChangedView object, EpoxyModel previousModel) { if (!(previousModel instanceof OnVisibilityChangedViewModel_)) { bind(object); return; } OnVisibilityChangedViewModel_ that = (OnVisibilityChangedViewModel_) 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 OnVisibilityChangedView 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 OnVisibilityChangedViewModel_ onBind( OnModelBoundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(OnVisibilityChangedView 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 OnVisibilityChangedViewModel_ onUnbind( OnModelUnboundListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final OnVisibilityChangedView 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 OnVisibilityChangedViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final OnVisibilityChangedView object) { if (onModelVisibilityChangedListener_epoxyGeneratedModel != null) { onModelVisibilityChangedListener_epoxyGeneratedModel.onVisibilityChanged(this, object, percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); } object.onVisibilityChanged1(percentVisibleHeight, percentVisibleWidth, visibleHeight, visibleWidth); object.onVisibilityChanged2(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 OnVisibilityChangedViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<OnVisibilityChangedViewModel_, OnVisibilityChangedView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see OnVisibilityChangedView#setTitle(CharSequence) */ public OnVisibilityChangedViewModel_ 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 OnVisibilityChangedViewModel_ id(long id) { super.id(id); return this; } @Override public OnVisibilityChangedViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public OnVisibilityChangedViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public OnVisibilityChangedViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public OnVisibilityChangedViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public OnVisibilityChangedViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public OnVisibilityChangedViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public OnVisibilityChangedViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public OnVisibilityChangedViewModel_ show() { super.show(); return this; } @Override public OnVisibilityChangedViewModel_ show(boolean show) { super.show(show); return this; } @Override public OnVisibilityChangedViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public OnVisibilityChangedViewModel_ 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 OnVisibilityChangedViewModel_)) { return false; } if (!super.equals(o)) { return false; } OnVisibilityChangedViewModel_ that = (OnVisibilityChangedViewModel_) 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 "OnVisibilityChangedViewModel_{" + "title_CharSequence=" + title_CharSequence + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,652
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerWithAutoModelWithoutValidation.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.AutoModel; import com.airbnb.epoxy.BasicModelWithAttribute_; import com.airbnb.epoxy.EpoxyController; public class ControllerWithAutoModelWithoutValidation extends EpoxyController { @AutoModel BasicModelWithAttribute_ modelWithAttribute1; @AutoModel BasicModelWithAttribute_ modelWithAttribute2; @Override protected void buildModels() { } }
8,653
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/DefaultPackageLayoutPatternViewModel_.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 DefaultPackageLayoutPatternViewModel_ extends EpoxyModel<DefaultPackageLayoutPatternView> implements GeneratedModel<DefaultPackageLayoutPatternView>, DefaultPackageLayoutPatternViewModelBuilder { private OnModelBoundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final DefaultPackageLayoutPatternView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final DefaultPackageLayoutPatternView object) { super.bind(object); } @Override public void bind(final DefaultPackageLayoutPatternView object, EpoxyModel previousModel) { if (!(previousModel instanceof DefaultPackageLayoutPatternViewModel_)) { bind(object); return; } DefaultPackageLayoutPatternViewModel_ that = (DefaultPackageLayoutPatternViewModel_) previousModel; super.bind(object); } @Override public void handlePostBind(final DefaultPackageLayoutPatternView 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 DefaultPackageLayoutPatternViewModel_ onBind( OnModelBoundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(DefaultPackageLayoutPatternView 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 DefaultPackageLayoutPatternViewModel_ onUnbind( OnModelUnboundListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final DefaultPackageLayoutPatternView 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 DefaultPackageLayoutPatternViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final DefaultPackageLayoutPatternView 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 DefaultPackageLayoutPatternViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<DefaultPackageLayoutPatternViewModel_, DefaultPackageLayoutPatternView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } @Override public DefaultPackageLayoutPatternViewModel_ id(long id) { super.id(id); return this; } @Override public DefaultPackageLayoutPatternViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public DefaultPackageLayoutPatternViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public DefaultPackageLayoutPatternViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public DefaultPackageLayoutPatternViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public DefaultPackageLayoutPatternViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public DefaultPackageLayoutPatternViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public DefaultPackageLayoutPatternViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public DefaultPackageLayoutPatternViewModel_ show() { super.show(); return this; } @Override public DefaultPackageLayoutPatternViewModel_ show(boolean show) { super.show(show); return this; } @Override public DefaultPackageLayoutPatternViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return R.layout.default_package_layout_pattern_view; } @Override public DefaultPackageLayoutPatternViewModel_ 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 DefaultPackageLayoutPatternViewModel_)) { return false; } if (!super.equals(o)) { return false; } DefaultPackageLayoutPatternViewModel_ that = (DefaultPackageLayoutPatternViewModel_) 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 "DefaultPackageLayoutPatternViewModel_{" + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,654
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethodParentLayout.java
package com.airbnb.epoxy; public class GenerateDefaultLayoutMethodParentLayout { @EpoxyModelClass public static abstract class NoLayout extends WithLayout { @EpoxyAttribute int value; } @EpoxyModelClass(layout = 1) public static abstract class WithLayout extends EpoxyModel<Object> { } }
8,655
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateViewClickListener.java
package com.airbnb.epoxy; import android.view.View; import android.view.View.OnClickListener; import com.airbnb.epoxy.EpoxyAttribute.Option; import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash; public class ModelWithPrivateViewClickListener extends EpoxyModel<Object> { @EpoxyAttribute(DoNotHash) private View.OnClickListener clickListener; @Override protected int getDefaultLayout() { return 0; } public OnClickListener getClickListener() { return clickListener; } public void setClickListener(OnClickListener clickListener) { this.clickListener = clickListener; } }
8,656
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/OnVisibilityStateChangedView_throwsIfPrivate.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class OnVisibilityStateChangedView_throwsIfPrivate extends View { public OnVisibilityStateChangedView_throwsIfPrivate(Context context) { super(context); } @ModelProp public void setTitle(CharSequence title) { } @OnVisibilityStateChanged private void onVisibilityStateChanged(int s) { } }
8,657
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAbstractClassAndAnnotation.java
package com.airbnb.epoxy; @EpoxyModelClass public abstract class ModelWithAbstractClassAndAnnotation extends EpoxyModel<Object> { @Override protected int getDefaultLayout() { return 0; } }
8,658
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropParentView.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 TestFieldPropParentView extends View { @ModelProp(options = {Option.NullOnRecycle, Option.IgnoreRequireHashCode}) @Nullable OnClickListener value; public TestFieldPropParentView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,659
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestStringOverloadsView.java
package com.airbnb.epoxy; import android.content.Context; import androidx.annotation.Nullable; import android.view.View; import java.util.List; @ModelView(defaultLayout = 1) public class TestStringOverloadsView extends View { public TestStringOverloadsView(Context context) { super(context); } @ModelProp(options = ModelProp.Option.GenerateStringOverloads) public void setTitle(CharSequence title) { } @ModelProp public void setTitle(@Nullable List<CharSequence> title) { // testing that a nullable overload works correctly // test setting options via the value param shortcut } @ModelProp(ModelProp.Option.GenerateStringOverloads) public void setTitleViaValueShortcut(CharSequence title) { // test setting options via the value param shortcut } }
8,660
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoLayoutModelViewManualLayoutParams.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import android.view.ViewGroup.LayoutParams; import com.airbnb.epoxy.ModelView.Size; @ModelView(autoLayout = Size.MANUAL) public class AutoLayoutModelViewManualLayoutParams extends View { public AutoLayoutModelViewManualLayoutParams(Context context) { super(context); setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); } @ModelProp void setValue(int value) { } }
8,661
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithPrivateInnerClass.java
package com.airbnb.epoxy; public class ModelWithPrivateInnerClass extends EpoxyModel<Object> { @Override protected int getDefaultLayout() { return 0; } private static class Test extends EpoxyModel<Object> { @EpoxyAttribute int value; @Override protected int getDefaultLayout() { return 0; } } }
8,662
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/GenerateDefaultLayoutMethod_.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 GenerateDefaultLayoutMethod_ extends GenerateDefaultLayoutMethod implements GeneratedModel<Object>, GenerateDefaultLayoutMethodBuilder { private OnModelBoundListener<GenerateDefaultLayoutMethod_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GenerateDefaultLayoutMethod_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethod_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethod_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public GenerateDefaultLayoutMethod_() { 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 GenerateDefaultLayoutMethod_ onBind( OnModelBoundListener<GenerateDefaultLayoutMethod_, 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 GenerateDefaultLayoutMethod_ onUnbind( OnModelUnboundListener<GenerateDefaultLayoutMethod_, 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 GenerateDefaultLayoutMethod_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethod_, 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 GenerateDefaultLayoutMethod_ onVisibilityChanged( OnModelVisibilityChangedListener<GenerateDefaultLayoutMethod_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public GenerateDefaultLayoutMethod_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public GenerateDefaultLayoutMethod_ id(long id) { super.id(id); return this; } @Override public GenerateDefaultLayoutMethod_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public GenerateDefaultLayoutMethod_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public GenerateDefaultLayoutMethod_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public GenerateDefaultLayoutMethod_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public GenerateDefaultLayoutMethod_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public GenerateDefaultLayoutMethod_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public GenerateDefaultLayoutMethod_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public GenerateDefaultLayoutMethod_ show() { super.show(); return this; } @Override public GenerateDefaultLayoutMethod_ show(boolean show) { super.show(show); return this; } @Override public GenerateDefaultLayoutMethod_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GenerateDefaultLayoutMethod_ 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 GenerateDefaultLayoutMethod_)) { return false; } if (!super.equals(o)) { return false; } GenerateDefaultLayoutMethod_ that = (GenerateDefaultLayoutMethod_) 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 "GenerateDefaultLayoutMethod_{" + "value=" + value + "}" + super.toString(); } }
8,663
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithoutEpoxyExtension.java
package com.airbnb.epoxy; public class ModelWithoutEpoxyExtension extends Object { @EpoxyAttribute int valueInt; @Override protected int getDefaultLayout() { return 0; } }
8,664
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropThrowsIfPrivateView.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 TestFieldPropThrowsIfPrivateView extends View { @ModelProp private String value; public TestFieldPropThrowsIfPrivateView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,665
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropCallbackPropViewModel_.java
package com.airbnb.epoxy; import android.view.View; 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 TestFieldPropCallbackPropViewModel_ extends EpoxyModel<TestFieldPropCallbackPropView> implements GeneratedModel<TestFieldPropCallbackPropView>, TestFieldPropCallbackPropViewModelBuilder { private OnModelBoundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Nullable private View.OnClickListener value_OnClickListener = (View.OnClickListener) null; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public TestFieldPropCallbackPropView buildView(ViewGroup parent) { TestFieldPropCallbackPropView v = new TestFieldPropCallbackPropView(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 TestFieldPropCallbackPropView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropCallbackPropView object) { super.bind(object); object.value = value_OnClickListener; } @Override public void bind(final TestFieldPropCallbackPropView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropCallbackPropViewModel_)) { bind(object); return; } TestFieldPropCallbackPropViewModel_ that = (TestFieldPropCallbackPropViewModel_) previousModel; super.bind(object); if (((value_OnClickListener == null) != (that.value_OnClickListener == null))) { object.value = value_OnClickListener; } } @Override public void handlePostBind(final TestFieldPropCallbackPropView 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 TestFieldPropCallbackPropViewModel_ onBind( OnModelBoundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropCallbackPropView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.value = (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 TestFieldPropCallbackPropViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropCallbackPropView 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 TestFieldPropCallbackPropViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropCallbackPropView 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 TestFieldPropCallbackPropViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> 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 TestFieldPropCallbackPropViewModel_ value( @Nullable final OnModelClickListener<TestFieldPropCallbackPropViewModel_, TestFieldPropCallbackPropView> value) { onMutation(); if (value == null) { this.value_OnClickListener = null; } else { this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value); } return this; } /** * <i>Optional</i>: Default value is (View.OnClickListener) null * * @see TestFieldPropCallbackPropView#value */ public TestFieldPropCallbackPropViewModel_ value(@Nullable View.OnClickListener value) { onMutation(); this.value_OnClickListener = value; return this; } @Nullable public View.OnClickListener value() { return value_OnClickListener; } @Override public TestFieldPropCallbackPropViewModel_ id(long id) { super.id(id); return this; } @Override public TestFieldPropCallbackPropViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public TestFieldPropCallbackPropViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestFieldPropCallbackPropViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public TestFieldPropCallbackPropViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestFieldPropCallbackPropViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestFieldPropCallbackPropViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropCallbackPropViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestFieldPropCallbackPropViewModel_ show() { super.show(); return this; } @Override public TestFieldPropCallbackPropViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestFieldPropCallbackPropViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropCallbackPropViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.value_OnClickListener = (View.OnClickListener) null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropCallbackPropViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropCallbackPropViewModel_ that = (TestFieldPropCallbackPropViewModel_) 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 "TestFieldPropCallbackPropViewModel_{" + "value_OnClickListener=" + value_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,666
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelDoNotUseInToString_.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 ModelDoNotUseInToString_ extends ModelDoNotUseInToString implements GeneratedModel<Object>, ModelDoNotUseInToStringBuilder { private OnModelBoundListener<ModelDoNotUseInToString_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelDoNotUseInToString_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelDoNotUseInToString_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelDoNotUseInToString_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelDoNotUseInToString_() { 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 ModelDoNotUseInToString_ onBind( OnModelBoundListener<ModelDoNotUseInToString_, 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 ModelDoNotUseInToString_ onUnbind( OnModelUnboundListener<ModelDoNotUseInToString_, 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 ModelDoNotUseInToString_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelDoNotUseInToString_, 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 ModelDoNotUseInToString_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelDoNotUseInToString_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelDoNotUseInToString_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } public ModelDoNotUseInToString_ value2(int value2) { onMutation(); super.value2 = value2; return this; } public int value2() { return value2; } public ModelDoNotUseInToString_ value3(String value3) { onMutation(); super.value3 = value3; return this; } public String value3() { return value3; } @Override public ModelDoNotUseInToString_ id(long id) { super.id(id); return this; } @Override public ModelDoNotUseInToString_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public ModelDoNotUseInToString_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public ModelDoNotUseInToString_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public ModelDoNotUseInToString_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public ModelDoNotUseInToString_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public ModelDoNotUseInToString_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public ModelDoNotUseInToString_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public ModelDoNotUseInToString_ show() { super.show(); return this; } @Override public ModelDoNotUseInToString_ show(boolean show) { super.show(show); return this; } @Override public ModelDoNotUseInToString_ hide() { super.hide(); return this; } @Override public ModelDoNotUseInToString_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.value2 = 0; super.value3 = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelDoNotUseInToString_)) { return false; } if (!super.equals(o)) { return false; } ModelDoNotUseInToString_ that = (ModelDoNotUseInToString_) 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; } if ((value2 != that.value2)) { return false; } if ((value3 != null ? !value3.equals(that.value3) : that.value3 != 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; _result = 31 * _result + value2; _result = 31 * _result + (value3 != null ? value3.hashCode() : 0); return _result; } @Override public String toString() { return "ModelDoNotUseInToString_{" + "value=" + value + "}" + super.toString(); } }
8,667
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelAsInnerClass.java
package com.airbnb.epoxy; public class ModelAsInnerClass { class InnerClass extends EpoxyModel<Object> { @EpoxyAttribute int valueInt; @Override protected int getDefaultLayout() { return 0; } } }
8,668
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/Prop_throwsIfPrivate.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; @ModelView(defaultLayout = 1) public class Prop_throwsIfPrivate extends View { public Prop_throwsIfPrivate(Context context) { super(context); } @ModelProp private void setTitle(CharSequence title) { } }
8,669
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/BaseModelView.java
package com.airbnb.epoxy; import android.content.Context; import android.widget.FrameLayout; @ModelView(defaultLayout = 1, baseModelClass = TestBaseModel.class) public class BaseModelView extends FrameLayout { public BaseModelView(Context context) { super(context); } @ModelProp public void setClickListener(String title) { } }
8,670
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropDoNotHashOptionView.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 TestFieldPropDoNotHashOptionView extends View { @ModelProp(options = Option.DoNotHash) OnClickListener value; public TestFieldPropDoNotHashOptionView(Context context) { super(context); } @AfterPropsSet public void call() { } }
8,671
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/AutoModelNotInAutoAdapter.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.AutoModel; import com.airbnb.epoxy.BasicModelWithAttribute_; public class AutoModelNotInAutoAdapter { @AutoModel BasicModelWithAttribute_ modelWithAttribute_; }
8,672
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ControllerWithAutoModel_EpoxyHelper.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.BasicModelWithAttribute_; import com.airbnb.epoxy.ControllerHelper; import com.airbnb.epoxy.EpoxyModel; import java.lang.IllegalStateException; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ControllerWithAutoModel_EpoxyHelper extends ControllerHelper<ControllerWithAutoModel> { private final ControllerWithAutoModel controller; private EpoxyModel modelWithAttribute2; private EpoxyModel modelWithAttribute1; public ControllerWithAutoModel_EpoxyHelper(ControllerWithAutoModel controller) { this.controller = controller; } @Override public void resetAutoModels() { validateModelsHaveNotChanged(); controller.modelWithAttribute2 = new BasicModelWithAttribute_(); controller.modelWithAttribute2.id(-1); controller.modelWithAttribute1 = new BasicModelWithAttribute_(); controller.modelWithAttribute1.id(-2); saveModelsForNextValidation(); } private void validateModelsHaveNotChanged() { validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -1); validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -2); validateModelHashCodesHaveNotChanged(controller); } private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject, String fieldName, int id) { if (expectedObject != actualObject) { throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")"); } if (actualObject != null && actualObject.id() != id) { throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")"); } } private void saveModelsForNextValidation() { modelWithAttribute2 = controller.modelWithAttribute2; modelWithAttribute1 = controller.modelWithAttribute1; } }
8,673
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/TestFieldPropNullOnRecycleOptionViewModel_.java
package com.airbnb.epoxy; import android.view.View; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import java.lang.CharSequence; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.UnsupportedOperationException; import javax.annotation.Nullable; /** * Generated file. Do not modify! */ public class TestFieldPropNullOnRecycleOptionViewModel_ extends EpoxyModel<TestFieldPropNullOnRecycleOptionView> implements GeneratedModel<TestFieldPropNullOnRecycleOptionView>, TestFieldPropNullOnRecycleOptionViewModelBuilder { private OnModelBoundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel; @Nullable private View.OnClickListener value_OnClickListener = (View.OnClickListener) null; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public TestFieldPropNullOnRecycleOptionView buildView(ViewGroup parent) { TestFieldPropNullOnRecycleOptionView v = new TestFieldPropNullOnRecycleOptionView(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 TestFieldPropNullOnRecycleOptionView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropNullOnRecycleOptionView object) { super.bind(object); object.value = value_OnClickListener; } @Override public void bind(final TestFieldPropNullOnRecycleOptionView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropNullOnRecycleOptionViewModel_)) { bind(object); return; } TestFieldPropNullOnRecycleOptionViewModel_ that = (TestFieldPropNullOnRecycleOptionViewModel_) 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 TestFieldPropNullOnRecycleOptionView 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 TestFieldPropNullOnRecycleOptionViewModel_ onBind( OnModelBoundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropNullOnRecycleOptionView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.value = (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 TestFieldPropNullOnRecycleOptionViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropNullOnRecycleOptionView 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 TestFieldPropNullOnRecycleOptionViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropNullOnRecycleOptionView 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 TestFieldPropNullOnRecycleOptionViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> 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 TestFieldPropNullOnRecycleOptionViewModel_ value( @Nullable final OnModelClickListener<TestFieldPropNullOnRecycleOptionViewModel_, TestFieldPropNullOnRecycleOptionView> value) { onMutation(); if (value == null) { this.value_OnClickListener = null; } else { this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value); } return this; } /** * <i>Optional</i>: Default value is (View.OnClickListener) null * * @see TestFieldPropNullOnRecycleOptionView#value */ public TestFieldPropNullOnRecycleOptionViewModel_ value(@Nullable View.OnClickListener value) { onMutation(); this.value_OnClickListener = value; return this; } @Nullable public View.OnClickListener value() { return value_OnClickListener; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ id(long id) { super.id(id); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ id( @androidx.annotation.Nullable Number... ids) { super.id(ids); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ id( @androidx.annotation.Nullable CharSequence key) { super.id(key); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ id( @androidx.annotation.Nullable CharSequence key, @androidx.annotation.Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ id( @androidx.annotation.Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ layout(@LayoutRes int layoutRes) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropNullOnRecycleOptionViewModel_ spanSizeOverride( @androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ show() { super.show(); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ show(boolean show) { super.show(show); return this; } @Override public TestFieldPropNullOnRecycleOptionViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropNullOnRecycleOptionViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.value_OnClickListener = (View.OnClickListener) null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropNullOnRecycleOptionViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropNullOnRecycleOptionViewModel_ that = (TestFieldPropNullOnRecycleOptionViewModel_) 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 "TestFieldPropNullOnRecycleOptionViewModel_{" + "value_OnClickListener=" + value_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,674
0
Create_ds/epoxy/epoxy-processortest/src/test
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelWithAllFieldTypesBuilder.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.Short; import java.lang.String; import java.util.List; @EpoxyBuildScope public interface ModelWithAllFieldTypesBuilder { ModelWithAllFieldTypesBuilder onBind( OnModelBoundListener<ModelWithAllFieldTypes_, Object> listener); ModelWithAllFieldTypesBuilder onUnbind( OnModelUnboundListener<ModelWithAllFieldTypes_, Object> listener); ModelWithAllFieldTypesBuilder onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAllFieldTypes_, Object> listener); ModelWithAllFieldTypesBuilder onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAllFieldTypes_, Object> listener); ModelWithAllFieldTypesBuilder valueInt(int valueInt); ModelWithAllFieldTypesBuilder valueInteger(Integer valueInteger); ModelWithAllFieldTypesBuilder valueShort(short valueShort); ModelWithAllFieldTypesBuilder valueShortWrapper(Short valueShortWrapper); ModelWithAllFieldTypesBuilder valueChar(char valueChar); ModelWithAllFieldTypesBuilder valueCharacter(Character valueCharacter); ModelWithAllFieldTypesBuilder valuebByte(byte valuebByte); ModelWithAllFieldTypesBuilder valueByteWrapper(Byte valueByteWrapper); ModelWithAllFieldTypesBuilder valueLong(long valueLong); ModelWithAllFieldTypesBuilder valueLongWrapper(Long valueLongWrapper); ModelWithAllFieldTypesBuilder valueDouble(double valueDouble); ModelWithAllFieldTypesBuilder valueDoubleWrapper(Double valueDoubleWrapper); ModelWithAllFieldTypesBuilder valueFloat(float valueFloat); ModelWithAllFieldTypesBuilder valueFloatWrapper(Float valueFloatWrapper); ModelWithAllFieldTypesBuilder valueBoolean(boolean valueBoolean); ModelWithAllFieldTypesBuilder valueBooleanWrapper(Boolean valueBooleanWrapper); ModelWithAllFieldTypesBuilder valueIntArray(int[] valueIntArray); ModelWithAllFieldTypesBuilder valueObjectArray(Object[] valueObjectArray); ModelWithAllFieldTypesBuilder valueString(String valueString); ModelWithAllFieldTypesBuilder valueObject(Object valueObject); ModelWithAllFieldTypesBuilder valueList(List<String> valueList); ModelWithAllFieldTypesBuilder id(long id); ModelWithAllFieldTypesBuilder id(@Nullable Number... ids); ModelWithAllFieldTypesBuilder id(long id1, long id2); ModelWithAllFieldTypesBuilder id(@Nullable CharSequence key); ModelWithAllFieldTypesBuilder id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys); ModelWithAllFieldTypesBuilder id(@Nullable CharSequence key, long id); ModelWithAllFieldTypesBuilder layout(@LayoutRes int layoutRes); ModelWithAllFieldTypesBuilder spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback); }
8,675
0
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelProcessorTest
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelProcessorTest/testKotlinModel/Model_.java
package com.airbnb.epoxy; import android.view.View; import android.view.ViewParent; import androidx.annotation.DrawableRes; 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 Model_ extends Model implements GeneratedModel<Model.Holder>, ModelBuilder { private OnModelBoundListener<Model_, Model.Holder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<Model_, Model.Holder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<Model_, Model.Holder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<Model_, Model.Holder> onModelVisibilityChangedListener_epoxyGeneratedModel; public Model_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Model.Holder object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Model.Holder 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 Model_ onBind(OnModelBoundListener<Model_, Model.Holder> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Model.Holder 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 Model_ onUnbind(OnModelUnboundListener<Model_, Model.Holder> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Model.Holder 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 Model_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<Model_, Model.Holder> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Model.Holder 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 Model_ onVisibilityChanged( OnModelVisibilityChangedListener<Model_, Model.Holder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public Model_ imageRes(@DrawableRes int imageRes) { onMutation(); super.setImageRes(imageRes); return this; } @DrawableRes public int imageRes() { return super.getImageRes(); } /** * 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 Model_ clickListener(final OnModelClickListener<Model_, Model.Holder> clickListener) { onMutation(); if (clickListener == null) { super.setClickListener(null); } else { super.setClickListener(new WrappedEpoxyModelClickListener<>(clickListener)); } return this; } public Model_ clickListener(View.OnClickListener clickListener) { onMutation(); super.setClickListener(clickListener); return this; } public View.OnClickListener clickListener() { return super.getClickListener(); } @Override public Model_ id(long id) { super.id(id); return this; } @Override public Model_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public Model_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public Model_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public Model_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public Model_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public Model_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public Model_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public Model_ show() { super.show(); return this; } @Override public Model_ show(boolean show) { super.show(show); return this; } @Override public Model_ hide() { super.hide(); return this; } @Override protected Model.Holder createNewHolder(ViewParent parent) { return new Model.Holder(); } @Override public Model_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.setImageRes(0); super.setClickListener(null); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof Model_)) { return false; } if (!super.equals(o)) { return false; } Model_ that = (Model_) 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 ((getImageRes() != that.getImageRes())) { return false; } if (((getClickListener() == null) != (that.getClickListener() == 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 + getImageRes(); _result = 31 * _result + (getClickListener() != null ? 1 : 0); return _result; } @Override public String toString() { return "Model_{" + "imageRes=" + getImageRes() + ", clickListener=" + getClickListener() + "}" + super.toString(); } }
8,676
0
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelProcessorTest/testKotlinModel
Create_ds/epoxy/epoxy-processortest/src/test/resources/ModelProcessorTest/testKotlinModel/ksp/Model_.java
package com.airbnb.epoxy; import android.view.View; import android.view.ViewParent; import androidx.annotation.DrawableRes; 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 Model_ extends Model implements GeneratedModel<Model.Holder>, ModelBuilder { private OnModelBoundListener<Model_, Model.Holder> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<Model_, Model.Holder> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<Model_, Model.Holder> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<Model_, Model.Holder> onModelVisibilityChangedListener_epoxyGeneratedModel; public Model_() { super(); } @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final Model.Holder object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void handlePostBind(final Model.Holder 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 Model_ onBind(OnModelBoundListener<Model_, Model.Holder> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(Model.Holder 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 Model_ onUnbind(OnModelUnboundListener<Model_, Model.Holder> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final Model.Holder 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 Model_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<Model_, Model.Holder> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final Model.Holder 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 Model_ onVisibilityChanged( OnModelVisibilityChangedListener<Model_, Model.Holder> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public Model_ imageRes(@DrawableRes int imageRes) { onMutation(); super.setImageRes(imageRes); return this; } @DrawableRes public int imageRes() { return super.getImageRes(); } /** * 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 Model_ clickListener( @Nullable final OnModelClickListener<Model_, Model.Holder> clickListener) { onMutation(); if (clickListener == null) { super.setClickListener(null); } else { super.setClickListener(new WrappedEpoxyModelClickListener<>(clickListener)); } return this; } public Model_ clickListener(@Nullable View.OnClickListener clickListener) { onMutation(); super.setClickListener(clickListener); return this; } @Nullable public View.OnClickListener clickListener() { return super.getClickListener(); } @Override public Model_ id(long p0) { super.id(p0); return this; } @Override public Model_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public Model_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public Model_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public Model_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public Model_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public Model_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public Model_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public Model_ show() { super.show(); return this; } @Override public Model_ show(boolean p0) { super.show(p0); return this; } @Override public Model_ hide() { super.hide(); return this; } @Override protected Model.Holder createNewHolder(ViewParent parent) { return new Model.Holder(); } @Override public Model_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.setImageRes(0); super.setClickListener(null); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof Model_)) { return false; } if (!super.equals(o)) { return false; } Model_ that = (Model_) 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 ((getImageRes() != that.getImageRes())) { return false; } if (((getClickListener() == null) != (that.getClickListener() == 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 + getImageRes(); _result = 31 * _result + (getClickListener() != null ? 1 : 0); return _result; } @Override public String toString() { return "Model_{" + "imageRes=" + getImageRes() + ", clickListener=" + getClickListener() + "}" + super.toString(); } }
8,677
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithDiffBind/BaseModelViewModel_.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 BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String clickListener_String; public BaseModelViewModel_() { super(); } @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 BaseModelView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final BaseModelView object) { super.bind(object); object.setClickListener(clickListener_String); } @Override public void bind(final BaseModelView object, EpoxyModel previousModel) { if (!(previousModel instanceof BaseModelViewModel_)) { bind(object); return; } BaseModelViewModel_ that = (BaseModelViewModel_) previousModel; super.bind(object, previousModel); if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { object.setClickListener(clickListener_String); } } @Override public void handlePostBind(final BaseModelView 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 BaseModelViewModel_ onBind( OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(BaseModelView 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 BaseModelViewModel_ onUnbind( OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final BaseModelView 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 BaseModelViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final BaseModelView 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 BaseModelViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see BaseModelView#setClickListener(String) */ public BaseModelViewModel_ 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 BaseModelViewModel_ id(long id) { super.id(id); return this; } @Override public BaseModelViewModel_ id(@Nullable Number... ids) { super.id(ids); return this; } @Override public BaseModelViewModel_ id(long id1, long id2) { super.id(id1, id2); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence key) { super.id(key); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence key, @Nullable CharSequence... otherKeys) { super.id(key, otherKeys); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence key, long id) { super.id(key, id); return this; } @Override public BaseModelViewModel_ layout(@LayoutRes int layoutRes) { super.layout(layoutRes); return this; } @Override public BaseModelViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback spanSizeCallback) { super.spanSizeOverride(spanSizeCallback); return this; } @Override public BaseModelViewModel_ show() { super.show(); return this; } @Override public BaseModelViewModel_ show(boolean show) { super.show(show); return this; } @Override public BaseModelViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public BaseModelViewModel_ 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 BaseModelViewModel_)) { return false; } if (!super.equals(o)) { return false; } BaseModelViewModel_ that = (BaseModelViewModel_) 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 "BaseModelViewModel_{" + "clickListener_String=" + clickListener_String + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,678
0
Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithDiffBind
Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithDiffBind/ksp/BaseModelViewModel_.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 BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String clickListener_String; public BaseModelViewModel_() { super(); } @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 BaseModelView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final BaseModelView object) { super.bind(object); object.setClickListener(clickListener_String); } @Override public void bind(final BaseModelView object, EpoxyModel previousModel) { if (!(previousModel instanceof BaseModelViewModel_)) { bind(object); return; } BaseModelViewModel_ that = (BaseModelViewModel_) previousModel; super.bind(object, previousModel); if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { object.setClickListener(clickListener_String); } } @Override public void handlePostBind(final BaseModelView 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 BaseModelViewModel_ onBind( OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(BaseModelView 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 BaseModelViewModel_ onUnbind( OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final BaseModelView 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 BaseModelViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final BaseModelView 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 BaseModelViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see BaseModelView#setClickListener(String) */ public BaseModelViewModel_ 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 BaseModelViewModel_ id(long p0) { super.id(p0); return this; } @Override public BaseModelViewModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public BaseModelViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public BaseModelViewModel_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public BaseModelViewModel_ show() { super.show(); return this; } @Override public BaseModelViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public BaseModelViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public BaseModelViewModel_ 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 BaseModelViewModel_)) { return false; } if (!super.equals(o)) { return false; } BaseModelViewModel_ that = (BaseModelViewModel_) 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 "BaseModelViewModel_{" + "clickListener_String=" + clickListener_String + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,679
0
Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithDiffBind/ksp
Create_ds/epoxy/epoxy-processortest/src/test/resources/baseModelWithDiffBind/ksp/actual/BaseModelViewModel_.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 BaseModelViewModel_ extends TestBaseModel<BaseModelView> implements GeneratedModel<BaseModelView>, BaseModelViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<BaseModelViewModel_, BaseModelView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<BaseModelViewModel_, BaseModelView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @NonNull private String clickListener_String; public BaseModelViewModel_() { super(); } @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 BaseModelView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final BaseModelView object) { super.bind(object); object.setClickListener(clickListener_String); } @Override public void bind(final BaseModelView object, EpoxyModel previousModel) { if (!(previousModel instanceof BaseModelViewModel_)) { bind(object); return; } BaseModelViewModel_ that = (BaseModelViewModel_) previousModel; super.bind(object, previousModel); if ((clickListener_String != null ? !clickListener_String.equals(that.clickListener_String) : that.clickListener_String != null)) { object.setClickListener(clickListener_String); } } @Override public void handlePostBind(final BaseModelView 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 BaseModelViewModel_ onBind( OnModelBoundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(BaseModelView 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 BaseModelViewModel_ onUnbind( OnModelUnboundListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final BaseModelView 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 BaseModelViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final BaseModelView 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 BaseModelViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<BaseModelViewModel_, BaseModelView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see BaseModelView#setClickListener(String) */ public BaseModelViewModel_ 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 BaseModelViewModel_ id(long p0) { super.id(p0); return this; } @Override public BaseModelViewModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public BaseModelViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public BaseModelViewModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public BaseModelViewModel_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public BaseModelViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public BaseModelViewModel_ show() { super.show(); return this; } @Override public BaseModelViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public BaseModelViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public BaseModelViewModel_ 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 BaseModelViewModel_)) { return false; } if (!super.equals(o)) { return false; } BaseModelViewModel_ that = (BaseModelViewModel_) 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 "BaseModelViewModel_{" + "clickListener_String=" + clickListener_String + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,680
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestAfterBindPropsViewModel_.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 TestAfterBindPropsViewModel_ extends EpoxyModel<TestAfterBindPropsView> implements GeneratedModel<TestAfterBindPropsView>, TestAfterBindPropsViewModelBuilder { private OnModelBoundListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> onModelVisibilityChangedListener_epoxyGeneratedModel; private boolean flag_Boolean = false; private boolean flagSuper_Boolean = false; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override public void handlePreBind(final EpoxyViewHolder holder, final TestAfterBindPropsView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestAfterBindPropsView object) { super.bind(object); object.setFlagSuper(flagSuper_Boolean); object.setFlag(flag_Boolean); } @Override public void bind(final TestAfterBindPropsView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestAfterBindPropsViewModel_)) { bind(object); return; } TestAfterBindPropsViewModel_ that = (TestAfterBindPropsViewModel_) previousModel; super.bind(object); if ((flagSuper_Boolean != that.flagSuper_Boolean)) { object.setFlagSuper(flagSuper_Boolean); } if ((flag_Boolean != that.flag_Boolean)) { object.setFlag(flag_Boolean); } } @Override public void handlePostBind(final TestAfterBindPropsView object, int position) { if (onModelBoundListener_epoxyGeneratedModel != null) { onModelBoundListener_epoxyGeneratedModel.onModelBound(this, object, position); } validateStateHasNotChangedSinceAdded("The model was changed during the bind call.", position); object.afterFlagSet(); object.afterFlagSetSuper(); } /** * 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 TestAfterBindPropsViewModel_ onBind( OnModelBoundListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestAfterBindPropsView 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 TestAfterBindPropsViewModel_ onUnbind( OnModelUnboundListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestAfterBindPropsView 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 TestAfterBindPropsViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestAfterBindPropsView 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 TestAfterBindPropsViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestAfterBindPropsViewModel_, TestAfterBindPropsView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is false * * @see TestAfterBindPropsView#setFlag(boolean) */ public TestAfterBindPropsViewModel_ flag(boolean flag) { onMutation(); this.flag_Boolean = flag; return this; } public boolean flag() { return flag_Boolean; } /** * <i>Optional</i>: Default value is false * * @see TestAfterBindPropsSuperView#setFlagSuper(boolean) */ public TestAfterBindPropsViewModel_ flagSuper(boolean flagSuper) { onMutation(); this.flagSuper_Boolean = flagSuper; return this; } public boolean flagSuper() { return flagSuper_Boolean; } @Override public TestAfterBindPropsViewModel_ id(long p0) { super.id(p0); return this; } @Override public TestAfterBindPropsViewModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public TestAfterBindPropsViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public TestAfterBindPropsViewModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public TestAfterBindPropsViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public TestAfterBindPropsViewModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public TestAfterBindPropsViewModel_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public TestAfterBindPropsViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public TestAfterBindPropsViewModel_ show() { super.show(); return this; } @Override public TestAfterBindPropsViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public TestAfterBindPropsViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public TestAfterBindPropsViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.flag_Boolean = false; this.flagSuper_Boolean = false; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestAfterBindPropsViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestAfterBindPropsViewModel_ that = (TestAfterBindPropsViewModel_) 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 ((flag_Boolean != that.flag_Boolean)) { return false; } if ((flagSuper_Boolean != that.flagSuper_Boolean)) { 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 + (flag_Boolean ? 1 : 0); _result = 31 * _result + (flagSuper_Boolean ? 1 : 0); return _result; } @Override public String toString() { return "TestAfterBindPropsViewModel_{" + "flag_Boolean=" + flag_Boolean + ", flagSuper_Boolean=" + flagSuper_Boolean + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,681
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithConstructors_.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 ModelWithConstructors_ extends ModelWithConstructors implements GeneratedModel<Object>, ModelWithConstructorsBuilder { private OnModelBoundListener<ModelWithConstructors_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithConstructors_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithConstructors_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithConstructors_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithConstructors_(long id, int valueInt) { super(id, valueInt); } public ModelWithConstructors_(int valueInt) { super(valueInt); } public ModelWithConstructors_() { 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 ModelWithConstructors_ onBind( OnModelBoundListener<ModelWithConstructors_, 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 ModelWithConstructors_ onUnbind( OnModelUnboundListener<ModelWithConstructors_, 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 ModelWithConstructors_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithConstructors_, 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 ModelWithConstructors_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithConstructors_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithConstructors_ valueInt(int valueInt) { onMutation(); super.valueInt = valueInt; return this; } public int valueInt() { return valueInt; } @Override public ModelWithConstructors_ id(long p0) { super.id(p0); return this; } @Override public ModelWithConstructors_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithConstructors_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithConstructors_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithConstructors_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithConstructors_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithConstructors_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithConstructors_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithConstructors_ show() { super.show(); return this; } @Override public ModelWithConstructors_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithConstructors_ hide() { super.hide(); return this; } @Override public ModelWithConstructors_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.valueInt = 0; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithConstructors_)) { return false; } if (!super.equals(o)) { return false; } ModelWithConstructors_ that = (ModelWithConstructors_) 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; } 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 + valueInt; return _result; } @Override public String toString() { return "ModelWithConstructors_{" + "valueInt=" + valueInt + "}" + super.toString(); } }
8,682
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithPrivateViewClickListener_.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 ModelWithPrivateViewClickListener_ extends ModelWithPrivateViewClickListener implements GeneratedModel<Object>, ModelWithPrivateViewClickListenerBuilder { private OnModelBoundListener<ModelWithPrivateViewClickListener_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithPrivateViewClickListener_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithPrivateViewClickListener_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithPrivateViewClickListener_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithPrivateViewClickListener_() { 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 ModelWithPrivateViewClickListener_ onBind( OnModelBoundListener<ModelWithPrivateViewClickListener_, 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 ModelWithPrivateViewClickListener_ onUnbind( OnModelUnboundListener<ModelWithPrivateViewClickListener_, 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 ModelWithPrivateViewClickListener_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithPrivateViewClickListener_, 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 ModelWithPrivateViewClickListener_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithPrivateViewClickListener_, Object> 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 ModelWithPrivateViewClickListener_ clickListener( final OnModelClickListener<ModelWithPrivateViewClickListener_, Object> clickListener) { onMutation(); if (clickListener == null) { super.setClickListener(null); } else { super.setClickListener(new WrappedEpoxyModelClickListener<>(clickListener)); } return this; } public ModelWithPrivateViewClickListener_ clickListener(View.OnClickListener clickListener) { onMutation(); super.setClickListener(clickListener); return this; } public View.OnClickListener clickListener() { return super.getClickListener(); } @Override public ModelWithPrivateViewClickListener_ id(long p0) { super.id(p0); return this; } @Override public ModelWithPrivateViewClickListener_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithPrivateViewClickListener_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithPrivateViewClickListener_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithPrivateViewClickListener_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithPrivateViewClickListener_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithPrivateViewClickListener_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithPrivateViewClickListener_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithPrivateViewClickListener_ show() { super.show(); return this; } @Override public ModelWithPrivateViewClickListener_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithPrivateViewClickListener_ hide() { super.hide(); return this; } @Override public ModelWithPrivateViewClickListener_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.setClickListener(null); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithPrivateViewClickListener_)) { return false; } if (!super.equals(o)) { return false; } ModelWithPrivateViewClickListener_ that = (ModelWithPrivateViewClickListener_) 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 (((getClickListener() == null) != (that.getClickListener() == 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 + (getClickListener() != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithPrivateViewClickListener_{" + "clickListener=" + getClickListener() + "}" + super.toString(); } }
8,683
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithAllPrivateFieldTypes_.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 ModelWithAllPrivateFieldTypes_ extends ModelWithAllPrivateFieldTypes implements GeneratedModel<Object>, ModelWithAllPrivateFieldTypesBuilder { private OnModelBoundListener<ModelWithAllPrivateFieldTypes_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithAllPrivateFieldTypes_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithAllPrivateFieldTypes_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithAllPrivateFieldTypes_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithAllPrivateFieldTypes_() { 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 ModelWithAllPrivateFieldTypes_ onBind( OnModelBoundListener<ModelWithAllPrivateFieldTypes_, 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 ModelWithAllPrivateFieldTypes_ onUnbind( OnModelUnboundListener<ModelWithAllPrivateFieldTypes_, 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 ModelWithAllPrivateFieldTypes_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithAllPrivateFieldTypes_, 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 ModelWithAllPrivateFieldTypes_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithAllPrivateFieldTypes_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithAllPrivateFieldTypes_ valueInt(int valueInt) { onMutation(); super.setValueInt(valueInt); return this; } public int valueInt() { return super.getValueInt(); } public ModelWithAllPrivateFieldTypes_ valueInteger(Integer valueInteger) { onMutation(); super.setValueInteger(valueInteger); return this; } public Integer valueInteger() { return super.getValueInteger(); } public ModelWithAllPrivateFieldTypes_ valueShort(short valueShort) { onMutation(); super.setValueShort(valueShort); return this; } public short valueShort() { return super.getValueShort(); } public ModelWithAllPrivateFieldTypes_ valueShortWrapper(Short valueShortWrapper) { onMutation(); super.setValueShortWrapper(valueShortWrapper); return this; } public Short valueShortWrapper() { return super.getValueShortWrapper(); } public ModelWithAllPrivateFieldTypes_ valueChar(char valueChar) { onMutation(); super.setValueChar(valueChar); return this; } public char valueChar() { return super.getValueChar(); } public ModelWithAllPrivateFieldTypes_ valueCharacter(Character valueCharacter) { onMutation(); super.setValueCharacter(valueCharacter); return this; } public Character valueCharacter() { return super.getValueCharacter(); } public ModelWithAllPrivateFieldTypes_ valuebByte(byte valuebByte) { onMutation(); super.setValuebByte(valuebByte); return this; } public byte valuebByte() { return super.getValuebByte(); } public ModelWithAllPrivateFieldTypes_ valueByteWrapper(Byte valueByteWrapper) { onMutation(); super.setValueByteWrapper(valueByteWrapper); return this; } public Byte valueByteWrapper() { return super.getValueByteWrapper(); } public ModelWithAllPrivateFieldTypes_ valueLong(long valueLong) { onMutation(); super.setValueLong(valueLong); return this; } public long valueLong() { return super.getValueLong(); } public ModelWithAllPrivateFieldTypes_ valueLongWrapper(Long valueLongWrapper) { onMutation(); super.setValueLongWrapper(valueLongWrapper); return this; } public Long valueLongWrapper() { return super.getValueLongWrapper(); } public ModelWithAllPrivateFieldTypes_ valueDouble(double valueDouble) { onMutation(); super.setValueDouble(valueDouble); return this; } public double valueDouble() { return super.getValueDouble(); } public ModelWithAllPrivateFieldTypes_ valueDoubleWrapper(Double valueDoubleWrapper) { onMutation(); super.setValueDoubleWrapper(valueDoubleWrapper); return this; } public Double valueDoubleWrapper() { return super.getValueDoubleWrapper(); } public ModelWithAllPrivateFieldTypes_ valueFloat(float valueFloat) { onMutation(); super.setValueFloat(valueFloat); return this; } public float valueFloat() { return super.getValueFloat(); } public ModelWithAllPrivateFieldTypes_ valueFloatWrapper(Float valueFloatWrapper) { onMutation(); super.setValueFloatWrapper(valueFloatWrapper); return this; } public Float valueFloatWrapper() { return super.getValueFloatWrapper(); } public ModelWithAllPrivateFieldTypes_ valueBoolean(boolean valueBoolean) { onMutation(); super.setValueBoolean(valueBoolean); return this; } public boolean valueBoolean() { return super.isValueBoolean(); } public ModelWithAllPrivateFieldTypes_ valueBooleanWrapper(Boolean valueBooleanWrapper) { onMutation(); super.setValueBooleanWrapper(valueBooleanWrapper); return this; } public Boolean valueBooleanWrapper() { return super.getValueBooleanWrapper(); } public ModelWithAllPrivateFieldTypes_ valueIntArray(int[] valueIntArray) { onMutation(); super.setValueIntArray(valueIntArray); return this; } public int[] valueIntArray() { return super.getValueIntArray(); } public ModelWithAllPrivateFieldTypes_ valueObjectArray(Object[] valueObjectArray) { onMutation(); super.setValueObjectArray(valueObjectArray); return this; } public Object[] valueObjectArray() { return super.getValueObjectArray(); } public ModelWithAllPrivateFieldTypes_ valueString(String valueString) { onMutation(); super.setValueString(valueString); return this; } public String valueString() { return super.getValueString(); } public ModelWithAllPrivateFieldTypes_ valueObject(Object valueObject) { onMutation(); super.setValueObject(valueObject); return this; } public Object valueObject() { return super.getValueObject(); } public ModelWithAllPrivateFieldTypes_ valueList(List<String> valueList) { onMutation(); super.setValueList(valueList); return this; } public List<String> valueList() { return super.getValueList(); } @Override public ModelWithAllPrivateFieldTypes_ getValueObject() { super.getValueObject(); return this; } @Override public ModelWithAllPrivateFieldTypes_ id(long p0) { super.id(p0); return this; } @Override public ModelWithAllPrivateFieldTypes_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithAllPrivateFieldTypes_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithAllPrivateFieldTypes_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithAllPrivateFieldTypes_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithAllPrivateFieldTypes_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithAllPrivateFieldTypes_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithAllPrivateFieldTypes_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithAllPrivateFieldTypes_ show() { super.show(); return this; } @Override public ModelWithAllPrivateFieldTypes_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithAllPrivateFieldTypes_ hide() { super.hide(); return this; } @Override public ModelWithAllPrivateFieldTypes_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.setValueInt(0); super.setValueInteger(null); super.setValueShort((short) 0); super.setValueShortWrapper(null); super.setValueChar((char) 0); super.setValueCharacter(null); super.setValuebByte((byte) 0); super.setValueByteWrapper(null); super.setValueLong(0L); super.setValueLongWrapper(null); super.setValueDouble(0.0d); super.setValueDoubleWrapper(null); super.setValueFloat(0.0f); super.setValueFloatWrapper(null); super.setValueBoolean(false); super.setValueBooleanWrapper(null); super.setValueIntArray(null); super.setValueObjectArray(null); super.setValueString(null); super.setValueObject(null); super.setValueList(null); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithAllPrivateFieldTypes_)) { return false; } if (!super.equals(o)) { return false; } ModelWithAllPrivateFieldTypes_ that = (ModelWithAllPrivateFieldTypes_) 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 ((getValueInt() != that.getValueInt())) { return false; } if ((getValueInteger() != null ? !getValueInteger().equals(that.getValueInteger()) : that.getValueInteger() != null)) { return false; } if ((getValueShort() != that.getValueShort())) { return false; } if ((getValueShortWrapper() != null ? !getValueShortWrapper().equals(that.getValueShortWrapper()) : that.getValueShortWrapper() != null)) { return false; } if ((getValueChar() != that.getValueChar())) { return false; } if ((getValueCharacter() != null ? !getValueCharacter().equals(that.getValueCharacter()) : that.getValueCharacter() != null)) { return false; } if ((getValuebByte() != that.getValuebByte())) { return false; } if ((getValueByteWrapper() != null ? !getValueByteWrapper().equals(that.getValueByteWrapper()) : that.getValueByteWrapper() != null)) { return false; } if ((getValueLong() != that.getValueLong())) { return false; } if ((getValueLongWrapper() != null ? !getValueLongWrapper().equals(that.getValueLongWrapper()) : that.getValueLongWrapper() != null)) { return false; } if ((Double.compare(that.getValueDouble(), getValueDouble()) != 0)) { return false; } if ((getValueDoubleWrapper() != null ? !getValueDoubleWrapper().equals(that.getValueDoubleWrapper()) : that.getValueDoubleWrapper() != null)) { return false; } if ((Float.compare(that.getValueFloat(), getValueFloat()) != 0)) { return false; } if ((getValueFloatWrapper() != null ? !getValueFloatWrapper().equals(that.getValueFloatWrapper()) : that.getValueFloatWrapper() != null)) { return false; } if ((isValueBoolean() != that.isValueBoolean())) { return false; } if ((getValueBooleanWrapper() != null ? !getValueBooleanWrapper().equals(that.getValueBooleanWrapper()) : that.getValueBooleanWrapper() != null)) { return false; } if (!Arrays.equals(getValueIntArray(), that.getValueIntArray())) { return false; } if (!Arrays.equals(getValueObjectArray(), that.getValueObjectArray())) { return false; } if ((getValueString() != null ? !getValueString().equals(that.getValueString()) : that.getValueString() != null)) { return false; } if ((getValueObject() != null ? !getValueObject().equals(that.getValueObject()) : that.getValueObject() != null)) { return false; } if ((getValueList() != null ? !getValueList().equals(that.getValueList()) : that.getValueList() != 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 + getValueInt(); _result = 31 * _result + (getValueInteger() != null ? getValueInteger().hashCode() : 0); _result = 31 * _result + getValueShort(); _result = 31 * _result + (getValueShortWrapper() != null ? getValueShortWrapper().hashCode() : 0); _result = 31 * _result + getValueChar(); _result = 31 * _result + (getValueCharacter() != null ? getValueCharacter().hashCode() : 0); _result = 31 * _result + getValuebByte(); _result = 31 * _result + (getValueByteWrapper() != null ? getValueByteWrapper().hashCode() : 0); _result = 31 * _result + (int) (getValueLong() ^ (getValueLong() >>> 32)); _result = 31 * _result + (getValueLongWrapper() != null ? getValueLongWrapper().hashCode() : 0); temp = Double.doubleToLongBits(getValueDouble()); _result = 31 * _result + (int) (temp ^ (temp >>> 32)); _result = 31 * _result + (getValueDoubleWrapper() != null ? getValueDoubleWrapper().hashCode() : 0); _result = 31 * _result + (getValueFloat() != +0.0f ? Float.floatToIntBits(getValueFloat()) : 0); _result = 31 * _result + (getValueFloatWrapper() != null ? getValueFloatWrapper().hashCode() : 0); _result = 31 * _result + (isValueBoolean() ? 1 : 0); _result = 31 * _result + (getValueBooleanWrapper() != null ? getValueBooleanWrapper().hashCode() : 0); _result = 31 * _result + Arrays.hashCode(getValueIntArray()); _result = 31 * _result + Arrays.hashCode(getValueObjectArray()); _result = 31 * _result + (getValueString() != null ? getValueString().hashCode() : 0); _result = 31 * _result + (getValueObject() != null ? getValueObject().hashCode() : 0); _result = 31 * _result + (getValueList() != null ? getValueList().hashCode() : 0); return _result; } @Override public String toString() { return "ModelWithAllPrivateFieldTypes_{" + "valueInt=" + getValueInt() + ", valueInteger=" + getValueInteger() + ", valueShort=" + getValueShort() + ", valueShortWrapper=" + getValueShortWrapper() + ", valueChar=" + getValueChar() + ", valueCharacter=" + getValueCharacter() + ", valuebByte=" + getValuebByte() + ", valueByteWrapper=" + getValueByteWrapper() + ", valueLong=" + getValueLong() + ", valueLongWrapper=" + getValueLongWrapper() + ", valueDouble=" + getValueDouble() + ", valueDoubleWrapper=" + getValueDoubleWrapper() + ", valueFloat=" + getValueFloat() + ", valueFloatWrapper=" + getValueFloatWrapper() + ", valueBoolean=" + isValueBoolean() + ", valueBooleanWrapper=" + getValueBooleanWrapper() + ", valueIntArray=" + getValueIntArray() + ", valueObjectArray=" + getValueObjectArray() + ", valueString=" + getValueString() + ", valueObject=" + getValueObject() + ", valueList=" + getValueList() + "}" + super.toString(); } }
8,684
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ControllerWithAutoModelWithSuperClass$SubControllerWithAutoModelWithSuperClass_EpoxyHelper.java
package com.airbnb.epoxy.adapter; import com.airbnb.epoxy.BasicModelWithAttribute_; import com.airbnb.epoxy.ControllerHelper; import com.airbnb.epoxy.EpoxyModel; import java.lang.IllegalStateException; import java.lang.Override; import java.lang.String; /** * Generated file. Do not modify! */ public class ControllerWithAutoModelWithSuperClass$SubControllerWithAutoModelWithSuperClass_EpoxyHelper extends ControllerHelper<ControllerWithAutoModelWithSuperClass.SubControllerWithAutoModelWithSuperClass> { private final ControllerWithAutoModelWithSuperClass.SubControllerWithAutoModelWithSuperClass controller; private EpoxyModel modelWithAttribute3; private EpoxyModel modelWithAttribute2; private EpoxyModel modelWithAttribute1; public ControllerWithAutoModelWithSuperClass$SubControllerWithAutoModelWithSuperClass_EpoxyHelper( ControllerWithAutoModelWithSuperClass.SubControllerWithAutoModelWithSuperClass controller) { this.controller = controller; } @Override public void resetAutoModels() { validateModelsHaveNotChanged(); controller.modelWithAttribute3 = new BasicModelWithAttribute_(); controller.modelWithAttribute3.id(-1); controller.modelWithAttribute2 = new BasicModelWithAttribute_(); controller.modelWithAttribute2.id(-2); controller.modelWithAttribute1 = new BasicModelWithAttribute_(); controller.modelWithAttribute1.id(-3); saveModelsForNextValidation(); } private void validateModelsHaveNotChanged() { validateSameModel(modelWithAttribute3, controller.modelWithAttribute3, "modelWithAttribute3", -1); validateSameModel(modelWithAttribute2, controller.modelWithAttribute2, "modelWithAttribute2", -2); validateSameModel(modelWithAttribute1, controller.modelWithAttribute1, "modelWithAttribute1", -3); validateModelHashCodesHaveNotChanged(controller); } private void validateSameModel(EpoxyModel expectedObject, EpoxyModel actualObject, String fieldName, int id) { if (expectedObject != actualObject) { throw new IllegalStateException("Fields annotated with AutoModel cannot be directly assigned. The controller manages these fields for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")"); } if (actualObject != null && actualObject.id() != id) { throw new IllegalStateException("Fields annotated with AutoModel cannot have their id changed manually. The controller manages the ids of these models for you. (" + controller.getClass().getSimpleName() + "#" + fieldName + ")"); } } private void saveModelsForNextValidation() { modelWithAttribute3 = controller.modelWithAttribute3; modelWithAttribute2 = controller.modelWithAttribute2; modelWithAttribute1 = controller.modelWithAttribute1; } }
8,685
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropGenerateStringOverloadsOptionViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import android.view.ViewGroup; 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.lang.UnsupportedOperationException; import java.util.BitSet; /** * Generated file. Do not modify! */ public class TestFieldPropGenerateStringOverloadsOptionViewModel_ extends EpoxyModel<TestFieldPropGenerateStringOverloadsOptionView> implements GeneratedModel<TestFieldPropGenerateStringOverloadsOptionView>, TestFieldPropGenerateStringOverloadsOptionViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ private StringAttributeData value_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 value"); } } @Override protected int getViewType() { return 0; } @Override public TestFieldPropGenerateStringOverloadsOptionView buildView(ViewGroup parent) { TestFieldPropGenerateStringOverloadsOptionView v = new TestFieldPropGenerateStringOverloadsOptionView(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 TestFieldPropGenerateStringOverloadsOptionView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropGenerateStringOverloadsOptionView object) { super.bind(object); object.value = value_StringAttributeData.toString(object.getContext()); } @Override public void bind(final TestFieldPropGenerateStringOverloadsOptionView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropGenerateStringOverloadsOptionViewModel_)) { bind(object); return; } TestFieldPropGenerateStringOverloadsOptionViewModel_ that = (TestFieldPropGenerateStringOverloadsOptionViewModel_) previousModel; super.bind(object); if ((value_StringAttributeData != null ? !value_StringAttributeData.equals(that.value_StringAttributeData) : that.value_StringAttributeData != null)) { object.value = value_StringAttributeData.toString(object.getContext()); } } @Override public void handlePostBind(final TestFieldPropGenerateStringOverloadsOptionView 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 TestFieldPropGenerateStringOverloadsOptionViewModel_ onBind( OnModelBoundListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropGenerateStringOverloadsOptionView 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 TestFieldPropGenerateStringOverloadsOptionViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropGenerateStringOverloadsOptionView 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 TestFieldPropGenerateStringOverloadsOptionViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropGenerateStringOverloadsOptionView 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 TestFieldPropGenerateStringOverloadsOptionViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropGenerateStringOverloadsOptionViewModel_, TestFieldPropGenerateStringOverloadsOptionView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public CharSequence getValue(Context context) { return value_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TestFieldPropGenerateStringOverloadsOptionView#value */ public TestFieldPropGenerateStringOverloadsOptionViewModel_ value(@NonNull CharSequence value) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); if (value == null) { throw new IllegalArgumentException("value cannot be null"); } value_StringAttributeData.setValue(value); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropGenerateStringOverloadsOptionView#value */ public TestFieldPropGenerateStringOverloadsOptionViewModel_ value(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); value_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropGenerateStringOverloadsOptionView#value */ public TestFieldPropGenerateStringOverloadsOptionViewModel_ value(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); value_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropGenerateStringOverloadsOptionView#value */ public TestFieldPropGenerateStringOverloadsOptionViewModel_ valueQuantityRes( @PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); value_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ id(long p0) { super.id(p0); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ layout(@LayoutRes int p0) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ show() { super.show(); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropGenerateStringOverloadsOptionViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.value_StringAttributeData = new StringAttributeData(); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropGenerateStringOverloadsOptionViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropGenerateStringOverloadsOptionViewModel_ that = (TestFieldPropGenerateStringOverloadsOptionViewModel_) 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_StringAttributeData != null ? !value_StringAttributeData.equals(that.value_StringAttributeData) : that.value_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 + (value_StringAttributeData != null ? value_StringAttributeData.hashCode() : 0); return _result; } @Override public String toString() { return "TestFieldPropGenerateStringOverloadsOptionViewModel_{" + "value_StringAttributeData=" + value_StringAttributeData + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,686
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithoutHash_.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 ModelWithoutHash_ extends ModelWithoutHash implements GeneratedModel<Object>, ModelWithoutHashBuilder { private OnModelBoundListener<ModelWithoutHash_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithoutHash_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithoutHash_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithoutHash_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithoutHash_() { 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 ModelWithoutHash_ onBind(OnModelBoundListener<ModelWithoutHash_, 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 ModelWithoutHash_ onUnbind(OnModelUnboundListener<ModelWithoutHash_, 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 ModelWithoutHash_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithoutHash_, 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 ModelWithoutHash_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithoutHash_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithoutHash_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } public ModelWithoutHash_ value2(int value2) { onMutation(); super.value2 = value2; return this; } public int value2() { return value2; } public ModelWithoutHash_ value3(String value3) { onMutation(); super.value3 = value3; return this; } public String value3() { return value3; } @Override public ModelWithoutHash_ id(long p0) { super.id(p0); return this; } @Override public ModelWithoutHash_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithoutHash_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithoutHash_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithoutHash_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithoutHash_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithoutHash_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithoutHash_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithoutHash_ show() { super.show(); return this; } @Override public ModelWithoutHash_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithoutHash_ hide() { super.hide(); return this; } @Override public ModelWithoutHash_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.value2 = 0; super.value3 = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithoutHash_)) { return false; } if (!super.equals(o)) { return false; } ModelWithoutHash_ that = (ModelWithoutHash_) 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; } if (((value3 == null) != (that.value3 == 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; _result = 31 * _result + (value3 != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithoutHash_{" + "value=" + value + ", value2=" + value2 + ", value3=" + value3 + "}" + super.toString(); } }
8,687
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/PropGroupsViewModel_.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 PropGroupsViewModel_ extends EpoxyModel<PropGroupsView> implements GeneratedModel<PropGroupsView>, PropGroupsViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(14); private OnModelBoundListener<PropGroupsViewModel_, PropGroupsView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<PropGroupsViewModel_, PropGroupsView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<PropGroupsViewModel_, PropGroupsView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<PropGroupsViewModel_, PropGroupsView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ @Nullable private CharSequence something_CharSequence = (CharSequence) null; /** * Bitset index: 1 */ private int something_Int = 0; /** * Bitset index: 2 */ @NonNull private CharSequence somethingElse_CharSequence; /** * Bitset index: 3 */ private int somethingElse_Int = 0; /** * Bitset index: 4 */ private int primitive_Int = 0; /** * Bitset index: 5 */ private long primitive_Long = 0L; /** * Bitset index: 6 */ private int primitiveWithDefault_Int = 0; /** * Bitset index: 7 */ private long primitiveWithDefault_Long = PropGroupsView.DEFAULT_PRIMITIVE; /** * Bitset index: 8 */ private long primitiveAndObjectGroupWithPrimitiveDefault_Long = PropGroupsView.DEFAULT_PRIMITIVE; /** * Bitset index: 9 */ @NonNull private CharSequence primitiveAndObjectGroupWithPrimitiveDefault_CharSequence; /** * Bitset index: 10 */ private long oneThing_Long = 0L; /** * Bitset index: 11 */ @NonNull private CharSequence anotherThing_CharSequence; /** * Bitset index: 12 */ @NonNull private String requiredGroup_String; /** * Bitset index: 13 */ @NonNull private CharSequence requiredGroup_CharSequence; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(12) && !assignedAttributes_epoxyGeneratedModel.get(13)) { throw new IllegalStateException("A value is required for requiredGroup"); } } @Override public void handlePreBind(final EpoxyViewHolder holder, final PropGroupsView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final PropGroupsView object) { super.bind(object); if (assignedAttributes_epoxyGeneratedModel.get(4)) { object.setPrimitive(primitive_Int); } else if (assignedAttributes_epoxyGeneratedModel.get(5)) { object.setPrimitive(primitive_Long); } else { object.setPrimitive(primitive_Int); } if (assignedAttributes_epoxyGeneratedModel.get(12)) { object.requiredGroup(requiredGroup_String); } else { object.requiredGroup(requiredGroup_CharSequence); } if (assignedAttributes_epoxyGeneratedModel.get(8)) { object.primitiveAndObjectGroupWithPrimitiveDefault(primitiveAndObjectGroupWithPrimitiveDefault_Long); } else if (assignedAttributes_epoxyGeneratedModel.get(9)) { object.primitiveAndObjectGroupWithPrimitiveDefault(primitiveAndObjectGroupWithPrimitiveDefault_CharSequence); } else { object.primitiveAndObjectGroupWithPrimitiveDefault(primitiveAndObjectGroupWithPrimitiveDefault_Long); } if (assignedAttributes_epoxyGeneratedModel.get(10)) { object.setOneThing(oneThing_Long); } else if (assignedAttributes_epoxyGeneratedModel.get(11)) { object.setAnotherThing(anotherThing_CharSequence); } else { object.setOneThing(oneThing_Long); } if (assignedAttributes_epoxyGeneratedModel.get(0)) { object.setSomething(something_CharSequence); } else if (assignedAttributes_epoxyGeneratedModel.get(1)) { object.setSomething(something_Int); } else { object.setSomething(something_CharSequence); } if (assignedAttributes_epoxyGeneratedModel.get(2)) { object.setSomethingElse(somethingElse_CharSequence); } else if (assignedAttributes_epoxyGeneratedModel.get(3)) { object.setSomethingElse(somethingElse_Int); } else { object.setSomethingElse(somethingElse_Int); } if (assignedAttributes_epoxyGeneratedModel.get(6)) { object.setPrimitiveWithDefault(primitiveWithDefault_Int); } else if (assignedAttributes_epoxyGeneratedModel.get(7)) { object.setPrimitiveWithDefault(primitiveWithDefault_Long); } else { object.setPrimitiveWithDefault(primitiveWithDefault_Long); } } @Override public void bind(final PropGroupsView object, EpoxyModel previousModel) { if (!(previousModel instanceof PropGroupsViewModel_)) { bind(object); return; } PropGroupsViewModel_ that = (PropGroupsViewModel_) previousModel; super.bind(object); if (assignedAttributes_epoxyGeneratedModel.get(4)) { if ((primitive_Int != that.primitive_Int)) { object.setPrimitive(primitive_Int); } } else if (assignedAttributes_epoxyGeneratedModel.get(5)) { if ((primitive_Long != that.primitive_Long)) { object.setPrimitive(primitive_Long); } } // 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(4) || that.assignedAttributes_epoxyGeneratedModel.get(5)) { object.setPrimitive(primitive_Int); } if (assignedAttributes_epoxyGeneratedModel.get(12)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(12) || (requiredGroup_String != null ? !requiredGroup_String.equals(that.requiredGroup_String) : that.requiredGroup_String != null)) { object.requiredGroup(requiredGroup_String); } } else if (assignedAttributes_epoxyGeneratedModel.get(13)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(13) || (requiredGroup_CharSequence != null ? !requiredGroup_CharSequence.equals(that.requiredGroup_CharSequence) : that.requiredGroup_CharSequence != null)) { object.requiredGroup(requiredGroup_CharSequence); } } if (assignedAttributes_epoxyGeneratedModel.get(8)) { if ((primitiveAndObjectGroupWithPrimitiveDefault_Long != that.primitiveAndObjectGroupWithPrimitiveDefault_Long)) { object.primitiveAndObjectGroupWithPrimitiveDefault(primitiveAndObjectGroupWithPrimitiveDefault_Long); } } else if (assignedAttributes_epoxyGeneratedModel.get(9)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(9) || (primitiveAndObjectGroupWithPrimitiveDefault_CharSequence != null ? !primitiveAndObjectGroupWithPrimitiveDefault_CharSequence.equals(that.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence) : that.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence != null)) { object.primitiveAndObjectGroupWithPrimitiveDefault(primitiveAndObjectGroupWithPrimitiveDefault_CharSequence); } } // 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(8) || that.assignedAttributes_epoxyGeneratedModel.get(9)) { object.primitiveAndObjectGroupWithPrimitiveDefault(primitiveAndObjectGroupWithPrimitiveDefault_Long); } if (assignedAttributes_epoxyGeneratedModel.get(10)) { if ((oneThing_Long != that.oneThing_Long)) { object.setOneThing(oneThing_Long); } } else if (assignedAttributes_epoxyGeneratedModel.get(11)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(11) || (anotherThing_CharSequence != null ? !anotherThing_CharSequence.equals(that.anotherThing_CharSequence) : that.anotherThing_CharSequence != null)) { object.setAnotherThing(anotherThing_CharSequence); } } // 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(10) || that.assignedAttributes_epoxyGeneratedModel.get(11)) { object.setOneThing(oneThing_Long); } if (assignedAttributes_epoxyGeneratedModel.get(0)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(0) || (something_CharSequence != null ? !something_CharSequence.equals(that.something_CharSequence) : that.something_CharSequence != null)) { object.setSomething(something_CharSequence); } } else if (assignedAttributes_epoxyGeneratedModel.get(1)) { if ((something_Int != that.something_Int)) { object.setSomething(something_Int); } } // 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.setSomething(something_CharSequence); } if (assignedAttributes_epoxyGeneratedModel.get(2)) { if (!that.assignedAttributes_epoxyGeneratedModel.get(2) || (somethingElse_CharSequence != null ? !somethingElse_CharSequence.equals(that.somethingElse_CharSequence) : that.somethingElse_CharSequence != null)) { object.setSomethingElse(somethingElse_CharSequence); } } else if (assignedAttributes_epoxyGeneratedModel.get(3)) { if ((somethingElse_Int != that.somethingElse_Int)) { object.setSomethingElse(somethingElse_Int); } } // 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(2) || that.assignedAttributes_epoxyGeneratedModel.get(3)) { object.setSomethingElse(somethingElse_Int); } if (assignedAttributes_epoxyGeneratedModel.get(6)) { if ((primitiveWithDefault_Int != that.primitiveWithDefault_Int)) { object.setPrimitiveWithDefault(primitiveWithDefault_Int); } } else if (assignedAttributes_epoxyGeneratedModel.get(7)) { if ((primitiveWithDefault_Long != that.primitiveWithDefault_Long)) { object.setPrimitiveWithDefault(primitiveWithDefault_Long); } } // 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(6) || that.assignedAttributes_epoxyGeneratedModel.get(7)) { object.setPrimitiveWithDefault(primitiveWithDefault_Long); } } @Override public void handlePostBind(final PropGroupsView 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 PropGroupsViewModel_ onBind( OnModelBoundListener<PropGroupsViewModel_, PropGroupsView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(PropGroupsView 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 PropGroupsViewModel_ onUnbind( OnModelUnboundListener<PropGroupsViewModel_, PropGroupsView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final PropGroupsView 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 PropGroupsViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<PropGroupsViewModel_, PropGroupsView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final PropGroupsView 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 PropGroupsViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<PropGroupsViewModel_, PropGroupsView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Optional</i>: Default value is (CharSequence) null * * @see PropGroupsView#setSomething(CharSequence) */ public PropGroupsViewModel_ something(@Nullable CharSequence something) { assignedAttributes_epoxyGeneratedModel.set(0); assignedAttributes_epoxyGeneratedModel.clear(1); this.something_Int = 0; onMutation(); this.something_CharSequence = something; return this; } @Nullable public CharSequence somethingCharSequence() { return something_CharSequence; } /** * <i>Optional</i>: Default value is 0 * * @see PropGroupsView#setSomething(int) */ public PropGroupsViewModel_ something(int something) { assignedAttributes_epoxyGeneratedModel.set(1); assignedAttributes_epoxyGeneratedModel.clear(0); this.something_CharSequence = (CharSequence) null; onMutation(); this.something_Int = something; return this; } public int somethingInt() { return something_Int; } /** * <i>Required.</i> * * @see PropGroupsView#setSomethingElse(CharSequence) */ public PropGroupsViewModel_ somethingElse(@NonNull CharSequence somethingElse) { if (somethingElse == null) { throw new IllegalArgumentException("somethingElse cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(2); assignedAttributes_epoxyGeneratedModel.clear(3); this.somethingElse_Int = 0; onMutation(); this.somethingElse_CharSequence = somethingElse; return this; } @NonNull public CharSequence somethingElseCharSequence() { return somethingElse_CharSequence; } /** * <i>Optional</i>: Default value is 0 * * @see PropGroupsView#setSomethingElse(int) */ public PropGroupsViewModel_ somethingElse(int somethingElse) { assignedAttributes_epoxyGeneratedModel.set(3); assignedAttributes_epoxyGeneratedModel.clear(2); this.somethingElse_CharSequence = null; onMutation(); this.somethingElse_Int = somethingElse; return this; } public int somethingElseInt() { return somethingElse_Int; } /** * <i>Optional</i>: Default value is 0 * * @see PropGroupsView#setPrimitive(int) */ public PropGroupsViewModel_ primitive(int primitive) { assignedAttributes_epoxyGeneratedModel.set(4); assignedAttributes_epoxyGeneratedModel.clear(5); this.primitive_Long = 0L; onMutation(); this.primitive_Int = primitive; return this; } public int primitiveInt() { return primitive_Int; } /** * <i>Optional</i>: Default value is 0L * * @see PropGroupsView#setPrimitive(long) */ public PropGroupsViewModel_ primitive(long primitive) { assignedAttributes_epoxyGeneratedModel.set(5); assignedAttributes_epoxyGeneratedModel.clear(4); this.primitive_Int = 0; onMutation(); this.primitive_Long = primitive; return this; } public long primitiveLong() { return primitive_Long; } /** * <i>Optional</i>: Default value is 0 * * @see PropGroupsView#setPrimitiveWithDefault(int) */ public PropGroupsViewModel_ primitiveWithDefault(int primitiveWithDefault) { assignedAttributes_epoxyGeneratedModel.set(6); assignedAttributes_epoxyGeneratedModel.clear(7); this.primitiveWithDefault_Long = PropGroupsView.DEFAULT_PRIMITIVE; onMutation(); this.primitiveWithDefault_Int = primitiveWithDefault; return this; } public int primitiveWithDefaultInt() { return primitiveWithDefault_Int; } /** * <i>Optional</i>: Default value is <b>{@value PropGroupsView#DEFAULT_PRIMITIVE}</b> * * @see PropGroupsView#setPrimitiveWithDefault(long) */ public PropGroupsViewModel_ primitiveWithDefault(long primitiveWithDefault) { assignedAttributes_epoxyGeneratedModel.set(7); assignedAttributes_epoxyGeneratedModel.clear(6); this.primitiveWithDefault_Int = 0; onMutation(); this.primitiveWithDefault_Long = primitiveWithDefault; return this; } public long primitiveWithDefaultLong() { return primitiveWithDefault_Long; } /** * <i>Optional</i>: Default value is <b>{@value PropGroupsView#DEFAULT_PRIMITIVE}</b> * * @see PropGroupsView#primitiveAndObjectGroupWithPrimitiveDefault(long) */ public PropGroupsViewModel_ primitiveAndObjectGroupWithPrimitiveDefault( long primitiveAndObjectGroupWithPrimitiveDefault) { assignedAttributes_epoxyGeneratedModel.set(8); assignedAttributes_epoxyGeneratedModel.clear(9); this.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence = null; onMutation(); this.primitiveAndObjectGroupWithPrimitiveDefault_Long = primitiveAndObjectGroupWithPrimitiveDefault; return this; } public long primitiveAndObjectGroupWithPrimitiveDefaultLong() { return primitiveAndObjectGroupWithPrimitiveDefault_Long; } /** * <i>Required.</i> * * @see PropGroupsView#primitiveAndObjectGroupWithPrimitiveDefault(CharSequence) */ public PropGroupsViewModel_ primitiveAndObjectGroupWithPrimitiveDefault( @NonNull CharSequence primitiveAndObjectGroupWithPrimitiveDefault) { if (primitiveAndObjectGroupWithPrimitiveDefault == null) { throw new IllegalArgumentException("primitiveAndObjectGroupWithPrimitiveDefault cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(9); assignedAttributes_epoxyGeneratedModel.clear(8); this.primitiveAndObjectGroupWithPrimitiveDefault_Long = PropGroupsView.DEFAULT_PRIMITIVE; onMutation(); this.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence = primitiveAndObjectGroupWithPrimitiveDefault; return this; } @NonNull public CharSequence primitiveAndObjectGroupWithPrimitiveDefaultCharSequence() { return primitiveAndObjectGroupWithPrimitiveDefault_CharSequence; } /** * <i>Optional</i>: Default value is 0L * * @see PropGroupsView#setOneThing(long) */ public PropGroupsViewModel_ oneThing(long oneThing) { assignedAttributes_epoxyGeneratedModel.set(10); assignedAttributes_epoxyGeneratedModel.clear(11); this.anotherThing_CharSequence = null; onMutation(); this.oneThing_Long = oneThing; return this; } public long oneThingLong() { return oneThing_Long; } /** * <i>Required.</i> * * @see PropGroupsView#setAnotherThing(CharSequence) */ public PropGroupsViewModel_ anotherThing(@NonNull CharSequence anotherThing) { if (anotherThing == null) { throw new IllegalArgumentException("anotherThing cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(11); assignedAttributes_epoxyGeneratedModel.clear(10); this.oneThing_Long = 0L; onMutation(); this.anotherThing_CharSequence = anotherThing; return this; } @NonNull public CharSequence anotherThingCharSequence() { return anotherThing_CharSequence; } /** * <i>Required.</i> * * @see PropGroupsView#requiredGroup(String) */ public PropGroupsViewModel_ requiredGroup(@NonNull String requiredGroup) { if (requiredGroup == null) { throw new IllegalArgumentException("requiredGroup cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(12); assignedAttributes_epoxyGeneratedModel.clear(13); this.requiredGroup_CharSequence = null; onMutation(); this.requiredGroup_String = requiredGroup; return this; } @NonNull public String requiredGroupString() { return requiredGroup_String; } /** * <i>Required.</i> * * @see PropGroupsView#requiredGroup(CharSequence) */ public PropGroupsViewModel_ requiredGroup(@NonNull CharSequence requiredGroup) { if (requiredGroup == null) { throw new IllegalArgumentException("requiredGroup cannot be null"); } assignedAttributes_epoxyGeneratedModel.set(13); assignedAttributes_epoxyGeneratedModel.clear(12); this.requiredGroup_String = null; onMutation(); this.requiredGroup_CharSequence = requiredGroup; return this; } @NonNull public CharSequence requiredGroupCharSequence() { return requiredGroup_CharSequence; } @Override public PropGroupsViewModel_ id(long p0) { super.id(p0); return this; } @Override public PropGroupsViewModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public PropGroupsViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public PropGroupsViewModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public PropGroupsViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public PropGroupsViewModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public PropGroupsViewModel_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public PropGroupsViewModel_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public PropGroupsViewModel_ show() { super.show(); return this; } @Override public PropGroupsViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public PropGroupsViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public PropGroupsViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.something_CharSequence = (CharSequence) null; this.something_Int = 0; this.somethingElse_CharSequence = null; this.somethingElse_Int = 0; this.primitive_Int = 0; this.primitive_Long = 0L; this.primitiveWithDefault_Int = 0; this.primitiveWithDefault_Long = PropGroupsView.DEFAULT_PRIMITIVE; this.primitiveAndObjectGroupWithPrimitiveDefault_Long = PropGroupsView.DEFAULT_PRIMITIVE; this.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence = null; this.oneThing_Long = 0L; this.anotherThing_CharSequence = null; this.requiredGroup_String = null; this.requiredGroup_CharSequence = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof PropGroupsViewModel_)) { return false; } if (!super.equals(o)) { return false; } PropGroupsViewModel_ that = (PropGroupsViewModel_) 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 ((something_CharSequence != null ? !something_CharSequence.equals(that.something_CharSequence) : that.something_CharSequence != null)) { return false; } if ((something_Int != that.something_Int)) { return false; } if ((somethingElse_CharSequence != null ? !somethingElse_CharSequence.equals(that.somethingElse_CharSequence) : that.somethingElse_CharSequence != null)) { return false; } if ((somethingElse_Int != that.somethingElse_Int)) { return false; } if ((primitive_Int != that.primitive_Int)) { return false; } if ((primitive_Long != that.primitive_Long)) { return false; } if ((primitiveWithDefault_Int != that.primitiveWithDefault_Int)) { return false; } if ((primitiveWithDefault_Long != that.primitiveWithDefault_Long)) { return false; } if ((primitiveAndObjectGroupWithPrimitiveDefault_Long != that.primitiveAndObjectGroupWithPrimitiveDefault_Long)) { return false; } if ((primitiveAndObjectGroupWithPrimitiveDefault_CharSequence != null ? !primitiveAndObjectGroupWithPrimitiveDefault_CharSequence.equals(that.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence) : that.primitiveAndObjectGroupWithPrimitiveDefault_CharSequence != null)) { return false; } if ((oneThing_Long != that.oneThing_Long)) { return false; } if ((anotherThing_CharSequence != null ? !anotherThing_CharSequence.equals(that.anotherThing_CharSequence) : that.anotherThing_CharSequence != null)) { return false; } if ((requiredGroup_String != null ? !requiredGroup_String.equals(that.requiredGroup_String) : that.requiredGroup_String != null)) { return false; } if ((requiredGroup_CharSequence != null ? !requiredGroup_CharSequence.equals(that.requiredGroup_CharSequence) : that.requiredGroup_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 + (something_CharSequence != null ? something_CharSequence.hashCode() : 0); _result = 31 * _result + something_Int; _result = 31 * _result + (somethingElse_CharSequence != null ? somethingElse_CharSequence.hashCode() : 0); _result = 31 * _result + somethingElse_Int; _result = 31 * _result + primitive_Int; _result = 31 * _result + (int) (primitive_Long ^ (primitive_Long >>> 32)); _result = 31 * _result + primitiveWithDefault_Int; _result = 31 * _result + (int) (primitiveWithDefault_Long ^ (primitiveWithDefault_Long >>> 32)); _result = 31 * _result + (int) (primitiveAndObjectGroupWithPrimitiveDefault_Long ^ (primitiveAndObjectGroupWithPrimitiveDefault_Long >>> 32)); _result = 31 * _result + (primitiveAndObjectGroupWithPrimitiveDefault_CharSequence != null ? primitiveAndObjectGroupWithPrimitiveDefault_CharSequence.hashCode() : 0); _result = 31 * _result + (int) (oneThing_Long ^ (oneThing_Long >>> 32)); _result = 31 * _result + (anotherThing_CharSequence != null ? anotherThing_CharSequence.hashCode() : 0); _result = 31 * _result + (requiredGroup_String != null ? requiredGroup_String.hashCode() : 0); _result = 31 * _result + (requiredGroup_CharSequence != null ? requiredGroup_CharSequence.hashCode() : 0); return _result; } @Override public String toString() { return "PropGroupsViewModel_{" + "something_CharSequence=" + something_CharSequence + ", something_Int=" + something_Int + ", somethingElse_CharSequence=" + somethingElse_CharSequence + ", somethingElse_Int=" + somethingElse_Int + ", primitive_Int=" + primitive_Int + ", primitive_Long=" + primitive_Long + ", primitiveWithDefault_Int=" + primitiveWithDefault_Int + ", primitiveWithDefault_Long=" + primitiveWithDefault_Long + ", primitiveAndObjectGroupWithPrimitiveDefault_Long=" + primitiveAndObjectGroupWithPrimitiveDefault_Long + ", primitiveAndObjectGroupWithPrimitiveDefault_CharSequence=" + primitiveAndObjectGroupWithPrimitiveDefault_CharSequence + ", oneThing_Long=" + oneThing_Long + ", anotherThing_CharSequence=" + anotherThing_CharSequence + ", requiredGroup_String=" + requiredGroup_String + ", requiredGroup_CharSequence=" + requiredGroup_CharSequence + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,688
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithCheckedChangeListener_.java
package com.airbnb.epoxy; import android.widget.CompoundButton; 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 ModelWithCheckedChangeListener_ extends ModelWithCheckedChangeListener implements GeneratedModel<Object>, ModelWithCheckedChangeListenerBuilder { private OnModelBoundListener<ModelWithCheckedChangeListener_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithCheckedChangeListener_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithCheckedChangeListener_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithCheckedChangeListener_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithCheckedChangeListener_() { 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 ModelWithCheckedChangeListener_ onBind( OnModelBoundListener<ModelWithCheckedChangeListener_, 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 ModelWithCheckedChangeListener_ onUnbind( OnModelUnboundListener<ModelWithCheckedChangeListener_, 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 ModelWithCheckedChangeListener_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithCheckedChangeListener_, 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 ModelWithCheckedChangeListener_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithCheckedChangeListener_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * Set a checked change listener that will provide the parent view, model, value, and adapter position of the checked view. This will clear the normal CompoundButton.OnCheckedChangeListener if one has been set */ public ModelWithCheckedChangeListener_ checkedListener( final OnModelCheckedChangeListener<ModelWithCheckedChangeListener_, Object> checkedListener) { onMutation(); if (checkedListener == null) { super.checkedListener = null; } else { super.checkedListener = new WrappedEpoxyModelCheckedChangeListener(checkedListener); } return this; } public ModelWithCheckedChangeListener_ checkedListener( CompoundButton.OnCheckedChangeListener checkedListener) { onMutation(); super.checkedListener = checkedListener; return this; } public CompoundButton.OnCheckedChangeListener checkedListener() { return checkedListener; } @Override public ModelWithCheckedChangeListener_ id(long p0) { super.id(p0); return this; } @Override public ModelWithCheckedChangeListener_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithCheckedChangeListener_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithCheckedChangeListener_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithCheckedChangeListener_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithCheckedChangeListener_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithCheckedChangeListener_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithCheckedChangeListener_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithCheckedChangeListener_ show() { super.show(); return this; } @Override public ModelWithCheckedChangeListener_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithCheckedChangeListener_ hide() { super.hide(); return this; } @Override public ModelWithCheckedChangeListener_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.checkedListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithCheckedChangeListener_)) { return false; } if (!super.equals(o)) { return false; } ModelWithCheckedChangeListener_ that = (ModelWithCheckedChangeListener_) 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 (((checkedListener == null) != (that.checkedListener == 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 + (checkedListener != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithCheckedChangeListener_{" + "checkedListener=" + checkedListener + "}" + super.toString(); } }
8,689
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/OnVisibilityStateChangedViewModel_.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 OnVisibilityStateChangedViewModel_ extends EpoxyModel<OnVisibilityStateChangedView> implements GeneratedModel<OnVisibilityStateChangedView>, OnVisibilityStateChangedViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(1); private OnModelBoundListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> 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 OnVisibilityStateChangedView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final OnVisibilityStateChangedView object) { super.bind(object); object.setTitle(title_CharSequence); } @Override public void bind(final OnVisibilityStateChangedView object, EpoxyModel previousModel) { if (!(previousModel instanceof OnVisibilityStateChangedViewModel_)) { bind(object); return; } OnVisibilityStateChangedViewModel_ that = (OnVisibilityStateChangedViewModel_) 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 OnVisibilityStateChangedView 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 OnVisibilityStateChangedViewModel_ onBind( OnModelBoundListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(OnVisibilityStateChangedView 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 OnVisibilityStateChangedViewModel_ onUnbind( OnModelUnboundListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final OnVisibilityStateChangedView object) { if (onModelVisibilityStateChangedListener_epoxyGeneratedModel != null) { onModelVisibilityStateChangedListener_epoxyGeneratedModel.onVisibilityStateChanged(this, object, visibilityState); } object.onVisibilityStateChanged1(visibilityState); object.onVisibilityStateChanged2(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 OnVisibilityStateChangedViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final OnVisibilityStateChangedView 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 OnVisibilityStateChangedViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<OnVisibilityStateChangedViewModel_, OnVisibilityStateChangedView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } /** * <i>Required.</i> * * @see OnVisibilityStateChangedView#setTitle(CharSequence) */ public OnVisibilityStateChangedViewModel_ 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 OnVisibilityStateChangedViewModel_ id(long p0) { super.id(p0); return this; } @Override public OnVisibilityStateChangedViewModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public OnVisibilityStateChangedViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public OnVisibilityStateChangedViewModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public OnVisibilityStateChangedViewModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public OnVisibilityStateChangedViewModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public OnVisibilityStateChangedViewModel_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public OnVisibilityStateChangedViewModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public OnVisibilityStateChangedViewModel_ show() { super.show(); return this; } @Override public OnVisibilityStateChangedViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public OnVisibilityStateChangedViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public OnVisibilityStateChangedViewModel_ 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 OnVisibilityStateChangedViewModel_)) { return false; } if (!super.equals(o)) { return false; } OnVisibilityStateChangedViewModel_ that = (OnVisibilityStateChangedViewModel_) 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 "OnVisibilityStateChangedViewModel_{" + "title_CharSequence=" + title_CharSequence + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,690
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelDoNotHash_.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 ModelDoNotHash_ extends ModelDoNotHash implements GeneratedModel<Object>, ModelDoNotHashBuilder { private OnModelBoundListener<ModelDoNotHash_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelDoNotHash_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelDoNotHash_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelDoNotHash_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelDoNotHash_() { 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 ModelDoNotHash_ onBind(OnModelBoundListener<ModelDoNotHash_, 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 ModelDoNotHash_ onUnbind(OnModelUnboundListener<ModelDoNotHash_, 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 ModelDoNotHash_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelDoNotHash_, 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 ModelDoNotHash_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelDoNotHash_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelDoNotHash_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } public ModelDoNotHash_ value2(int value2) { onMutation(); super.value2 = value2; return this; } public int value2() { return value2; } public ModelDoNotHash_ value3(String value3) { onMutation(); super.value3 = value3; return this; } public String value3() { return value3; } @Override public ModelDoNotHash_ id(long p0) { super.id(p0); return this; } @Override public ModelDoNotHash_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelDoNotHash_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelDoNotHash_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelDoNotHash_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelDoNotHash_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelDoNotHash_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelDoNotHash_ spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelDoNotHash_ show() { super.show(); return this; } @Override public ModelDoNotHash_ show(boolean p0) { super.show(p0); return this; } @Override public ModelDoNotHash_ hide() { super.hide(); return this; } @Override public ModelDoNotHash_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.value = 0; super.value2 = 0; super.value3 = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelDoNotHash_)) { return false; } if (!super.equals(o)) { return false; } ModelDoNotHash_ that = (ModelDoNotHash_) 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; } if (((value3 == null) != (that.value3 == 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; _result = 31 * _result + (value3 != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelDoNotHash_{" + "value=" + value + ", value2=" + value2 + ", value3=" + value3 + "}" + super.toString(); } }
8,691
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestFieldPropChildViewModel_.java
package com.airbnb.epoxy; import android.content.Context; import android.view.View; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; 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.lang.UnsupportedOperationException; import java.util.BitSet; import javax.annotation.Nullable; /** * Generated file. Do not modify! */ public class TestFieldPropChildViewModel_ extends EpoxyModel<TestFieldPropChildView> implements GeneratedModel<TestFieldPropChildView>, TestFieldPropChildViewModelBuilder { private final BitSet assignedAttributes_epoxyGeneratedModel = new BitSet(2); private OnModelBoundListener<TestFieldPropChildViewModel_, TestFieldPropChildView> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<TestFieldPropChildViewModel_, TestFieldPropChildView> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<TestFieldPropChildViewModel_, TestFieldPropChildView> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<TestFieldPropChildViewModel_, TestFieldPropChildView> onModelVisibilityChangedListener_epoxyGeneratedModel; /** * Bitset index: 0 */ private StringAttributeData textValue_StringAttributeData = new StringAttributeData(); @Nullable private View.OnClickListener value_OnClickListener = (View.OnClickListener) null; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); if (!assignedAttributes_epoxyGeneratedModel.get(0)) { throw new IllegalStateException("A value is required for textValue"); } } @Override protected int getViewType() { return 0; } @Override public TestFieldPropChildView buildView(ViewGroup parent) { TestFieldPropChildView v = new TestFieldPropChildView(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 TestFieldPropChildView object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); } @Override public void bind(final TestFieldPropChildView object) { super.bind(object); object.textValue = textValue_StringAttributeData.toString(object.getContext()); object.value = value_OnClickListener; } @Override public void bind(final TestFieldPropChildView object, EpoxyModel previousModel) { if (!(previousModel instanceof TestFieldPropChildViewModel_)) { bind(object); return; } TestFieldPropChildViewModel_ that = (TestFieldPropChildViewModel_) previousModel; super.bind(object); if ((textValue_StringAttributeData != null ? !textValue_StringAttributeData.equals(that.textValue_StringAttributeData) : that.textValue_StringAttributeData != null)) { object.textValue = textValue_StringAttributeData.toString(object.getContext()); } if ((value_OnClickListener != null ? !value_OnClickListener.equals(that.value_OnClickListener) : that.value_OnClickListener != null)) { object.value = value_OnClickListener; } } @Override public void handlePostBind(final TestFieldPropChildView 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 TestFieldPropChildViewModel_ onBind( OnModelBoundListener<TestFieldPropChildViewModel_, TestFieldPropChildView> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(TestFieldPropChildView object) { super.unbind(object); if (onModelUnboundListener_epoxyGeneratedModel != null) { onModelUnboundListener_epoxyGeneratedModel.onModelUnbound(this, object); } object.value = (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 TestFieldPropChildViewModel_ onUnbind( OnModelUnboundListener<TestFieldPropChildViewModel_, TestFieldPropChildView> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final TestFieldPropChildView 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 TestFieldPropChildViewModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestFieldPropChildViewModel_, TestFieldPropChildView> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final TestFieldPropChildView 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 TestFieldPropChildViewModel_ onVisibilityChanged( OnModelVisibilityChangedListener<TestFieldPropChildViewModel_, TestFieldPropChildView> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public CharSequence getTextValue(Context context) { return textValue_StringAttributeData.toString(context); } /** * <i>Required.</i> * * @see TestFieldPropChildView#textValue */ public TestFieldPropChildViewModel_ textValue(@NonNull CharSequence textValue) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); if (textValue == null) { throw new IllegalArgumentException("textValue cannot be null"); } textValue_StringAttributeData.setValue(textValue); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropChildView#textValue */ public TestFieldPropChildViewModel_ textValue(@StringRes int stringRes) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); textValue_StringAttributeData.setValue(stringRes); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropChildView#textValue */ public TestFieldPropChildViewModel_ textValue(@StringRes int stringRes, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); textValue_StringAttributeData.setValue(stringRes, formatArgs); return this; } /** * Throws if a value <= 0 is set. * <p> * <i>Required.</i> * * @see TestFieldPropChildView#textValue */ public TestFieldPropChildViewModel_ textValueQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); assignedAttributes_epoxyGeneratedModel.set(0); textValue_StringAttributeData.setValue(pluralRes, quantity, formatArgs); 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 TestFieldPropChildViewModel_ value( @Nullable final OnModelClickListener<TestFieldPropChildViewModel_, TestFieldPropChildView> value) { onMutation(); if (value == null) { this.value_OnClickListener = null; } else { this.value_OnClickListener = new WrappedEpoxyModelClickListener<>(value); } return this; } /** * <i>Optional</i>: Default value is (View.OnClickListener) null * * @see TestFieldPropParentView#value */ public TestFieldPropChildViewModel_ value(@Nullable View.OnClickListener value) { onMutation(); this.value_OnClickListener = value; return this; } @Nullable public View.OnClickListener value() { return value_OnClickListener; } @Override public TestFieldPropChildViewModel_ id(long p0) { super.id(p0); return this; } @Override public TestFieldPropChildViewModel_ id(@androidx.annotation.Nullable Number... p0) { super.id(p0); return this; } @Override public TestFieldPropChildViewModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public TestFieldPropChildViewModel_ id(@androidx.annotation.Nullable CharSequence p0) { super.id(p0); return this; } @Override public TestFieldPropChildViewModel_ id(@androidx.annotation.Nullable CharSequence p0, @androidx.annotation.Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public TestFieldPropChildViewModel_ id(@androidx.annotation.Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public TestFieldPropChildViewModel_ layout(@LayoutRes int p0) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public TestFieldPropChildViewModel_ spanSizeOverride( @androidx.annotation.Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public TestFieldPropChildViewModel_ show() { super.show(); return this; } @Override public TestFieldPropChildViewModel_ show(boolean p0) { super.show(p0); return this; } @Override public TestFieldPropChildViewModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public TestFieldPropChildViewModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; assignedAttributes_epoxyGeneratedModel.clear(); this.textValue_StringAttributeData = new StringAttributeData(); this.value_OnClickListener = (View.OnClickListener) null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TestFieldPropChildViewModel_)) { return false; } if (!super.equals(o)) { return false; } TestFieldPropChildViewModel_ that = (TestFieldPropChildViewModel_) 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 ((textValue_StringAttributeData != null ? !textValue_StringAttributeData.equals(that.textValue_StringAttributeData) : that.textValue_StringAttributeData != 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 + (textValue_StringAttributeData != null ? textValue_StringAttributeData.hashCode() : 0); _result = 31 * _result + (value_OnClickListener != null ? value_OnClickListener.hashCode() : 0); return _result; } @Override public String toString() { return "TestFieldPropChildViewModel_{" + "textValue_StringAttributeData=" + textValue_StringAttributeData + ", value_OnClickListener=" + value_OnClickListener + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,692
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelViewWithParisModel_.java
package com.airbnb.epoxy; import android.os.AsyncTask; import android.view.ViewGroup; import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; import com.airbnb.paris.StyleApplierUtils; import com.airbnb.paris.styles.Style; import com.airbnb.viewmodeladapter.R; import java.lang.AssertionError; import java.lang.CharSequence; import java.lang.IllegalStateException; import java.lang.Number; import java.lang.Object; import java.lang.Override; import java.lang.Runnable; import java.lang.String; import java.lang.UnsupportedOperationException; import java.lang.ref.WeakReference; import java.util.Objects; /** * Generated file. Do not modify! */ public class ModelViewWithParisModel_ extends EpoxyModel<ModelViewWithParis> implements GeneratedModel<ModelViewWithParis>, ModelViewWithParisModelBuilder { private static final Style DEFAULT_PARIS_STYLE = new ModelViewWithParisStyleApplier.StyleBuilder().addDefault().build(); private static WeakReference<Style> parisStyleReference_header; private static WeakReference<Style> parisStyleReference_other; private static WeakReference<Style> parisStyleReference_default; private OnModelBoundListener<ModelViewWithParisModel_, ModelViewWithParis> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelViewWithParisModel_, ModelViewWithParis> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelViewWithParisModel_, ModelViewWithParis> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelViewWithParisModel_, ModelViewWithParis> onModelVisibilityChangedListener_epoxyGeneratedModel; private int value_Int = 0; private Style style = DEFAULT_PARIS_STYLE; @Override public void addTo(EpoxyController controller) { super.addTo(controller); addWithDebugValidation(controller); } @Override protected int getViewType() { return 0; } @Override public ModelViewWithParis buildView(ViewGroup parent) { ModelViewWithParis v = new ModelViewWithParis(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 ModelViewWithParis object, final int position) { validateStateHasNotChangedSinceAdded("The model was changed between being added to the controller and being bound.", position); if (!Objects.equals(style, object.getTag(R.id.epoxy_saved_view_style))) { AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() { public void run() { try { StyleApplierUtils.Companion.assertSameAttributes(new ModelViewWithParisStyleApplier(object), style, DEFAULT_PARIS_STYLE); } catch(AssertionError e) { throw new IllegalStateException("ModelViewWithParisModel_ model at position " + position + " has an invalid style:\n\n" + e.getMessage()); } } } ); } } @Override public void bind(final ModelViewWithParis object) { if (!Objects.equals(style, object.getTag(R.id.epoxy_saved_view_style))) { ModelViewWithParisStyleApplier styleApplier = new ModelViewWithParisStyleApplier(object); styleApplier.apply(style); object.setTag(R.id.epoxy_saved_view_style, style); } super.bind(object); object.value = value_Int; } @Override public void bind(final ModelViewWithParis object, EpoxyModel previousModel) { if (!(previousModel instanceof ModelViewWithParisModel_)) { bind(object); return; } ModelViewWithParisModel_ that = (ModelViewWithParisModel_) previousModel; if (!Objects.equals(style, that.style)) { ModelViewWithParisStyleApplier styleApplier = new ModelViewWithParisStyleApplier(object); styleApplier.apply(style); object.setTag(R.id.epoxy_saved_view_style, style); } super.bind(object); if ((value_Int != that.value_Int)) { object.value = value_Int; } } @Override public void handlePostBind(final ModelViewWithParis 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 ModelViewWithParisModel_ onBind( OnModelBoundListener<ModelViewWithParisModel_, ModelViewWithParis> listener) { onMutation(); this.onModelBoundListener_epoxyGeneratedModel = listener; return this; } @Override public void unbind(ModelViewWithParis 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 ModelViewWithParisModel_ onUnbind( OnModelUnboundListener<ModelViewWithParisModel_, ModelViewWithParis> listener) { onMutation(); this.onModelUnboundListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityStateChanged(int visibilityState, final ModelViewWithParis 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 ModelViewWithParisModel_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelViewWithParisModel_, ModelViewWithParis> listener) { onMutation(); this.onModelVisibilityStateChangedListener_epoxyGeneratedModel = listener; return this; } @Override public void onVisibilityChanged(float percentVisibleHeight, float percentVisibleWidth, int visibleHeight, int visibleWidth, final ModelViewWithParis 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 ModelViewWithParisModel_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelViewWithParisModel_, ModelViewWithParis> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelViewWithParisModel_ style(Style style) { onMutation(); this.style = style; return this; } public ModelViewWithParisModel_ styleBuilder( StyleBuilderCallback<ModelViewWithParisStyleApplier.StyleBuilder> builderCallback) { ModelViewWithParisStyleApplier.StyleBuilder builder = new ModelViewWithParisStyleApplier.StyleBuilder(); builderCallback.buildStyle(builder.addDefault()); return style(builder.build()); } /** * * @see ModelViewWithParis#headerStyle(error.NonExistentClass) */ public ModelViewWithParisModel_ withHeaderStyle() { Style style = parisStyleReference_header != null ? parisStyleReference_header.get() : null; if (style == null) { style = new ModelViewWithParisStyleApplier.StyleBuilder().addHeader().build(); parisStyleReference_header = new WeakReference<>(style); } return style(style); } /** * * @see ModelViewWithParis#otherStyle(error.NonExistentClass) */ public ModelViewWithParisModel_ withOtherStyle() { Style style = parisStyleReference_other != null ? parisStyleReference_other.get() : null; if (style == null) { style = new ModelViewWithParisStyleApplier.StyleBuilder().addOther().build(); parisStyleReference_other = new WeakReference<>(style); } return style(style); } /** * * @see ModelViewWithParis#headerStyle(error.NonExistentClass) */ public ModelViewWithParisModel_ withDefaultStyle() { Style style = parisStyleReference_default != null ? parisStyleReference_default.get() : null; if (style == null) { style = new ModelViewWithParisStyleApplier.StyleBuilder().addDefault().build(); parisStyleReference_default = new WeakReference<>(style); } return style(style); } /** * <i>Optional</i>: Default value is 0 * * @see ModelViewWithParis#value */ public ModelViewWithParisModel_ value(int value) { onMutation(); this.value_Int = value; return this; } public int value() { return value_Int; } @Override public ModelViewWithParisModel_ id(long p0) { super.id(p0); return this; } @Override public ModelViewWithParisModel_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelViewWithParisModel_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelViewWithParisModel_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelViewWithParisModel_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelViewWithParisModel_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelViewWithParisModel_ layout(@LayoutRes int p0) { throw new UnsupportedOperationException("Layout resources are unsupported with programmatic views."); } @Override public ModelViewWithParisModel_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelViewWithParisModel_ show() { super.show(); return this; } @Override public ModelViewWithParisModel_ show(boolean p0) { super.show(p0); return this; } @Override public ModelViewWithParisModel_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { throw new UnsupportedOperationException("Layout resources are unsupported for views created programmatically."); } @Override public ModelViewWithParisModel_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; this.value_Int = 0; this.style = DEFAULT_PARIS_STYLE; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelViewWithParisModel_)) { return false; } if (!super.equals(o)) { return false; } ModelViewWithParisModel_ that = (ModelViewWithParisModel_) 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; } if ((style != null ? !style.equals(that.style) : that.style != 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_Int; _result = 31 * _result + (style != null ? style.hashCode() : 0); return _result; } @Override public String toString() { return "ModelViewWithParisModel_{" + "value_Int=" + value_Int + ", style=" + style + "}" + super.toString(); } @Override public int getSpanSize(int totalSpanCount, int position, int itemCount) { return totalSpanCount; } }
8,693
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithViewClickListener_.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 ModelWithViewClickListener_ extends ModelWithViewClickListener implements GeneratedModel<Object>, ModelWithViewClickListenerBuilder { private OnModelBoundListener<ModelWithViewClickListener_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithViewClickListener_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithViewClickListener_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithViewClickListener_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithViewClickListener_() { 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 ModelWithViewClickListener_ onBind( OnModelBoundListener<ModelWithViewClickListener_, 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 ModelWithViewClickListener_ onUnbind( OnModelUnboundListener<ModelWithViewClickListener_, 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 ModelWithViewClickListener_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithViewClickListener_, 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 ModelWithViewClickListener_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithViewClickListener_, Object> 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 ModelWithViewClickListener_ clickListener( final OnModelClickListener<ModelWithViewClickListener_, Object> clickListener) { onMutation(); if (clickListener == null) { super.clickListener = null; } else { super.clickListener = new WrappedEpoxyModelClickListener<>(clickListener); } return this; } public ModelWithViewClickListener_ clickListener(View.OnClickListener clickListener) { onMutation(); super.clickListener = clickListener; return this; } public View.OnClickListener clickListener() { return clickListener; } @Override public ModelWithViewClickListener_ id(long p0) { super.id(p0); return this; } @Override public ModelWithViewClickListener_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithViewClickListener_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithViewClickListener_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithViewClickListener_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithViewClickListener_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithViewClickListener_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithViewClickListener_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithViewClickListener_ show() { super.show(); return this; } @Override public ModelWithViewClickListener_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithViewClickListener_ hide() { super.hide(); return this; } @Override public ModelWithViewClickListener_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.clickListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithViewClickListener_)) { return false; } if (!super.equals(o)) { return false; } ModelWithViewClickListener_ that = (ModelWithViewClickListener_) 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 == null) != (that.clickListener == 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 != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithViewClickListener_{" + "clickListener=" + clickListener + "}" + super.toString(); } }
8,694
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithViewLongClickListener_.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 ModelWithViewLongClickListener_ extends ModelWithViewLongClickListener implements GeneratedModel<Object>, ModelWithViewLongClickListenerBuilder { private OnModelBoundListener<ModelWithViewLongClickListener_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithViewLongClickListener_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithViewLongClickListener_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithViewLongClickListener_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithViewLongClickListener_() { 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 ModelWithViewLongClickListener_ onBind( OnModelBoundListener<ModelWithViewLongClickListener_, 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 ModelWithViewLongClickListener_ onUnbind( OnModelUnboundListener<ModelWithViewLongClickListener_, 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 ModelWithViewLongClickListener_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithViewLongClickListener_, 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 ModelWithViewLongClickListener_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithViewLongClickListener_, Object> 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 ModelWithViewLongClickListener_ clickListener( final OnModelLongClickListener<ModelWithViewLongClickListener_, Object> clickListener) { onMutation(); if (clickListener == null) { super.clickListener = null; } else { super.clickListener = new WrappedEpoxyModelClickListener<>(clickListener); } return this; } public ModelWithViewLongClickListener_ clickListener(View.OnLongClickListener clickListener) { onMutation(); super.clickListener = clickListener; return this; } public View.OnLongClickListener clickListener() { return clickListener; } @Override public ModelWithViewLongClickListener_ id(long p0) { super.id(p0); return this; } @Override public ModelWithViewLongClickListener_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithViewLongClickListener_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithViewLongClickListener_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithViewLongClickListener_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithViewLongClickListener_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithViewLongClickListener_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithViewLongClickListener_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithViewLongClickListener_ show() { super.show(); return this; } @Override public ModelWithViewLongClickListener_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithViewLongClickListener_ hide() { super.hide(); return this; } @Override public ModelWithViewLongClickListener_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.clickListener = null; super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithViewLongClickListener_)) { return false; } if (!super.equals(o)) { return false; } ModelWithViewLongClickListener_ that = (ModelWithViewLongClickListener_) 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 == null) != (that.clickListener == 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 != null ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithViewLongClickListener_{" + "clickListener=" + clickListener + "}" + super.toString(); } }
8,695
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/BasicModelWithAttribute_.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 BasicModelWithAttribute_ extends BasicModelWithAttribute implements GeneratedModel<Object>, BasicModelWithAttributeBuilder { private OnModelBoundListener<BasicModelWithAttribute_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<BasicModelWithAttribute_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<BasicModelWithAttribute_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<BasicModelWithAttribute_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public BasicModelWithAttribute_() { 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 BasicModelWithAttribute_ onBind( OnModelBoundListener<BasicModelWithAttribute_, 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 BasicModelWithAttribute_ onUnbind( OnModelUnboundListener<BasicModelWithAttribute_, 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 BasicModelWithAttribute_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<BasicModelWithAttribute_, 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 BasicModelWithAttribute_ onVisibilityChanged( OnModelVisibilityChangedListener<BasicModelWithAttribute_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public BasicModelWithAttribute_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public BasicModelWithAttribute_ id(long p0) { super.id(p0); return this; } @Override public BasicModelWithAttribute_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public BasicModelWithAttribute_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public BasicModelWithAttribute_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public BasicModelWithAttribute_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public BasicModelWithAttribute_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public BasicModelWithAttribute_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public BasicModelWithAttribute_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public BasicModelWithAttribute_ show() { super.show(); return this; } @Override public BasicModelWithAttribute_ show(boolean p0) { super.show(p0); return this; } @Override public BasicModelWithAttribute_ hide() { super.hide(); return this; } @Override public BasicModelWithAttribute_ 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 BasicModelWithAttribute_)) { return false; } if (!super.equals(o)) { return false; } BasicModelWithAttribute_ that = (BasicModelWithAttribute_) 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 "BasicModelWithAttribute_{" + "value=" + value + "}" + super.toString(); } }
8,696
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/GenerateDefaultLayoutMethodNextParentLayout$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 GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ extends GenerateDefaultLayoutMethodNextParentLayout.NoLayout implements GeneratedModel<Object>, GenerateDefaultLayoutMethodNextParentLayout_NoLayoutBuilder { private OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$NoLayout_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$NoLayout_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$NoLayout_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$NoLayout_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public GenerateDefaultLayoutMethodNextParentLayout$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 GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ onBind( OnModelBoundListener<GenerateDefaultLayoutMethodNextParentLayout$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 GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ onUnbind( OnModelUnboundListener<GenerateDefaultLayoutMethodNextParentLayout$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 GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<GenerateDefaultLayoutMethodNextParentLayout$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 GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ onVisibilityChanged( OnModelVisibilityChangedListener<GenerateDefaultLayoutMethodNextParentLayout$NoLayout_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ value(int value) { onMutation(); super.value = value; return this; } public int value() { return value; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ id(long p0) { super.id(p0); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ show() { super.show(); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ show(boolean p0) { super.show(p0); return this; } @Override public GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ hide() { super.hide(); return this; } @Override @LayoutRes protected int getDefaultLayout() { return 1; } @Override public GenerateDefaultLayoutMethodNextParentLayout$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 GenerateDefaultLayoutMethodNextParentLayout$NoLayout_)) { return false; } if (!super.equals(o)) { return false; } GenerateDefaultLayoutMethodNextParentLayout$NoLayout_ that = (GenerateDefaultLayoutMethodNextParentLayout$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 "GenerateDefaultLayoutMethodNextParentLayout$NoLayout_{" + "value=" + value + "}" + super.toString(); } }
8,697
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_.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 ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ extends ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName implements GeneratedModel<Object>, ModelWithPrivateFieldWithSameAsFieldGetterAndSetterNameBuilder { private OnModelBoundListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, Object> onModelBoundListener_epoxyGeneratedModel; private OnModelUnboundListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, Object> onModelUnboundListener_epoxyGeneratedModel; private OnModelVisibilityStateChangedListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, Object> onModelVisibilityStateChangedListener_epoxyGeneratedModel; private OnModelVisibilityChangedListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, Object> onModelVisibilityChangedListener_epoxyGeneratedModel; public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_() { 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 ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ onBind( OnModelBoundListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, 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 ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ onUnbind( OnModelUnboundListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, 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 ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ onVisibilityStateChanged( OnModelVisibilityStateChangedListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, 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 ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ onVisibilityChanged( OnModelVisibilityChangedListener<ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_, Object> listener) { onMutation(); this.onModelVisibilityChangedListener_epoxyGeneratedModel = listener; return this; } public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ isValue(boolean isValue) { onMutation(); super.setValue(isValue); return this; } public boolean isValue() { return super.isValue(); } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ id(long p0) { super.id(p0); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ id(@Nullable Number... p0) { super.id(p0); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ id(long p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ id(@Nullable CharSequence p0) { super.id(p0); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ id(@Nullable CharSequence p0, @Nullable CharSequence... p1) { super.id(p0, p1); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ id(@Nullable CharSequence p0, long p1) { super.id(p0, p1); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ layout(@LayoutRes int p0) { super.layout(p0); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ spanSizeOverride( @Nullable EpoxyModel.SpanSizeOverrideCallback p0) { super.spanSizeOverride(p0); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ show() { super.show(); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ show(boolean p0) { super.show(p0); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ hide() { super.hide(); return this; } @Override public ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ reset() { onModelBoundListener_epoxyGeneratedModel = null; onModelUnboundListener_epoxyGeneratedModel = null; onModelVisibilityStateChangedListener_epoxyGeneratedModel = null; onModelVisibilityChangedListener_epoxyGeneratedModel = null; super.setValue(false); super.reset(); return this; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_)) { return false; } if (!super.equals(o)) { return false; } ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_ that = (ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_) 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 ((isValue() != that.isValue())) { 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 + (isValue() ? 1 : 0); return _result; } @Override public String toString() { return "ModelWithPrivateFieldWithSameAsFieldGetterAndSetterName_{" + "isValue=" + isValue() + "}" + super.toString(); } }
8,698
0
Create_ds/epoxy/epoxy-processortest/src/test/resources
Create_ds/epoxy/epoxy-processortest/src/test/resources/ksp/TestManyTypesViewModelBuilder.java
package com.airbnb.epoxy; import android.view.View; import androidx.annotation.Dimension; import androidx.annotation.IntRange; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.PluralsRes; import androidx.annotation.StringRes; import java.lang.Boolean; import java.lang.CharSequence; import java.lang.Integer; import java.lang.Number; import java.lang.Object; import java.lang.String; import java.util.List; import java.util.Map; import kotlin.jvm.functions.Function3; @EpoxyBuildScope public interface TestManyTypesViewModelBuilder { TestManyTypesViewModelBuilder onBind( OnModelBoundListener<TestManyTypesViewModel_, TestManyTypesView> listener); TestManyTypesViewModelBuilder onUnbind( OnModelUnboundListener<TestManyTypesViewModel_, TestManyTypesView> listener); TestManyTypesViewModelBuilder onVisibilityStateChanged( OnModelVisibilityStateChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener); TestManyTypesViewModelBuilder onVisibilityChanged( OnModelVisibilityChangedListener<TestManyTypesViewModel_, TestManyTypesView> listener); TestManyTypesViewModelBuilder stringValue(@NonNull String stringValue); TestManyTypesViewModelBuilder nullableStringValue(@Nullable String nullableStringValue); TestManyTypesViewModelBuilder function( @NonNull Function3<? super Integer, ? super Integer, ? super Integer, Integer> function); TestManyTypesViewModelBuilder intValue(int intValue); TestManyTypesViewModelBuilder intValueWithAnnotation(@StringRes int intValueWithAnnotation); TestManyTypesViewModelBuilder intValueWithRangeAnnotation( @IntRange(from = 0, to = 200) int intValueWithRangeAnnotation); TestManyTypesViewModelBuilder intValueWithDimenTypeAnnotation( @Dimension(unit = 0) int intValueWithDimenTypeAnnotation); TestManyTypesViewModelBuilder intWithMultipleAnnotations( @IntRange(from = 0, to = 200) @Dimension(unit = 0) int intWithMultipleAnnotations); TestManyTypesViewModelBuilder integerValue(@NonNull Integer integerValue); TestManyTypesViewModelBuilder boolValue(boolean boolValue); TestManyTypesViewModelBuilder models(@NonNull List<? extends EpoxyModel<?>> models); TestManyTypesViewModelBuilder booleanValue(@NonNull Boolean booleanValue); TestManyTypesViewModelBuilder arrayValue(@NonNull String[] arrayValue); TestManyTypesViewModelBuilder listValue(@NonNull List<String> listValue); TestManyTypesViewModelBuilder mapValue(@NonNull Map<Integer, Integer> mapValue); TestManyTypesViewModelBuilder clickListener( @NonNull final OnModelClickListener<TestManyTypesViewModel_, TestManyTypesView> clickListener); TestManyTypesViewModelBuilder clickListener(@NonNull View.OnClickListener clickListener); TestManyTypesViewModelBuilder title(@Nullable CharSequence title); TestManyTypesViewModelBuilder title(@StringRes int stringRes); TestManyTypesViewModelBuilder title(@StringRes int stringRes, Object... formatArgs); TestManyTypesViewModelBuilder titleQuantityRes(@PluralsRes int pluralRes, int quantity, Object... formatArgs); TestManyTypesViewModelBuilder id(long p0); TestManyTypesViewModelBuilder id(@Nullable Number... p0); TestManyTypesViewModelBuilder id(long p0, long p1); TestManyTypesViewModelBuilder id(@Nullable CharSequence p0); TestManyTypesViewModelBuilder id(@Nullable CharSequence p0, @Nullable CharSequence... p1); TestManyTypesViewModelBuilder id(@Nullable CharSequence p0, long p1); TestManyTypesViewModelBuilder layout(@LayoutRes int p0); TestManyTypesViewModelBuilder spanSizeOverride(@Nullable EpoxyModel.SpanSizeOverrideCallback p0); }
8,699