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

proguard.evaluation.value.object.NullObject Maven / Gradle / Ivy

Go to download

ProGuardCORE is a free library to read, analyze, modify, and write Java class files.

There is a newer version: 9.1.6
Show newest version
package proguard.evaluation.value.object;

import org.jetbrains.annotations.Nullable;

/** Tracks a simple null reference with no additional information. */
class NullObject implements AnalyzedObject {

  static NullObject INSTANCE = new NullObject();

  private NullObject() {}

  @Nullable
  @Override
  public Object getPreciseValue() {
    return null;
  }

  @Nullable
  @Override
  public String getType() {
    return null;
  }

  @Override
  public boolean isNull() {
    return true;
  }

  @Override
  public boolean isModeled() {
    return false;
  }

  @Override
  public boolean isPrecise() {
    return true;
  }

  @Override
  public int hashCode() {
    return System.identityHashCode(this);
  }

  @Override
  public boolean equals(Object obj) {
    return INSTANCE == obj;
  }

  @Override
  public String toString() {
    return "NullObject";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy