You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following classes:
` @immutable
public abstract class InetSocketConfig {
public abstract int getPort();
public abstract int getReceiveBufferSize();
public abstract int getSendBufferSize();
public abstract int getConnectionTime();
public abstract int getLatency();
public abstract int getBandwith();
public abstract boolean isOOBInLine();
public abstract boolean isReuseAddress();
public abstract int getSoTimeout();
}`
`@AutoValue
@CopyAnnotations @immutable
public abstract class ClientInetSocketConfig extends InetSocketConfig {
public abstract String getName();
public static Builder builder() {
return new AutoValue_ClientInetSocketConfig.Builder();
}
@NotThreadSafe
@AutoValue.Builder
@CopyAnnotations
public static abstract class Builder {
public abstract Builder setName(String newName);
public abstract ClientInetSocketConfig build();
}
}`
`@AutoValue
@CopyAnnotations @immutable
public abstract class ServerInetSocketConfig extends InetSocketConfig {
public abstract int getBacklog();
@Nullable
public abstract InetAddress getBindAddress();
public static Builder builder() {
return new AutoValue_ServerInetSocketConfig.Builder();
}
@AutoValue.Builder
@NotThreadSafe
@CopyAnnotations
public abstract static class Builder {
public abstract Builder setBacklog(int newBacklog);
public abstract Builder setBindAddress(InetAddress newBindAddress);
public abstract ServerInetSocketConfig build();
}
}`
The Builder were generated using generate Builder (except of course the Annotations I added), however they ignore the Methods defined in the common super class InetSocketConfig...
My workaround for now is to temporarily annotate InetSocketConfig with AutoValue generate myself a Builder from it and make the subclasses-Builder extend it. Afterwards I remove the AutoValue annotations again.
Some mechanic to cover this case would be nice.
Edit: I don't know what went wrong with the insert code...?!?
The text was updated successfully, but these errors were encountered:
I have the following classes:
`
@immutable
public abstract class InetSocketConfig {
public abstract int getPort();
}`
`@AutoValue
@CopyAnnotations
@immutable
public abstract class ClientInetSocketConfig extends InetSocketConfig {
}`
`@AutoValue
@CopyAnnotations
@immutable
public abstract class ServerInetSocketConfig extends InetSocketConfig {
public abstract int getBacklog();
}`
The Builder were generated using generate Builder (except of course the Annotations I added), however they ignore the Methods defined in the common super class
InetSocketConfig
...My workaround for now is to temporarily annotate
InetSocketConfig
with AutoValue generate myself a Builder from it and make the subclasses-Builder extend it. Afterwards I remove the AutoValue annotations again.Some mechanic to cover this case would be nice.
Edit: I don't know what went wrong with the insert code...?!?
The text was updated successfully, but these errors were encountered: