auto-value Questions

1

Java hash code generation code often uses prime numbers in its calculations. There are good reasons for this, as explained in Why use a prime number in hashCode? and elsewhere. For example, AutoVal...
Bimonthly asked 27/6, 2018 at 23:14

4

I have been trying to find the correct settings for IntelliJ's annotation processing in order for it to co-exist with Gradle's build process. Whenever I build from IntelliJ I cannot get it to reco...

5

Solved

Is it possible to use both Room persistence library's @Entity with AutoValue's @AutoValue and builder on the same POJO? How should i do it?
Sororicide asked 2/7, 2017 at 9:57

2

I use google/auto-value to create immutable value classes in a maven project. <?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:s...
Evocator asked 2/11, 2019 at 12:50

2

I'm using an AutoValue extension to generate my Parcelable Android classes. The documentation specifically states that one @AutoValue cannot extend another: https://github.com/google/auto/blob/mas...
Praenomen asked 30/9, 2016 at 18:35

2

Solved

When trying to use @AutoValue with nested classes: public class Nested { @AutoValue public static abstract class Example { public static Example create(String name, int integer) { return new A...
Synge asked 26/3, 2014 at 18:21

4

I started to use AutoValue today in one of my projects and what bothers me is that Android Studio can not resolve the generated class name (AutoValue_DrawableContent) and marks it with the red colo...
Flush asked 8/4, 2016 at 8:40

2

Solved

I am investigating auto-value and its extensions, namely auto-value-parcel and auto-value-parcel-adapter within my Android application. I have these model classes:- @AutoValue public abstract cla...
Madox asked 19/1, 2018 at 15:58

4

Solved

Gradle dependencies: compile 'com.google.dagger:dagger:2.9' annotationProcessor 'com.google.dagger:dagger-compiler:2.9' kapt 'com.google.dagger:dagger-compiler:2.9' provided "com.google.auto.valu...
Forman asked 18/5, 2017 at 11:10

1

Solved

I'm having the following setup: ProjectA build.gralde: dependencies { compile (project(':ProjectB')) } ProjectB build.gradle: dependencies { annotationProcessor 'com.ryanharter.auto.value:au...
Manella asked 5/5, 2017 at 21:20

0

I have a the following Event DTO class: @AutoValue @JsonDeserialize(builder = AutoValue_Event.Builder.class) @JsonIgnoreProperties(ignoreUnknown = true) public abstract class Event { public stat...
Ambagious asked 12/4, 2017 at 8:29

1

Solved

I'm playing auto-value with builder recently. And I'm in such a situation, say I have to transform an existing object to a new one with a few properties get updated. The example code is here: @Aut...
Priory asked 14/3, 2017 at 8:38

2

I've got AutoValue (and the android-apt plugin) working in a project, and I'm aware of Ryan Harter's gson extension for AutoValue, but how do I hook Retrofit 2 up to use the extension and factory m...
Nonlinearity asked 10/4, 2016 at 11:40

2

Solved

I want to use auto-value with firebase 9.2.0+. I have the following code: @AutoValue public abstract class Office { public static Builder builder() { return new AutoValue_Office.Builder(); } ...

2

Solved

I am using retrofit version 2.1.0 to deserialize JSON into pojos. A field in the pojo can be received under different names in the json. To deserialize the field correctly, I used the @serializedNa...
Turgor asked 6/8, 2016 at 23:13

1

I have just started using AutoValue but I am unable to make it work with proguard. I have around 6000+ warnings that look like this Warning:autovalue.shaded.com.google.common.auto.common.MoreEle...
October asked 5/4, 2016 at 14:12

2

Solved

I have a Java AutoValue class with a List attribute. I'd like to allow the builder to append to the List rather than having to pass the entire constructed list. Example: import com.google.auto.va...
Ja asked 11/12, 2015 at 22:52

1

Solved

I am getting "cannot find symbol class Generated" while using the @AutoValue annotation. public abstract class Office{ public static Office create(String cityName, String companyName, String regi...
Servomechanical asked 17/12, 2014 at 15:53
1

© 2022 - 2024 — McMap. All rights reserved.