(ifc: spec.InterfaceType, method: spec.Method)
| 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, |
no test coverage detected