prettier-plugin-java 2.8.1 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -102
- package/dist/index.cjs +2215 -0
- package/dist/index.d.cts +1630 -0
- package/dist/index.d.mts +1633 -0
- package/dist/index.mjs +2215 -0
- package/dist/tree-sitter-java_orchard.wasm +0 -0
- package/package.json +62 -24
- package/dist/comments.d.ts +0 -17
- package/dist/comments.js +0 -229
- package/dist/index.d.ts +0 -563
- package/dist/index.js +0 -29
- package/dist/options.d.ts +0 -43
- package/dist/options.js +0 -284
- package/dist/parser.d.ts +0 -9
- package/dist/parser.js +0 -24
- package/dist/printer.d.ts +0 -18
- package/dist/printer.js +0 -40
- package/dist/printers/arrays.d.ts +0 -9
- package/dist/printers/arrays.js +0 -9
- package/dist/printers/blocks-and-statements.d.ts +0 -117
- package/dist/printers/blocks-and-statements.js +0 -340
- package/dist/printers/classes.d.ts +0 -157
- package/dist/printers/classes.js +0 -485
- package/dist/printers/expressions.d.ts +0 -134
- package/dist/printers/expressions.js +0 -627
- package/dist/printers/helpers.d.ts +0 -73
- package/dist/printers/helpers.js +0 -273
- package/dist/printers/index.d.ts +0 -2
- package/dist/printers/index.js +0 -13
- package/dist/printers/interfaces.d.ts +0 -62
- package/dist/printers/interfaces.js +0 -175
- package/dist/printers/lexical-structure.d.ts +0 -14
- package/dist/printers/lexical-structure.js +0 -29
- package/dist/printers/names.d.ts +0 -12
- package/dist/printers/names.js +0 -11
- package/dist/printers/packages-and-modules.d.ts +0 -46
- package/dist/printers/packages-and-modules.js +0 -169
- package/dist/printers/types-values-and-variables.d.ts +0 -46
- package/dist/printers/types-values-and-variables.js +0 -90
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import { builders } from "prettier/doc";
|
|
2
|
-
import { call, definedKeys, hasLeadingComments, indentInParentheses, isBinaryExpression, isEmptyStatement, lineEndWithComments, lineStartWithComments, map, onlyDefinedKey, printBlock, printDanglingComments, printSingle, printWithModifiers } from "./helpers.js";
|
|
3
|
-
const { group, hardline, ifBreak, indent, join, line, softline } = builders;
|
|
4
|
-
export default {
|
|
5
|
-
block(path, print) {
|
|
6
|
-
const statements = path.node.children.blockStatements
|
|
7
|
-
? call(path, print, "blockStatements")
|
|
8
|
-
: [];
|
|
9
|
-
return printBlock(path, statements.length ? [statements] : []);
|
|
10
|
-
},
|
|
11
|
-
blockStatements(path, print) {
|
|
12
|
-
return join(hardline, map(path, statementPath => {
|
|
13
|
-
const { node, previous } = statementPath;
|
|
14
|
-
const statement = print(statementPath);
|
|
15
|
-
return previous &&
|
|
16
|
-
lineStartWithComments(node) > lineEndWithComments(previous) + 1
|
|
17
|
-
? [hardline, statement]
|
|
18
|
-
: statement;
|
|
19
|
-
}, "blockStatement").filter(doc => doc !== ""));
|
|
20
|
-
},
|
|
21
|
-
blockStatement: printSingle,
|
|
22
|
-
localVariableDeclarationStatement(path, print) {
|
|
23
|
-
return [call(path, print, "localVariableDeclaration"), ";"];
|
|
24
|
-
},
|
|
25
|
-
localVariableDeclaration(path, print) {
|
|
26
|
-
const declaration = join(" ", [
|
|
27
|
-
call(path, print, "localVariableType"),
|
|
28
|
-
call(path, print, "variableDeclaratorList")
|
|
29
|
-
]);
|
|
30
|
-
return printWithModifiers(path, print, "variableModifier", declaration);
|
|
31
|
-
},
|
|
32
|
-
localVariableType: printSingle,
|
|
33
|
-
statement: printSingle,
|
|
34
|
-
statementWithoutTrailingSubstatement: printSingle,
|
|
35
|
-
emptyStatement() {
|
|
36
|
-
return "";
|
|
37
|
-
},
|
|
38
|
-
labeledStatement(path, print) {
|
|
39
|
-
return [
|
|
40
|
-
call(path, print, "Identifier"),
|
|
41
|
-
": ",
|
|
42
|
-
call(path, print, "statement")
|
|
43
|
-
];
|
|
44
|
-
},
|
|
45
|
-
expressionStatement(path, print) {
|
|
46
|
-
return [call(path, print, "statementExpression"), ";"];
|
|
47
|
-
},
|
|
48
|
-
statementExpression: printSingle,
|
|
49
|
-
ifStatement(path, print) {
|
|
50
|
-
var _a;
|
|
51
|
-
const { children } = path.node;
|
|
52
|
-
const hasEmptyStatement = isEmptyStatement(children.statement[0]);
|
|
53
|
-
const statements = map(path, print, "statement");
|
|
54
|
-
const statement = [
|
|
55
|
-
"if ",
|
|
56
|
-
indentInParentheses(call(path, print, "expression")),
|
|
57
|
-
hasEmptyStatement ? ";" : [" ", statements[0]]
|
|
58
|
-
];
|
|
59
|
-
if (children.Else) {
|
|
60
|
-
const danglingComments = printDanglingComments(path);
|
|
61
|
-
if (danglingComments.length) {
|
|
62
|
-
statement.push(hardline, ...danglingComments, hardline);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
const elseHasBlock = ((_a = children.statement[0].children
|
|
66
|
-
.statementWithoutTrailingSubstatement) === null || _a === void 0 ? void 0 : _a[0].children.block) !==
|
|
67
|
-
undefined;
|
|
68
|
-
statement.push(elseHasBlock ? " " : hardline);
|
|
69
|
-
}
|
|
70
|
-
const elseHasEmptyStatement = isEmptyStatement(children.statement[1]);
|
|
71
|
-
statement.push("else", elseHasEmptyStatement ? ";" : [" ", statements[1]]);
|
|
72
|
-
}
|
|
73
|
-
return statement;
|
|
74
|
-
},
|
|
75
|
-
assertStatement(path, print) {
|
|
76
|
-
return ["assert ", ...join([" : "], map(path, print, "expression")), ";"];
|
|
77
|
-
},
|
|
78
|
-
switchStatement(path, print) {
|
|
79
|
-
return join(" ", [
|
|
80
|
-
"switch",
|
|
81
|
-
indentInParentheses(call(path, print, "expression")),
|
|
82
|
-
call(path, print, "switchBlock")
|
|
83
|
-
]);
|
|
84
|
-
},
|
|
85
|
-
switchBlock(path, print) {
|
|
86
|
-
const { children } = path.node;
|
|
87
|
-
const caseKeys = definedKeys(children, [
|
|
88
|
-
"switchBlockStatementGroup",
|
|
89
|
-
"switchRule"
|
|
90
|
-
]);
|
|
91
|
-
const cases = caseKeys.length === 1 ? map(path, print, caseKeys[0]) : [];
|
|
92
|
-
return printBlock(path, cases);
|
|
93
|
-
},
|
|
94
|
-
switchBlockStatementGroup(path, print) {
|
|
95
|
-
var _a, _b;
|
|
96
|
-
const { children } = path.node;
|
|
97
|
-
const switchLabel = call(path, print, "switchLabel");
|
|
98
|
-
if (!children.blockStatements) {
|
|
99
|
-
return [switchLabel, ":"];
|
|
100
|
-
}
|
|
101
|
-
const blockStatements = call(path, print, "blockStatements");
|
|
102
|
-
const statements = children.blockStatements[0].children.blockStatement;
|
|
103
|
-
const onlyStatementIsBlock = statements.length === 1 &&
|
|
104
|
-
((_b = (_a = statements[0].children.statement) === null || _a === void 0 ? void 0 : _a[0].children.statementWithoutTrailingSubstatement) === null || _b === void 0 ? void 0 : _b[0].children.block) !== undefined;
|
|
105
|
-
return [
|
|
106
|
-
switchLabel,
|
|
107
|
-
":",
|
|
108
|
-
onlyStatementIsBlock
|
|
109
|
-
? [" ", blockStatements]
|
|
110
|
-
: indent([hardline, blockStatements])
|
|
111
|
-
];
|
|
112
|
-
},
|
|
113
|
-
switchLabel(path, print) {
|
|
114
|
-
var _a, _b;
|
|
115
|
-
const { children } = path.node;
|
|
116
|
-
if (!((_b = (_a = children.caseConstant) !== null && _a !== void 0 ? _a : children.casePattern) !== null && _b !== void 0 ? _b : children.Null)) {
|
|
117
|
-
return "default";
|
|
118
|
-
}
|
|
119
|
-
const values = [];
|
|
120
|
-
if (children.Null) {
|
|
121
|
-
values.push("null");
|
|
122
|
-
if (children.Default) {
|
|
123
|
-
values.push("default");
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
const valuesKey = onlyDefinedKey(children, [
|
|
128
|
-
"caseConstant",
|
|
129
|
-
"casePattern"
|
|
130
|
-
]);
|
|
131
|
-
values.push(...map(path, print, valuesKey));
|
|
132
|
-
}
|
|
133
|
-
const hasMultipleValues = values.length > 1;
|
|
134
|
-
const label = hasMultipleValues
|
|
135
|
-
? ["case", indent([line, ...join([",", line], values)])]
|
|
136
|
-
: ["case ", values[0]];
|
|
137
|
-
return children.guard
|
|
138
|
-
? [
|
|
139
|
-
group([...label, hasMultipleValues ? line : " "]),
|
|
140
|
-
call(path, print, "guard")
|
|
141
|
-
]
|
|
142
|
-
: group(label);
|
|
143
|
-
},
|
|
144
|
-
switchRule(path, print) {
|
|
145
|
-
const { children } = path.node;
|
|
146
|
-
const bodyKey = onlyDefinedKey(children, [
|
|
147
|
-
"block",
|
|
148
|
-
"expression",
|
|
149
|
-
"throwStatement"
|
|
150
|
-
]);
|
|
151
|
-
const body = call(path, print, bodyKey);
|
|
152
|
-
const parts = [call(path, print, "switchLabel"), " ->"];
|
|
153
|
-
if (bodyKey !== "block" && hasLeadingComments(children[bodyKey][0])) {
|
|
154
|
-
parts.push(indent([hardline, body]));
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
parts.push(" ", body);
|
|
158
|
-
}
|
|
159
|
-
if (children.Semicolon) {
|
|
160
|
-
parts.push(";");
|
|
161
|
-
}
|
|
162
|
-
return parts;
|
|
163
|
-
},
|
|
164
|
-
caseConstant: printSingle,
|
|
165
|
-
casePattern: printSingle,
|
|
166
|
-
whileStatement(path, print) {
|
|
167
|
-
const statement = call(path, print, "statement");
|
|
168
|
-
const hasEmptyStatement = isEmptyStatement(path.node.children.statement[0]);
|
|
169
|
-
return [
|
|
170
|
-
"while ",
|
|
171
|
-
indentInParentheses(call(path, print, "expression")),
|
|
172
|
-
...[hasEmptyStatement ? ";" : " ", statement]
|
|
173
|
-
];
|
|
174
|
-
},
|
|
175
|
-
doStatement(path, print) {
|
|
176
|
-
const hasEmptyStatement = isEmptyStatement(path.node.children.statement[0]);
|
|
177
|
-
return [
|
|
178
|
-
"do",
|
|
179
|
-
hasEmptyStatement ? ";" : [" ", call(path, print, "statement")],
|
|
180
|
-
" while ",
|
|
181
|
-
indentInParentheses(call(path, print, "expression")),
|
|
182
|
-
";"
|
|
183
|
-
];
|
|
184
|
-
},
|
|
185
|
-
forStatement: printSingle,
|
|
186
|
-
basicForStatement(path, print) {
|
|
187
|
-
const { children } = path.node;
|
|
188
|
-
const danglingComments = printDanglingComments(path);
|
|
189
|
-
if (danglingComments.length) {
|
|
190
|
-
danglingComments.push(hardline);
|
|
191
|
-
}
|
|
192
|
-
const expressions = ["forInit", "expression", "forUpdate"].map(expressionKey => expressionKey in children ? call(path, print, expressionKey) : "");
|
|
193
|
-
const hasEmptyStatement = isEmptyStatement(children.statement[0]);
|
|
194
|
-
return [
|
|
195
|
-
...danglingComments,
|
|
196
|
-
"for ",
|
|
197
|
-
expressions.some(expression => expression !== "")
|
|
198
|
-
? indentInParentheses(join([";", line], expressions))
|
|
199
|
-
: "(;;)",
|
|
200
|
-
hasEmptyStatement ? ";" : [" ", call(path, print, "statement")]
|
|
201
|
-
];
|
|
202
|
-
},
|
|
203
|
-
forInit: printSingle,
|
|
204
|
-
forUpdate: printSingle,
|
|
205
|
-
statementExpressionList(path, print) {
|
|
206
|
-
return group(map(path, print, "statementExpression").map((expression, index) => index === 0 ? expression : [",", indent([line, expression])]));
|
|
207
|
-
},
|
|
208
|
-
enhancedForStatement(path, print) {
|
|
209
|
-
var _a;
|
|
210
|
-
const statementNode = path.node.children.statement[0];
|
|
211
|
-
const forStatement = [
|
|
212
|
-
printDanglingComments(path),
|
|
213
|
-
"for ",
|
|
214
|
-
"(",
|
|
215
|
-
call(path, print, "localVariableDeclaration"),
|
|
216
|
-
" : ",
|
|
217
|
-
call(path, print, "expression"),
|
|
218
|
-
")"
|
|
219
|
-
];
|
|
220
|
-
if (isEmptyStatement(statementNode)) {
|
|
221
|
-
forStatement.push(";");
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
const hasStatementBlock = ((_a = statementNode.children.statementWithoutTrailingSubstatement) === null || _a === void 0 ? void 0 : _a[0].children.block) !== undefined;
|
|
225
|
-
const statement = call(path, print, "statement");
|
|
226
|
-
forStatement.push(hasStatementBlock ? [" ", statement] : indent([line, statement]));
|
|
227
|
-
}
|
|
228
|
-
return group(forStatement);
|
|
229
|
-
},
|
|
230
|
-
breakStatement(path, print) {
|
|
231
|
-
return path.node.children.Identifier
|
|
232
|
-
? ["break ", call(path, print, "Identifier"), ";"]
|
|
233
|
-
: "break;";
|
|
234
|
-
},
|
|
235
|
-
continueStatement(path, print) {
|
|
236
|
-
return path.node.children.Identifier
|
|
237
|
-
? ["continue ", call(path, print, "Identifier"), ";"]
|
|
238
|
-
: "continue;";
|
|
239
|
-
},
|
|
240
|
-
returnStatement(path, print) {
|
|
241
|
-
const { children } = path.node;
|
|
242
|
-
const statement = ["return"];
|
|
243
|
-
if (children.expression) {
|
|
244
|
-
statement.push(" ");
|
|
245
|
-
const expression = call(path, print, "expression");
|
|
246
|
-
if (isBinaryExpression(children.expression[0])) {
|
|
247
|
-
statement.push(group([
|
|
248
|
-
ifBreak("("),
|
|
249
|
-
indent([softline, expression]),
|
|
250
|
-
softline,
|
|
251
|
-
ifBreak(")")
|
|
252
|
-
]));
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
statement.push(expression);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
statement.push(";");
|
|
259
|
-
return statement;
|
|
260
|
-
},
|
|
261
|
-
throwStatement(path, print) {
|
|
262
|
-
return ["throw ", call(path, print, "expression"), ";"];
|
|
263
|
-
},
|
|
264
|
-
synchronizedStatement(path, print) {
|
|
265
|
-
return [
|
|
266
|
-
"synchronized ",
|
|
267
|
-
indentInParentheses(call(path, print, "expression")),
|
|
268
|
-
" ",
|
|
269
|
-
call(path, print, "block")
|
|
270
|
-
];
|
|
271
|
-
},
|
|
272
|
-
tryStatement(path, print) {
|
|
273
|
-
const { children } = path.node;
|
|
274
|
-
if (children.tryWithResourcesStatement) {
|
|
275
|
-
return call(path, print, "tryWithResourcesStatement");
|
|
276
|
-
}
|
|
277
|
-
const blocks = ["try", call(path, print, "block")];
|
|
278
|
-
if (children.catches) {
|
|
279
|
-
blocks.push(call(path, print, "catches"));
|
|
280
|
-
}
|
|
281
|
-
if (children.finally) {
|
|
282
|
-
blocks.push(call(path, print, "finally"));
|
|
283
|
-
}
|
|
284
|
-
return join(" ", blocks);
|
|
285
|
-
},
|
|
286
|
-
catches(path, print) {
|
|
287
|
-
return join(" ", map(path, print, "catchClause"));
|
|
288
|
-
},
|
|
289
|
-
catchClause(path, print) {
|
|
290
|
-
return [
|
|
291
|
-
"catch ",
|
|
292
|
-
indentInParentheses(call(path, print, "catchFormalParameter")),
|
|
293
|
-
" ",
|
|
294
|
-
call(path, print, "block")
|
|
295
|
-
];
|
|
296
|
-
},
|
|
297
|
-
catchFormalParameter(path, print) {
|
|
298
|
-
return join(" ", [
|
|
299
|
-
...map(path, print, "variableModifier"),
|
|
300
|
-
call(path, print, "catchType"),
|
|
301
|
-
call(path, print, "variableDeclaratorId")
|
|
302
|
-
]);
|
|
303
|
-
},
|
|
304
|
-
catchType(path, print) {
|
|
305
|
-
return join([line, "| "], [call(path, print, "unannClassType"), ...map(path, print, "classType")]);
|
|
306
|
-
},
|
|
307
|
-
finally(path, print) {
|
|
308
|
-
return ["finally ", call(path, print, "block")];
|
|
309
|
-
},
|
|
310
|
-
tryWithResourcesStatement(path, print) {
|
|
311
|
-
const { children } = path.node;
|
|
312
|
-
const blocks = [
|
|
313
|
-
"try",
|
|
314
|
-
call(path, print, "resourceSpecification"),
|
|
315
|
-
call(path, print, "block")
|
|
316
|
-
];
|
|
317
|
-
if (children.catches) {
|
|
318
|
-
blocks.push(call(path, print, "catches"));
|
|
319
|
-
}
|
|
320
|
-
if (children.finally) {
|
|
321
|
-
blocks.push(call(path, print, "finally"));
|
|
322
|
-
}
|
|
323
|
-
return join(" ", blocks);
|
|
324
|
-
},
|
|
325
|
-
resourceSpecification(path, print) {
|
|
326
|
-
const resources = [call(path, print, "resourceList")];
|
|
327
|
-
if (path.node.children.Semicolon) {
|
|
328
|
-
resources.push(ifBreak(";"));
|
|
329
|
-
}
|
|
330
|
-
return indentInParentheses(resources);
|
|
331
|
-
},
|
|
332
|
-
resourceList(path, print) {
|
|
333
|
-
return join([";", line], map(path, print, "resource"));
|
|
334
|
-
},
|
|
335
|
-
resource: printSingle,
|
|
336
|
-
yieldStatement(path, print) {
|
|
337
|
-
return ["yield ", call(path, print, "expression"), ";"];
|
|
338
|
-
},
|
|
339
|
-
variableAccess: printSingle
|
|
340
|
-
};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import type { ClassBodyCstNode, EnumBodyDeclarationsCstNode } from "java-parser";
|
|
2
|
-
import type { AstPath } from "prettier";
|
|
3
|
-
import { builders } from "prettier/doc";
|
|
4
|
-
import { printClassPermits, printClassType, printSingle, type JavaPrintFn } from "./helpers.js";
|
|
5
|
-
declare const _default: {
|
|
6
|
-
classDeclaration(path: AstPath<import("java-parser").ClassDeclarationCstNode & {
|
|
7
|
-
comments?: import("../comments.js").JavaComment[];
|
|
8
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
9
|
-
normalClassDeclaration(path: AstPath<import("java-parser").NormalClassDeclarationCstNode & {
|
|
10
|
-
comments?: import("../comments.js").JavaComment[];
|
|
11
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
12
|
-
classModifier: typeof printSingle;
|
|
13
|
-
typeParameters(path: AstPath<import("java-parser").TypeParametersCstNode & {
|
|
14
|
-
comments?: import("../comments.js").JavaComment[];
|
|
15
|
-
}>, print: JavaPrintFn): (string | builders.Indent | builders.Softline)[];
|
|
16
|
-
typeParameterList(path: AstPath<import("java-parser").TypeParameterListCstNode & {
|
|
17
|
-
comments?: import("../comments.js").JavaComment[];
|
|
18
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
19
|
-
classExtends(path: AstPath<import("java-parser").ClassExtendsCstNode & {
|
|
20
|
-
comments?: import("../comments.js").JavaComment[];
|
|
21
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
22
|
-
classImplements(path: AstPath<import("java-parser").ClassImplementsCstNode & {
|
|
23
|
-
comments?: import("../comments.js").JavaComment[];
|
|
24
|
-
}>, print: JavaPrintFn): builders.Group;
|
|
25
|
-
classPermits: typeof printClassPermits;
|
|
26
|
-
interfaceTypeList(path: AstPath<import("java-parser").InterfaceTypeListCstNode & {
|
|
27
|
-
comments?: import("../comments.js").JavaComment[];
|
|
28
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
29
|
-
classBody(path: AstPath<ClassBodyCstNode & {
|
|
30
|
-
comments?: import("../comments.js").JavaComment[];
|
|
31
|
-
}>, print: JavaPrintFn): builders.Group | (string | builders.Indent | builders.Hardline)[] | "{}";
|
|
32
|
-
classBodyDeclaration: typeof printSingle;
|
|
33
|
-
classMemberDeclaration(path: AstPath<import("java-parser").ClassMemberDeclarationCstNode & {
|
|
34
|
-
comments?: import("../comments.js").JavaComment[];
|
|
35
|
-
}>, print: JavaPrintFn): builders.Doc;
|
|
36
|
-
fieldDeclaration(path: AstPath<import("java-parser").FieldDeclarationCstNode & {
|
|
37
|
-
comments?: import("../comments.js").JavaComment[];
|
|
38
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
39
|
-
fieldModifier: typeof printSingle;
|
|
40
|
-
variableDeclaratorList(path: AstPath<import("java-parser").VariableDeclaratorListCstNode & {
|
|
41
|
-
comments?: import("../comments.js").JavaComment[];
|
|
42
|
-
}>, print: JavaPrintFn): builders.Group | builders.Doc[];
|
|
43
|
-
variableDeclarator(path: AstPath<import("java-parser").VariableDeclaratorCstNode & {
|
|
44
|
-
comments?: import("../comments.js").JavaComment[];
|
|
45
|
-
}>, print: JavaPrintFn): builders.Doc;
|
|
46
|
-
variableDeclaratorId(path: AstPath<import("java-parser").VariableDeclaratorIdCstNode & {
|
|
47
|
-
comments?: import("../comments.js").JavaComment[];
|
|
48
|
-
}>, print: JavaPrintFn): builders.Doc;
|
|
49
|
-
variableInitializer: typeof printSingle;
|
|
50
|
-
unannType: typeof printSingle;
|
|
51
|
-
unannPrimitiveTypeWithOptionalDimsSuffix(path: AstPath<import("java-parser").UnannPrimitiveTypeWithOptionalDimsSuffixCstNode & {
|
|
52
|
-
comments?: import("../comments.js").JavaComment[];
|
|
53
|
-
}>, print: JavaPrintFn): builders.Doc;
|
|
54
|
-
unannPrimitiveType: typeof printSingle;
|
|
55
|
-
unannReferenceType(path: AstPath<import("java-parser").UnannReferenceTypeCstNode & {
|
|
56
|
-
comments?: import("../comments.js").JavaComment[];
|
|
57
|
-
}>, print: JavaPrintFn): builders.Doc;
|
|
58
|
-
unannClassOrInterfaceType: typeof printSingle;
|
|
59
|
-
unannClassType: typeof printClassType;
|
|
60
|
-
unannInterfaceType: typeof printSingle;
|
|
61
|
-
unannTypeVariable: typeof printSingle;
|
|
62
|
-
methodDeclaration(path: AstPath<import("java-parser").MethodDeclarationCstNode & {
|
|
63
|
-
comments?: import("../comments.js").JavaComment[];
|
|
64
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
65
|
-
methodModifier: typeof printSingle;
|
|
66
|
-
methodHeader(path: AstPath<import("java-parser").MethodHeaderCstNode & {
|
|
67
|
-
comments?: import("../comments.js").JavaComment[];
|
|
68
|
-
}>, print: JavaPrintFn): builders.Group;
|
|
69
|
-
result: typeof printSingle;
|
|
70
|
-
methodDeclarator(path: AstPath<import("java-parser").MethodDeclaratorCstNode & {
|
|
71
|
-
comments?: import("../comments.js").JavaComment[];
|
|
72
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
73
|
-
receiverParameter(path: AstPath<import("java-parser").ReceiverParameterCstNode & {
|
|
74
|
-
comments?: import("../comments.js").JavaComment[];
|
|
75
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
76
|
-
formalParameterList(path: AstPath<import("java-parser").FormalParameterListCstNode & {
|
|
77
|
-
comments?: import("../comments.js").JavaComment[];
|
|
78
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
79
|
-
formalParameter: typeof printSingle;
|
|
80
|
-
variableParaRegularParameter(path: AstPath<import("java-parser").VariableParaRegularParameterCstNode & {
|
|
81
|
-
comments?: import("../comments.js").JavaComment[];
|
|
82
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
83
|
-
variableArityParameter(path: AstPath<import("java-parser").VariableArityParameterCstNode & {
|
|
84
|
-
comments?: import("../comments.js").JavaComment[];
|
|
85
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
86
|
-
variableModifier: typeof printSingle;
|
|
87
|
-
throws(path: AstPath<import("java-parser").ThrowsCstNode & {
|
|
88
|
-
comments?: import("../comments.js").JavaComment[];
|
|
89
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
90
|
-
exceptionTypeList(path: AstPath<import("java-parser").ExceptionTypeListCstNode & {
|
|
91
|
-
comments?: import("../comments.js").JavaComment[];
|
|
92
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
93
|
-
exceptionType: typeof printSingle;
|
|
94
|
-
methodBody: typeof printSingle;
|
|
95
|
-
instanceInitializer: typeof printSingle;
|
|
96
|
-
staticInitializer(path: AstPath<import("java-parser").StaticInitializerCstNode & {
|
|
97
|
-
comments?: import("../comments.js").JavaComment[];
|
|
98
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
99
|
-
constructorDeclaration(path: AstPath<import("java-parser").ConstructorDeclarationCstNode & {
|
|
100
|
-
comments?: import("../comments.js").JavaComment[];
|
|
101
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
102
|
-
constructorModifier: typeof printSingle;
|
|
103
|
-
constructorDeclarator(path: AstPath<import("java-parser").ConstructorDeclaratorCstNode & {
|
|
104
|
-
comments?: import("../comments.js").JavaComment[];
|
|
105
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
106
|
-
simpleTypeName: typeof printSingle;
|
|
107
|
-
constructorBody(path: AstPath<import("java-parser").ConstructorBodyCstNode & {
|
|
108
|
-
comments?: import("../comments.js").JavaComment[];
|
|
109
|
-
}>, print: JavaPrintFn): builders.Group | (string | builders.Indent | builders.Hardline)[] | "{}";
|
|
110
|
-
explicitConstructorInvocation: typeof printSingle;
|
|
111
|
-
unqualifiedExplicitConstructorInvocation(path: AstPath<import("java-parser").UnqualifiedExplicitConstructorInvocationCstNode & {
|
|
112
|
-
comments?: import("../comments.js").JavaComment[];
|
|
113
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
114
|
-
qualifiedExplicitConstructorInvocation(path: AstPath<import("java-parser").QualifiedExplicitConstructorInvocationCstNode & {
|
|
115
|
-
comments?: import("../comments.js").JavaComment[];
|
|
116
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
117
|
-
enumDeclaration(path: AstPath<import("java-parser").EnumDeclarationCstNode & {
|
|
118
|
-
comments?: import("../comments.js").JavaComment[];
|
|
119
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
120
|
-
enumBody(path: AstPath<import("java-parser").EnumBodyCstNode & {
|
|
121
|
-
comments?: import("../comments.js").JavaComment[];
|
|
122
|
-
}>, print: JavaPrintFn, options: import("./helpers.js").JavaParserOptions): builders.Group | (string | builders.Indent | builders.Hardline)[] | "{}";
|
|
123
|
-
enumConstantList(path: AstPath<import("java-parser").EnumConstantListCstNode & {
|
|
124
|
-
comments?: import("../comments.js").JavaComment[];
|
|
125
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
126
|
-
enumConstant(path: AstPath<import("java-parser").EnumConstantCstNode & {
|
|
127
|
-
comments?: import("../comments.js").JavaComment[];
|
|
128
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
129
|
-
enumConstantModifier: typeof printSingle;
|
|
130
|
-
enumBodyDeclarations(path: AstPath<EnumBodyDeclarationsCstNode & {
|
|
131
|
-
comments?: import("../comments.js").JavaComment[];
|
|
132
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
133
|
-
recordDeclaration(path: AstPath<import("java-parser").RecordDeclarationCstNode & {
|
|
134
|
-
comments?: import("../comments.js").JavaComment[];
|
|
135
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
136
|
-
recordHeader(path: AstPath<import("java-parser").RecordHeaderCstNode & {
|
|
137
|
-
comments?: import("../comments.js").JavaComment[];
|
|
138
|
-
}>, print: JavaPrintFn): builders.Group | (string | builders.Indent | builders.Softline)[] | "()";
|
|
139
|
-
recordComponentList(path: AstPath<import("java-parser").RecordComponentListCstNode & {
|
|
140
|
-
comments?: import("../comments.js").JavaComment[];
|
|
141
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
142
|
-
recordComponent(path: AstPath<import("java-parser").RecordComponentCstNode & {
|
|
143
|
-
comments?: import("../comments.js").JavaComment[];
|
|
144
|
-
}>, print: JavaPrintFn): builders.Group;
|
|
145
|
-
variableArityRecordComponent(path: AstPath<import("java-parser").VariableArityRecordComponentCstNode & {
|
|
146
|
-
comments?: import("../comments.js").JavaComment[];
|
|
147
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
148
|
-
recordComponentModifier: typeof printSingle;
|
|
149
|
-
recordBody(path: AstPath<import("java-parser").RecordBodyCstNode & {
|
|
150
|
-
comments?: import("../comments.js").JavaComment[];
|
|
151
|
-
}>, print: JavaPrintFn): builders.Group | (string | builders.Indent | builders.Hardline)[] | "{}";
|
|
152
|
-
recordBodyDeclaration: typeof printSingle;
|
|
153
|
-
compactConstructorDeclaration(path: AstPath<import("java-parser").CompactConstructorDeclarationCstNode & {
|
|
154
|
-
comments?: import("../comments.js").JavaComment[];
|
|
155
|
-
}>, print: JavaPrintFn): builders.Doc[];
|
|
156
|
-
};
|
|
157
|
-
export default _default;
|