-
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
53cde44
commit 099a38a
Showing
14 changed files
with
81 additions
and
101 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
luceedebug/src/main/java/luceedebug/strong/CanonicalServerAbsPath.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package luceedebug.strong; | ||
|
||
public final class CanonicalServerAbsPath extends StrongT<String> { | ||
public CanonicalServerAbsPath(String v) { | ||
super(v); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
luceedebug/src/main/java/luceedebug/strong/DapBreakpointID.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package luceedebug.strong; | ||
|
||
public final class DapBreakpointID extends StrongT<Integer> { | ||
public DapBreakpointID(Integer v) { | ||
super(v); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
luceedebug/src/main/java/luceedebug/strong/JdwpThreadID.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package luceedebug.strong; | ||
|
||
public final class JdwpThreadID extends StrongT<Long> { | ||
public JdwpThreadID(Long v) { | ||
super(v); | ||
} | ||
|
||
public static JdwpThreadID of(com.sun.jdi.ThreadReference v) { | ||
return new JdwpThreadID(v.uniqueID()); | ||
} | ||
} |
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,7 @@ | ||
package luceedebug.strong; | ||
|
||
public final class RawIdePath extends StrongT<String> { | ||
public RawIdePath(String v) { | ||
super(v); | ||
} | ||
} |
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,27 @@ | ||
package luceedebug.strong; | ||
|
||
/** | ||
* Typical use case here is derived classes are final and | ||
* are simple "strong" wrappers around the underlying type `T`. | ||
*/ | ||
public abstract class StrongT<T> { | ||
private final T v; | ||
|
||
StrongT(T v) { | ||
this.v = v; | ||
} | ||
|
||
public T get() { | ||
return v; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return v.hashCode(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
return (other instanceof StrongT<?>) && v.equals(((StrongT<?>)other).v); | ||
} | ||
} |