-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daa819d
commit aef7585
Showing
5 changed files
with
48 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package luceedebug; | ||
|
||
public class StrongInt { | ||
public final Integer v; | ||
private StrongInt(Integer v) { | ||
this.v = v; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return v.hashCode(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
return (other instanceof StrongInt) && v.equals(((StrongInt)other).v); | ||
} | ||
|
||
public static class DapBreakpointID extends StrongInt { | ||
public DapBreakpointID(Integer v) { | ||
super(v); | ||
} | ||
} | ||
} |
11 changes: 6 additions & 5 deletions
11
luceedebug/src/main/java/luceedebug/coreinject/Breakpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
package luceedebug.coreinject; | ||
|
||
import luceedebug.*; | ||
import luceedebug.StrongInt.DapBreakpointID; | ||
|
||
class Breakpoint implements IBreakpoint { | ||
final int line; | ||
final int ID; | ||
final DapBreakpointID ID; | ||
final boolean isBound; | ||
|
||
private Breakpoint(int line, int ID, boolean isBound) { | ||
private Breakpoint(int line, DapBreakpointID ID, boolean isBound) { | ||
this.line = line; | ||
this.ID = ID; | ||
this.isBound = isBound; | ||
} | ||
|
||
public static Breakpoint Bound(int line, int ID) { | ||
public static Breakpoint Bound(int line, DapBreakpointID ID) { | ||
return new Breakpoint(line, ID, true); | ||
} | ||
|
||
public static Breakpoint Unbound(int line, int ID) { | ||
public static Breakpoint Unbound(int line, DapBreakpointID ID) { | ||
return new Breakpoint(line, ID, false); | ||
} | ||
|
||
public int getLine() { return line; } | ||
public int getID() { return ID; } | ||
public int getID() { return ID.v; } | ||
public boolean getIsBound() { return isBound; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters