All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.tools.opensource.classpath.AutoValue_SymbolNotResolvable Maven / Gradle / Ivy



package com.google.cloud.tools.opensource.classpath;

import java.nio.file.Path;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SymbolNotResolvable extends SymbolNotResolvable {

  private final T reference;

  private final Path targetClassLocation;

  private final SymbolNotResolvable.Reason reason;

  private final boolean reachable;

  private AutoValue_SymbolNotResolvable(
      T reference,
      @Nullable Path targetClassLocation,
      SymbolNotResolvable.Reason reason,
      boolean reachable) {
    this.reference = reference;
    this.targetClassLocation = targetClassLocation;
    this.reason = reason;
    this.reachable = reachable;
  }

  @Override
  T getReference() {
    return reference;
  }

  @Nullable
  @Override
  Path getTargetClassLocation() {
    return targetClassLocation;
  }

  @Override
  SymbolNotResolvable.Reason getReason() {
    return reason;
  }

  @Override
  boolean isReachable() {
    return reachable;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SymbolNotResolvable) {
      SymbolNotResolvable that = (SymbolNotResolvable) o;
      return (this.reference.equals(that.getReference()))
           && ((this.targetClassLocation == null) ? (that.getTargetClassLocation() == null) : this.targetClassLocation.equals(that.getTargetClassLocation()))
           && (this.reason.equals(that.getReason()))
           && (this.reachable == that.isReachable());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= reference.hashCode();
    h$ *= 1000003;
    h$ ^= (targetClassLocation == null) ? 0 : targetClassLocation.hashCode();
    h$ *= 1000003;
    h$ ^= reason.hashCode();
    h$ *= 1000003;
    h$ ^= reachable ? 1231 : 1237;
    return h$;
  }

  static final class Builder extends SymbolNotResolvable.Builder {
    private T reference;
    private Path targetClassLocation;
    private SymbolNotResolvable.Reason reason;
    private Boolean reachable;
    Builder() {
    }
    @Override
    SymbolNotResolvable.Builder setReference(T reference) {
      if (reference == null) {
        throw new NullPointerException("Null reference");
      }
      this.reference = reference;
      return this;
    }
    @Override
    SymbolNotResolvable.Builder setTargetClassLocation(Path targetClassLocation) {
      this.targetClassLocation = targetClassLocation;
      return this;
    }
    @Override
    SymbolNotResolvable.Builder setReason(SymbolNotResolvable.Reason reason) {
      if (reason == null) {
        throw new NullPointerException("Null reason");
      }
      this.reason = reason;
      return this;
    }
    @Override
    SymbolNotResolvable.Builder setReachable(boolean reachable) {
      this.reachable = reachable;
      return this;
    }
    @Override
    SymbolNotResolvable build() {
      String missing = "";
      if (this.reference == null) {
        missing += " reference";
      }
      if (this.reason == null) {
        missing += " reason";
      }
      if (this.reachable == null) {
        missing += " reachable";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_SymbolNotResolvable(
          this.reference,
          this.targetClassLocation,
          this.reason,
          this.reachable);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy