* Render a type reference to something human readable for use in JavaDocs
(x: spec.TypeReference)
| 3118 | * Render a type reference to something human readable for use in JavaDocs |
| 3119 | */ |
| 3120 | private renderTypeReference(x: spec.TypeReference): string { |
| 3121 | return visitTypeReference<string>(x, { |
| 3122 | primitive: (x) => |
| 3123 | `{@link ${this.toJavaPrimitive(x.primitive).typeSymbol}}`, |
| 3124 | named: (x) => `{@link ${this.toNativeFqn(x.fqn)}}`, |
| 3125 | collection: (x) => { |
| 3126 | switch (x.collection.kind) { |
| 3127 | case spec.CollectionKind.Array: |
| 3128 | return `List<${this.renderTypeReference(x.collection.elementtype)}>`; |
| 3129 | case spec.CollectionKind.Map: |
| 3130 | return `Map<String, ${this.renderTypeReference(x.collection.elementtype)}>`; |
| 3131 | } |
| 3132 | }, |
| 3133 | union: (x) => |
| 3134 | `either ${x.union.types.map((x) => this.renderTypeReference(x)).join(' or ')}`, |
| 3135 | intersection: (x) => |
| 3136 | `${x.intersection.types.map((x) => this.renderTypeReference(x)).join(' + ')}`, |
| 3137 | }); |
| 3138 | } |
| 3139 | |
| 3140 | private renderMethodCallArguments(method: spec.Callable) { |
| 3141 | if (!method.parameters || method.parameters.length === 0) { |
no test coverage detected