package net.ranides.demo.debugger;

import com.sun.jdi.Locatable;
import com.sun.jdi.Location;
import com.sun.jdi.request.BreakpointRequest;
import net.ranides.demo.debugger.impl.CDiLocation;

public interface DiLocation {

    static DiLocation of(Locatable element) {
        return new CDiLocation(element);
    }

    static DiLocation of(Location location) {
        return new CDiLocation(location);
    }

    String name();

    int line();

    BreakpointRequest breakpoint();

    boolean corresponds(Locatable other);

    boolean corresponds(Location other);

    boolean corresponds(DiLocation other);
}
