MCPcopy Index your code
hub / github.com/aws/jsii / onInterfaceMethod

Method onInterfaceMethod

packages/jsii-pacmak/lib/targets/java.ts:983–1008  ·  view source on GitHub ↗
(ifc: spec.InterfaceType, method: spec.Method)

Source from the content-addressed store, hash-verified

981 }
982
983 protected onInterfaceMethod(ifc: spec.InterfaceType, method: spec.Method) {
984 this.code.line();
985 const returnType = method.returns
986 ? forceSingleType(this.toDecoratedJavaTypes(method.returns))
987 : mkStatic('void');
988
989 const methodName = JavaGenerator.safeJavaMethodName(method.name);
990 this.addJavaDocs(
991 method,
992 {
993 api: 'member',
994 fqn: ifc.fqn,
995 memberName: methodName,
996 },
997 {
998 returnsUnion: method.returns?.type,
999 },
1000 );
1001 this.emitStabilityAnnotations(method);
1002
1003 const types = this.convertTypes(method.parameters);
1004
1005 this.code.line(
1006 `${typeVarDeclarations(types)}${displayStatic(returnType)} ${methodName}(${this.renderParameters(method.parameters, types, 'exact-types')});`,
1007 );
1008 }
1009
1010 protected onInterfaceMethodOverload(
1011 ifc: spec.InterfaceType,

Callers 1

Calls 11

toDecoratedJavaTypesMethod · 0.95
addJavaDocsMethod · 0.95
convertTypesMethod · 0.95
renderParametersMethod · 0.95
forceSingleTypeFunction · 0.85
mkStaticFunction · 0.85
typeVarDeclarationsFunction · 0.85
displayStaticFunction · 0.85
lineMethod · 0.80
safeJavaMethodNameMethod · 0.80

Tested by

no test coverage detected