MCPcopy Create free account
hub / github.com/github/copilot-sdk / wrapperResultTypeExpression

Function wrapperResultTypeExpression

java/scripts/codegen/java.ts:1618–1625  ·  view source on GitHub ↗
(resultType: string)

Source from the content-addressed store, hash-verified

1616}
1617
1618function wrapperResultTypeExpression(resultType: string): string {
1619 const listMatch = resultType.match(/^List<([^<>]+)>$/);
1620 if (listMatch) {
1621 return `RpcMapper.INSTANCE.getTypeFactory().constructCollectionType(List.class, ${javaClassLiteral(listMatch[1])})`;
1622 }
1623
1624 return javaClassLiteral(resultType);
1625}
1626
1627function javaClassLiteral(javaType: string): string {
1628 return javaType === "Void" ? "Void.class" : `${javaType}.class`;

Callers 1

generateApiMethodFunction · 0.85

Calls 1

javaClassLiteralFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…