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

com.github.opennano.reflectionassert.diffs.NullDiff Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.github.opennano.reflectionassert.diffs;

import com.github.opennano.reflectionassert.exceptions.ReflectionAssertionInternalException;
import com.github.opennano.reflectionassert.report.DiffView;
import com.github.opennano.reflectionassert.report.DiffVisitor;

public class NullDiff extends Diff {

  public static NullDiff NULL_TOKEN = newInstance();

  private static NullDiff newInstance() {
    return new NullDiff();
  }

  private NullDiff() { // singleton
    super(null, null, null);
  }

  @Override
  public DiffType getType() {
    return null;
  }

  public void accept(DiffView view, DiffVisitor diffVisitor) {
    throw new ReflectionAssertionInternalException("invalid attempt to visit a null token node");
  }

  public NullDiff cloneAndRepath(String originalRootPath, String newRootPath) {
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy