Skip to content

Commit 8719e8e

Browse files
committed
Added protected TypeRef(Type) constructor so that subclasses can specify
Type directly rather than via the other constructor.
1 parent b16cfd7 commit 8719e8e

File tree

1 file changed

+4
-0
lines changed
  • mcp-core/src/main/java/io/modelcontextprotocol/json

1 file changed

+4
-0
lines changed

mcp-core/src/main/java/io/modelcontextprotocol/json/TypeRef.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ protected TypeRef() {
3232
this.type = ((ParameterizedType) superClass).getActualTypeArguments()[0];
3333
}
3434

35+
protected TypeRef(Type type) {
36+
this.type = type;
37+
}
38+
3539
/**
3640
* Returns the captured type information.
3741
* @return the Type representing the actual type argument captured by this TypeRef

0 commit comments

Comments
 (0)