Comments (11)
Added a failing test for this https://github.com/gabrielittner/auto-value-with/tree/prefixes
I'll try to get a fix out later this week.
from auto-value-with.
Any word on this? This is causing a problem with Android's databinding because it requires bean-style getters.
from auto-value-with.
The snapshot is out now, a proper release will be out later today.
from auto-value-with.
i see the test. is there a fix in that PR? i didn't see one when i looked at it. it's still broken for me in 1.2
from auto-value-with.
The fix was part of #17. Can you give me a sample that doesn't work?
from auto-value-with.
want a whole project or just a file?
from auto-value-with.
Just pasting the file in here is enough.
from auto-value-with.
truncated stacktrace:
Error:(14, 17) error: @AutoValue processor threw an exception: java.lang.IllegalArgumentException: com.itworks.mobile.terminator.models.MailingAddress doesn't have property with name street which is required for withStreet()
at com.gabrielittner.auto.value.with.AutoValueWithExtension.getWithMethods(AutoValueWithExtension.java:65)
at com.gabrielittner.auto.value.with.AutoValueWithExtension.applicable(AutoValueWithExtension.java:108)
at com.google.auto.value.processor.AutoValueProcessor.processType(AutoValueProcessor.java:372)
at com.google.auto.value.processor.AutoValueProcessor.process(AutoValueProcessor.java:143)
...
class definition:
package datamodels;
import com.google.auto.value.AutoValue;
import android.databinding.BaseObservable;
import android.databinding.Bindable;
import android.os.Parcelable;
import android.support.annotation.Nullable;
/**
* Created by toadzky on 4/28/16.
*/
@AutoValue
public abstract class MailingAddress extends BaseObservable implements Parcelable {
public static final MailingAddress EMPTY = MailingAddress.builder().build();
@Bindable
public abstract String getStreet();
@Bindable
@Nullable
public abstract String getAdditional();
@Bindable
public abstract String getCity();
@Bindable
public abstract String getDistrict();
@Bindable
public abstract String getCountry();
@Bindable
public abstract String getPostal();
public abstract MailingAddress withStreet(String update);
public abstract MailingAddress withAdditional(String update);
public abstract MailingAddress withCity(String update);
public abstract MailingAddress withDistrict(String update);
public abstract MailingAddress withCountry(String update);
public abstract MailingAddress withPostal(String update);
private Builder toBuilder() {
return new AutoValue_MailingAddress.Builder(this);
}
public static Builder builder() {
return new AutoValue_MailingAddress.Builder();
}
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder street(String street);
public abstract Builder additional(String additional);
public abstract Builder city(String city);
public abstract Builder district(String district);
public abstract Builder country(String country);
public abstract Builder postal(String postal);
public abstract MailingAddress build();
}
}
from auto-value-with.
Does it work when you remove implements Parcelable
?
from auto-value-with.
Yes. I'm using the auto-value-parcel
extension as well. I guess it's an interaction between extensions.
from auto-value-with.
Someone else ran into that issue with auto-value-parcel
+ auto+value-gson
. I've posted a workaround in that issue rharter/auto-value-parcel#47
from auto-value-with.
Related Issues (20)
- Don't attempt to implement non-abstract 'with' methods HOT 1
- The generated class uses an inexistent constructor when using AutoValue's Builder HOT 1
- Is @CheckResult used? And if not, why? HOT 3
- 0.1.2's wither implementations return wrong AutoValue class for Nested classes
- Exception when compiling HOT 4
- Add support for generic arguments HOT 1
- Adding with-er methods generates a lot of warnings HOT 1
- @Override annotation is duplicated HOT 2
- Compiler disallowing abstract with-er method HOT 11
- Can't use generics in Interface, version 1.4
- Multiple Fields Support HOT 3
- Cut final release since AutoValue 1.3 is released HOT 3
- Is it okay to add an example to this repo HOT 2
- If the model uses two of the same adapter, we get a duplicate field HOT 1
- IllegalStateException: Missing required properties HOT 3
- Allow changes in generic types
- Include @CheckResult on generated methods HOT 1
- IllegalStateException: Missing required properties HOT 2
- Binaries of latest release (1.1.0) lack class files of shaded dependencies HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-value-with.