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

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



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

import javax.annotation.Generated;

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

  private final String sourceClassName;

  private final String targetClassName;

  private final String methodName;

  private final boolean interfaceMethod;

  private final String descriptor;

  private AutoValue_MethodSymbolReference(
      String sourceClassName,
      String targetClassName,
      String methodName,
      boolean interfaceMethod,
      String descriptor) {
    this.sourceClassName = sourceClassName;
    this.targetClassName = targetClassName;
    this.methodName = methodName;
    this.interfaceMethod = interfaceMethod;
    this.descriptor = descriptor;
  }

  @Override
  public String getSourceClassName() {
    return sourceClassName;
  }

  @Override
  public String getTargetClassName() {
    return targetClassName;
  }

  @Override
  String getMethodName() {
    return methodName;
  }

  @Override
  boolean isInterfaceMethod() {
    return interfaceMethod;
  }

  @Override
  String getDescriptor() {
    return descriptor;
  }

  @Override
  public String toString() {
    return "MethodSymbolReference{"
         + "sourceClassName=" + sourceClassName + ", "
         + "targetClassName=" + targetClassName + ", "
         + "methodName=" + methodName + ", "
         + "interfaceMethod=" + interfaceMethod + ", "
         + "descriptor=" + descriptor
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof MethodSymbolReference) {
      MethodSymbolReference that = (MethodSymbolReference) o;
      return (this.sourceClassName.equals(that.getSourceClassName()))
           && (this.targetClassName.equals(that.getTargetClassName()))
           && (this.methodName.equals(that.getMethodName()))
           && (this.interfaceMethod == that.isInterfaceMethod())
           && (this.descriptor.equals(that.getDescriptor()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= sourceClassName.hashCode();
    h$ *= 1000003;
    h$ ^= targetClassName.hashCode();
    h$ *= 1000003;
    h$ ^= methodName.hashCode();
    h$ *= 1000003;
    h$ ^= interfaceMethod ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= descriptor.hashCode();
    return h$;
  }

  static final class Builder extends MethodSymbolReference.Builder {
    private String sourceClassName;
    private String targetClassName;
    private String methodName;
    private Boolean interfaceMethod;
    private String descriptor;
    Builder() {
    }
    @Override
    MethodSymbolReference.Builder setSourceClassName(String sourceClassName) {
      if (sourceClassName == null) {
        throw new NullPointerException("Null sourceClassName");
      }
      this.sourceClassName = sourceClassName;
      return this;
    }
    @Override
    MethodSymbolReference.Builder setTargetClassName(String targetClassName) {
      if (targetClassName == null) {
        throw new NullPointerException("Null targetClassName");
      }
      this.targetClassName = targetClassName;
      return this;
    }
    @Override
    MethodSymbolReference.Builder setMethodName(String methodName) {
      if (methodName == null) {
        throw new NullPointerException("Null methodName");
      }
      this.methodName = methodName;
      return this;
    }
    @Override
    MethodSymbolReference.Builder setInterfaceMethod(boolean interfaceMethod) {
      this.interfaceMethod = interfaceMethod;
      return this;
    }
    @Override
    MethodSymbolReference.Builder setDescriptor(String descriptor) {
      if (descriptor == null) {
        throw new NullPointerException("Null descriptor");
      }
      this.descriptor = descriptor;
      return this;
    }
    @Override
    MethodSymbolReference build() {
      String missing = "";
      if (this.sourceClassName == null) {
        missing += " sourceClassName";
      }
      if (this.targetClassName == null) {
        missing += " targetClassName";
      }
      if (this.methodName == null) {
        missing += " methodName";
      }
      if (this.interfaceMethod == null) {
        missing += " interfaceMethod";
      }
      if (this.descriptor == null) {
        missing += " descriptor";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_MethodSymbolReference(
          this.sourceClassName,
          this.targetClassName,
          this.methodName,
          this.interfaceMethod,
          this.descriptor);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy