@openrewrite/rewrite 0.18.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/CONTRIBUTING.md +22 -0
- package/LICENSE +201 -0
- package/README.md +13 -0
- package/dist/src/core/execution.d.ts +35 -0
- package/dist/src/core/execution.d.ts.map +1 -0
- package/dist/src/core/execution.js +65 -0
- package/dist/src/core/execution.js.map +1 -0
- package/dist/src/core/index.d.ts +6 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +22 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/markers.d.ts +56 -0
- package/dist/src/core/markers.d.ts.map +1 -0
- package/dist/src/core/markers.js +140 -0
- package/dist/src/core/markers.js.map +1 -0
- package/dist/src/core/parser.d.ts +34 -0
- package/dist/src/core/parser.d.ts.map +1 -0
- package/dist/src/core/parser.js +106 -0
- package/dist/src/core/parser.js.map +1 -0
- package/dist/src/core/tree.d.ts +195 -0
- package/dist/src/core/tree.d.ts.map +1 -0
- package/dist/src/core/tree.js +455 -0
- package/dist/src/core/tree.js.map +1 -0
- package/dist/src/core/utils.d.ts +12 -0
- package/dist/src/core/utils.d.ts.map +1 -0
- package/dist/src/core/utils.js +69 -0
- package/dist/src/core/utils.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/java/extensions.d.ts +7 -0
- package/dist/src/java/extensions.d.ts.map +1 -0
- package/dist/src/java/extensions.js +53 -0
- package/dist/src/java/extensions.js.map +1 -0
- package/dist/src/java/index.d.ts +4 -0
- package/dist/src/java/index.d.ts.map +1 -0
- package/dist/src/java/index.js +20 -0
- package/dist/src/java/index.js.map +1 -0
- package/dist/src/java/markers.d.ts +20 -0
- package/dist/src/java/markers.d.ts.map +1 -0
- package/dist/src/java/markers.js +54 -0
- package/dist/src/java/markers.js.map +1 -0
- package/dist/src/java/tree/extensions.d.ts +6 -0
- package/dist/src/java/tree/extensions.d.ts.map +1 -0
- package/dist/src/java/tree/extensions.js +36 -0
- package/dist/src/java/tree/extensions.js.map +1 -0
- package/dist/src/java/tree/index.d.ts +4 -0
- package/dist/src/java/tree/index.d.ts.map +1 -0
- package/dist/src/java/tree/index.js +20 -0
- package/dist/src/java/tree/index.js.map +1 -0
- package/dist/src/java/tree/support_types.d.ts +396 -0
- package/dist/src/java/tree/support_types.d.ts.map +1 -0
- package/dist/src/java/tree/support_types.js +450 -0
- package/dist/src/java/tree/support_types.js.map +1 -0
- package/dist/src/java/tree/tree.d.ts +3377 -0
- package/dist/src/java/tree/tree.d.ts.map +1 -0
- package/dist/src/java/tree/tree.js +4613 -0
- package/dist/src/java/tree/tree.js.map +1 -0
- package/dist/src/java/tree/types.d.ts +80 -0
- package/dist/src/java/tree/types.d.ts.map +1 -0
- package/dist/src/java/tree/types.js +138 -0
- package/dist/src/java/tree/types.js.map +1 -0
- package/dist/src/java/visitor.d.ts +82 -0
- package/dist/src/java/visitor.d.ts.map +1 -0
- package/dist/src/java/visitor.js +872 -0
- package/dist/src/java/visitor.js.map +1 -0
- package/dist/src/javascript/extensions.d.ts +12 -0
- package/dist/src/javascript/extensions.d.ts.map +1 -0
- package/dist/src/javascript/extensions.js +60 -0
- package/dist/src/javascript/extensions.js.map +1 -0
- package/dist/src/javascript/index.d.ts +6 -0
- package/dist/src/javascript/index.d.ts.map +1 -0
- package/dist/src/javascript/index.js +22 -0
- package/dist/src/javascript/index.js.map +1 -0
- package/dist/src/javascript/markers.d.ts +2 -0
- package/dist/src/javascript/markers.d.ts.map +1 -0
- package/dist/src/javascript/markers.js +3 -0
- package/dist/src/javascript/markers.js.map +1 -0
- package/dist/src/javascript/parser.d.ts +268 -0
- package/dist/src/javascript/parser.d.ts.map +1 -0
- package/dist/src/javascript/parser.js +1137 -0
- package/dist/src/javascript/parser.js.map +1 -0
- package/dist/src/javascript/parserUtils.d.ts +7 -0
- package/dist/src/javascript/parserUtils.d.ts.map +1 -0
- package/dist/src/javascript/parserUtils.js +165 -0
- package/dist/src/javascript/parserUtils.js.map +1 -0
- package/dist/src/javascript/projectParser.d.ts +25 -0
- package/dist/src/javascript/projectParser.d.ts.map +1 -0
- package/dist/src/javascript/projectParser.js +149 -0
- package/dist/src/javascript/projectParser.js.map +1 -0
- package/dist/src/javascript/projectParserMain.d.ts +3 -0
- package/dist/src/javascript/projectParserMain.d.ts.map +1 -0
- package/dist/src/javascript/projectParserMain.js +59 -0
- package/dist/src/javascript/projectParserMain.js.map +1 -0
- package/dist/src/javascript/tree/extensions.d.ts +4 -0
- package/dist/src/javascript/tree/extensions.d.ts.map +1 -0
- package/dist/src/javascript/tree/extensions.js +80 -0
- package/dist/src/javascript/tree/extensions.js.map +1 -0
- package/dist/src/javascript/tree/index.d.ts +3 -0
- package/dist/src/javascript/tree/index.d.ts.map +1 -0
- package/dist/src/javascript/tree/index.js +19 -0
- package/dist/src/javascript/tree/index.js.map +1 -0
- package/dist/src/javascript/tree/support_types.d.ts +184 -0
- package/dist/src/javascript/tree/support_types.d.ts.map +1 -0
- package/dist/src/javascript/tree/support_types.js +224 -0
- package/dist/src/javascript/tree/support_types.js.map +1 -0
- package/dist/src/javascript/tree/tree.d.ts +1173 -0
- package/dist/src/javascript/tree/tree.d.ts.map +1 -0
- package/dist/src/javascript/tree/tree.js +1590 -0
- package/dist/src/javascript/tree/tree.js.map +1 -0
- package/dist/src/javascript/typeMapping.d.ts +16 -0
- package/dist/src/javascript/typeMapping.d.ts.map +1 -0
- package/dist/src/javascript/typeMapping.js +120 -0
- package/dist/src/javascript/typeMapping.js.map +1 -0
- package/dist/src/javascript/visitor.d.ts +41 -0
- package/dist/src/javascript/visitor.d.ts.map +1 -0
- package/dist/src/javascript/visitor.js +360 -0
- package/dist/src/javascript/visitor.js.map +1 -0
- package/dist/src/json/extensions.d.ts +6 -0
- package/dist/src/json/extensions.d.ts.map +1 -0
- package/dist/src/json/extensions.js +11 -0
- package/dist/src/json/extensions.js.map +1 -0
- package/dist/src/json/index.d.ts +5 -0
- package/dist/src/json/index.d.ts.map +1 -0
- package/dist/src/json/index.js +21 -0
- package/dist/src/json/index.js.map +1 -0
- package/dist/src/json/markers.d.ts +2 -0
- package/dist/src/json/markers.d.ts.map +1 -0
- package/dist/src/json/markers.js +3 -0
- package/dist/src/json/markers.js.map +1 -0
- package/dist/src/json/support_types.d.ts +19 -0
- package/dist/src/json/support_types.d.ts.map +1 -0
- package/dist/src/json/support_types.js +47 -0
- package/dist/src/json/support_types.js.map +1 -0
- package/dist/src/json/tree.d.ts +187 -0
- package/dist/src/json/tree.d.ts.map +1 -0
- package/dist/src/json/tree.js +393 -0
- package/dist/src/json/tree.js.map +1 -0
- package/dist/src/json/visitor.d.ts +16 -0
- package/dist/src/json/visitor.d.ts.map +1 -0
- package/dist/src/json/visitor.js +83 -0
- package/dist/src/json/visitor.js.map +1 -0
- package/dist/src/yaml/index.d.ts +4 -0
- package/dist/src/yaml/index.d.ts.map +1 -0
- package/dist/src/yaml/index.js +20 -0
- package/dist/src/yaml/index.js.map +1 -0
- package/dist/src/yaml/markers.d.ts +2 -0
- package/dist/src/yaml/markers.d.ts.map +1 -0
- package/dist/src/yaml/markers.js +3 -0
- package/dist/src/yaml/markers.js.map +1 -0
- package/dist/src/yaml/tree/extensions.d.ts +2 -0
- package/dist/src/yaml/tree/extensions.d.ts.map +1 -0
- package/dist/src/yaml/tree/extensions.js +3 -0
- package/dist/src/yaml/tree/extensions.js.map +1 -0
- package/dist/src/yaml/tree/index.d.ts +3 -0
- package/dist/src/yaml/tree/index.d.ts.map +1 -0
- package/dist/src/yaml/tree/index.js +19 -0
- package/dist/src/yaml/tree/index.js.map +1 -0
- package/dist/src/yaml/tree/support_types.d.ts +37 -0
- package/dist/src/yaml/tree/support_types.d.ts.map +1 -0
- package/dist/src/yaml/tree/support_types.js +25 -0
- package/dist/src/yaml/tree/support_types.js.map +1 -0
- package/dist/src/yaml/tree/tree.d.ts +451 -0
- package/dist/src/yaml/tree/tree.d.ts.map +1 -0
- package/dist/src/yaml/tree/tree.js +551 -0
- package/dist/src/yaml/tree/tree.js.map +1 -0
- package/dist/src/yaml/visitor.d.ts +16 -0
- package/dist/src/yaml/visitor.d.ts.map +1 -0
- package/dist/src/yaml/visitor.js +64 -0
- package/dist/src/yaml/visitor.js.map +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,872 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.JavaVisitor = void 0;
|
|
27
|
+
const extensions = __importStar(require("./extensions"));
|
|
28
|
+
const core_1 = require("../core");
|
|
29
|
+
const tree_1 = require("./tree");
|
|
30
|
+
const tree_2 = require("./tree");
|
|
31
|
+
class JavaVisitor extends core_1.TreeVisitor {
|
|
32
|
+
isAcceptable(sourceFile, p) {
|
|
33
|
+
return (0, tree_1.isJava)(sourceFile);
|
|
34
|
+
}
|
|
35
|
+
visitExpression(expression, p) {
|
|
36
|
+
return expression;
|
|
37
|
+
}
|
|
38
|
+
visitStatement(statement, p) {
|
|
39
|
+
return statement;
|
|
40
|
+
}
|
|
41
|
+
visitAnnotatedType(annotatedType, p) {
|
|
42
|
+
annotatedType = annotatedType.withPrefix(this.visitSpace(annotatedType.prefix, 1, p));
|
|
43
|
+
let tempExpression = this.visitExpression(annotatedType, p);
|
|
44
|
+
if (!(tempExpression instanceof tree_2.AnnotatedType)) {
|
|
45
|
+
return tempExpression;
|
|
46
|
+
}
|
|
47
|
+
annotatedType = tempExpression;
|
|
48
|
+
annotatedType = annotatedType.withMarkers(this.visitMarkers(annotatedType.markers, p));
|
|
49
|
+
annotatedType = annotatedType.withAnnotations(core_1.ListUtils.map(annotatedType.annotations, el => this.visitAndCast(el, p)));
|
|
50
|
+
annotatedType = annotatedType.withTypeExpression(this.visitAndCast(annotatedType.typeExpression, p));
|
|
51
|
+
return annotatedType;
|
|
52
|
+
}
|
|
53
|
+
visitAnnotation(annotation, p) {
|
|
54
|
+
annotation = annotation.withPrefix(this.visitSpace(annotation.prefix, 5, p));
|
|
55
|
+
let tempExpression = this.visitExpression(annotation, p);
|
|
56
|
+
if (!(tempExpression instanceof tree_2.Annotation)) {
|
|
57
|
+
return tempExpression;
|
|
58
|
+
}
|
|
59
|
+
annotation = tempExpression;
|
|
60
|
+
annotation = annotation.withMarkers(this.visitMarkers(annotation.markers, p));
|
|
61
|
+
annotation = annotation.withAnnotationType(this.visitAndCast(annotation.annotationType, p));
|
|
62
|
+
annotation = annotation.padding.withArguments(this.visitContainer(annotation.padding.arguments, tree_1.JContainer.Location.ANNOTATION_ARGUMENTS, p));
|
|
63
|
+
return annotation;
|
|
64
|
+
}
|
|
65
|
+
visitArrayAccess(arrayAccess, p) {
|
|
66
|
+
arrayAccess = arrayAccess.withPrefix(this.visitSpace(arrayAccess.prefix, 6, p));
|
|
67
|
+
let tempExpression = this.visitExpression(arrayAccess, p);
|
|
68
|
+
if (!(tempExpression instanceof tree_2.ArrayAccess)) {
|
|
69
|
+
return tempExpression;
|
|
70
|
+
}
|
|
71
|
+
arrayAccess = tempExpression;
|
|
72
|
+
arrayAccess = arrayAccess.withMarkers(this.visitMarkers(arrayAccess.markers, p));
|
|
73
|
+
arrayAccess = arrayAccess.withIndexed(this.visitAndCast(arrayAccess.indexed, p));
|
|
74
|
+
arrayAccess = arrayAccess.withDimension(this.visitAndCast(arrayAccess.dimension, p));
|
|
75
|
+
return arrayAccess;
|
|
76
|
+
}
|
|
77
|
+
visitArrayType(arrayType, p) {
|
|
78
|
+
arrayType = arrayType.withPrefix(this.visitSpace(arrayType.prefix, 8, p));
|
|
79
|
+
let tempExpression = this.visitExpression(arrayType, p);
|
|
80
|
+
if (!(tempExpression instanceof tree_2.ArrayType)) {
|
|
81
|
+
return tempExpression;
|
|
82
|
+
}
|
|
83
|
+
arrayType = tempExpression;
|
|
84
|
+
arrayType = arrayType.withMarkers(this.visitMarkers(arrayType.markers, p));
|
|
85
|
+
arrayType = arrayType.withElementType(this.visitAndCast(arrayType.elementType, p));
|
|
86
|
+
arrayType = arrayType.withAnnotations(core_1.ListUtils.map(arrayType.annotations, el => this.visitAndCast(el, p)));
|
|
87
|
+
arrayType = arrayType.withDimension(arrayType.dimension == null ? null : arrayType.dimension.withBefore(this.visitSpace(arrayType.dimension.before, 35, p)).withElement(this.visitSpace(arrayType.dimension.element, 36, p)));
|
|
88
|
+
return arrayType;
|
|
89
|
+
}
|
|
90
|
+
visitAssert(assert, p) {
|
|
91
|
+
assert = assert.withPrefix(this.visitSpace(assert.prefix, 9, p));
|
|
92
|
+
let tempStatement = this.visitStatement(assert, p);
|
|
93
|
+
if (!(tempStatement instanceof tree_2.Assert)) {
|
|
94
|
+
return tempStatement;
|
|
95
|
+
}
|
|
96
|
+
assert = tempStatement;
|
|
97
|
+
assert = assert.withMarkers(this.visitMarkers(assert.markers, p));
|
|
98
|
+
assert = assert.withCondition(this.visitAndCast(assert.condition, p));
|
|
99
|
+
assert = assert.withDetail(this.visitLeftPadded(assert.detail, tree_1.JLeftPadded.Location.ASSERT_DETAIL, p));
|
|
100
|
+
return assert;
|
|
101
|
+
}
|
|
102
|
+
visitAssignment(assignment, p) {
|
|
103
|
+
assignment = assignment.withPrefix(this.visitSpace(assignment.prefix, 15, p));
|
|
104
|
+
let tempStatement = this.visitStatement(assignment, p);
|
|
105
|
+
if (!(tempStatement instanceof tree_2.Assignment)) {
|
|
106
|
+
return tempStatement;
|
|
107
|
+
}
|
|
108
|
+
assignment = tempStatement;
|
|
109
|
+
let tempExpression = this.visitExpression(assignment, p);
|
|
110
|
+
if (!(tempExpression instanceof tree_2.Assignment)) {
|
|
111
|
+
return tempExpression;
|
|
112
|
+
}
|
|
113
|
+
assignment = tempExpression;
|
|
114
|
+
assignment = assignment.withMarkers(this.visitMarkers(assignment.markers, p));
|
|
115
|
+
assignment = assignment.withVariable(this.visitAndCast(assignment.variable, p));
|
|
116
|
+
assignment = assignment.padding.withAssignment(this.visitLeftPadded(assignment.padding.assignment, tree_1.JLeftPadded.Location.ASSIGNMENT, p));
|
|
117
|
+
return assignment;
|
|
118
|
+
}
|
|
119
|
+
visitAssignmentOperation(assignmentOperation, p) {
|
|
120
|
+
assignmentOperation = assignmentOperation.withPrefix(this.visitSpace(assignmentOperation.prefix, 13, p));
|
|
121
|
+
let tempStatement = this.visitStatement(assignmentOperation, p);
|
|
122
|
+
if (!(tempStatement instanceof tree_2.AssignmentOperation)) {
|
|
123
|
+
return tempStatement;
|
|
124
|
+
}
|
|
125
|
+
assignmentOperation = tempStatement;
|
|
126
|
+
let tempExpression = this.visitExpression(assignmentOperation, p);
|
|
127
|
+
if (!(tempExpression instanceof tree_2.AssignmentOperation)) {
|
|
128
|
+
return tempExpression;
|
|
129
|
+
}
|
|
130
|
+
assignmentOperation = tempExpression;
|
|
131
|
+
assignmentOperation = assignmentOperation.withMarkers(this.visitMarkers(assignmentOperation.markers, p));
|
|
132
|
+
assignmentOperation = assignmentOperation.withVariable(this.visitAndCast(assignmentOperation.variable, p));
|
|
133
|
+
assignmentOperation = assignmentOperation.padding.withOperator(this.visitLeftPadded(assignmentOperation.padding.operator, tree_1.JLeftPadded.Location.ASSIGNMENT_OPERATION_OPERATOR, p));
|
|
134
|
+
assignmentOperation = assignmentOperation.withAssignment(this.visitAndCast(assignmentOperation.assignment, p));
|
|
135
|
+
return assignmentOperation;
|
|
136
|
+
}
|
|
137
|
+
visitBinary(binary, p) {
|
|
138
|
+
binary = binary.withPrefix(this.visitSpace(binary.prefix, 17, p));
|
|
139
|
+
let tempExpression = this.visitExpression(binary, p);
|
|
140
|
+
if (!(tempExpression instanceof tree_2.Binary)) {
|
|
141
|
+
return tempExpression;
|
|
142
|
+
}
|
|
143
|
+
binary = tempExpression;
|
|
144
|
+
binary = binary.withMarkers(this.visitMarkers(binary.markers, p));
|
|
145
|
+
binary = binary.withLeft(this.visitAndCast(binary.left, p));
|
|
146
|
+
binary = binary.padding.withOperator(this.visitLeftPadded(binary.padding.operator, tree_1.JLeftPadded.Location.BINARY_OPERATOR, p));
|
|
147
|
+
binary = binary.withRight(this.visitAndCast(binary.right, p));
|
|
148
|
+
return binary;
|
|
149
|
+
}
|
|
150
|
+
visitBlock(block, p) {
|
|
151
|
+
block = block.withPrefix(this.visitSpace(block.prefix, 19, p));
|
|
152
|
+
let tempStatement = this.visitStatement(block, p);
|
|
153
|
+
if (!(tempStatement instanceof tree_2.Block)) {
|
|
154
|
+
return tempStatement;
|
|
155
|
+
}
|
|
156
|
+
block = tempStatement;
|
|
157
|
+
block = block.withMarkers(this.visitMarkers(block.markers, p));
|
|
158
|
+
block = block.padding.withStatic(this.visitRightPadded(block.padding.static, tree_1.JRightPadded.Location.STATIC_INIT, p));
|
|
159
|
+
block = block.padding.withStatements(core_1.ListUtils.map(block.padding.statements, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.BLOCK_STATEMENT, p)));
|
|
160
|
+
block = block.withEnd(this.visitSpace(block.end, 18, p));
|
|
161
|
+
return block;
|
|
162
|
+
}
|
|
163
|
+
visitBreak(_break, p) {
|
|
164
|
+
_break = _break.withPrefix(this.visitSpace(_break.prefix, 21, p));
|
|
165
|
+
let tempStatement = this.visitStatement(_break, p);
|
|
166
|
+
if (!(tempStatement instanceof tree_2.Break)) {
|
|
167
|
+
return tempStatement;
|
|
168
|
+
}
|
|
169
|
+
_break = tempStatement;
|
|
170
|
+
_break = _break.withMarkers(this.visitMarkers(_break.markers, p));
|
|
171
|
+
_break = _break.withLabel(this.visitAndCast(_break.label, p));
|
|
172
|
+
return _break;
|
|
173
|
+
}
|
|
174
|
+
visitCase(_case, p) {
|
|
175
|
+
_case = _case.withPrefix(this.visitSpace(_case.prefix, 23, p));
|
|
176
|
+
let tempStatement = this.visitStatement(_case, p);
|
|
177
|
+
if (!(tempStatement instanceof tree_2.Case)) {
|
|
178
|
+
return tempStatement;
|
|
179
|
+
}
|
|
180
|
+
_case = tempStatement;
|
|
181
|
+
_case = _case.withMarkers(this.visitMarkers(_case.markers, p));
|
|
182
|
+
_case = _case.padding.withExpressions(this.visitContainer(_case.padding.expressions, tree_1.JContainer.Location.CASE_EXPRESSION, p));
|
|
183
|
+
_case = _case.padding.withStatements(this.visitContainer(_case.padding.statements, tree_1.JContainer.Location.CASE, p));
|
|
184
|
+
_case = _case.padding.withBody(this.visitRightPadded(_case.padding.body, tree_1.JRightPadded.Location.CASE_BODY, p));
|
|
185
|
+
return _case;
|
|
186
|
+
}
|
|
187
|
+
visitClassDeclaration(classDeclaration, p) {
|
|
188
|
+
classDeclaration = classDeclaration.withPrefix(this.visitSpace(classDeclaration.prefix, 29, p));
|
|
189
|
+
let tempStatement = this.visitStatement(classDeclaration, p);
|
|
190
|
+
if (!(tempStatement instanceof tree_2.ClassDeclaration)) {
|
|
191
|
+
return tempStatement;
|
|
192
|
+
}
|
|
193
|
+
classDeclaration = tempStatement;
|
|
194
|
+
classDeclaration = classDeclaration.withMarkers(this.visitMarkers(classDeclaration.markers, p));
|
|
195
|
+
classDeclaration = classDeclaration.withLeadingAnnotations(core_1.ListUtils.map(classDeclaration.leadingAnnotations, el => this.visitAndCast(el, p)));
|
|
196
|
+
classDeclaration = classDeclaration.withModifiers(core_1.ListUtils.map(classDeclaration.modifiers, el => this.visitAndCast(el, p)));
|
|
197
|
+
classDeclaration = classDeclaration.padding.withKind(this.visitAndCast(classDeclaration.padding.kind, p));
|
|
198
|
+
classDeclaration = classDeclaration.withName(this.visitAndCast(classDeclaration.name, p));
|
|
199
|
+
classDeclaration = classDeclaration.padding.withTypeParameters(this.visitContainer(classDeclaration.padding.typeParameters, tree_1.JContainer.Location.TYPE_PARAMETERS, p));
|
|
200
|
+
classDeclaration = classDeclaration.padding.withPrimaryConstructor(this.visitContainer(classDeclaration.padding.primaryConstructor, tree_1.JContainer.Location.RECORD_STATE_VECTOR, p));
|
|
201
|
+
classDeclaration = classDeclaration.padding.withExtends(this.visitLeftPadded(classDeclaration.padding.extends, tree_1.JLeftPadded.Location.EXTENDS, p));
|
|
202
|
+
classDeclaration = classDeclaration.padding.withImplements(this.visitContainer(classDeclaration.padding.implements, tree_1.JContainer.Location.IMPLEMENTS, p));
|
|
203
|
+
classDeclaration = classDeclaration.padding.withPermits(this.visitContainer(classDeclaration.padding.permits, tree_1.JContainer.Location.PERMITS, p));
|
|
204
|
+
classDeclaration = classDeclaration.withBody(this.visitAndCast(classDeclaration.body, p));
|
|
205
|
+
return classDeclaration;
|
|
206
|
+
}
|
|
207
|
+
visitClassDeclarationKind(kind, p) {
|
|
208
|
+
kind = kind.withPrefix(this.visitSpace(kind.prefix, 30, p));
|
|
209
|
+
kind = kind.withMarkers(this.visitMarkers(kind.markers, p));
|
|
210
|
+
kind = kind.withAnnotations(core_1.ListUtils.map(kind.annotations, el => this.visitAndCast(el, p)));
|
|
211
|
+
return kind;
|
|
212
|
+
}
|
|
213
|
+
visitCompilationUnit(compilationUnit, p) {
|
|
214
|
+
compilationUnit = compilationUnit.withPrefix(this.visitSpace(compilationUnit.prefix, 32, p));
|
|
215
|
+
compilationUnit = compilationUnit.withMarkers(this.visitMarkers(compilationUnit.markers, p));
|
|
216
|
+
compilationUnit = compilationUnit.padding.withPackageDeclaration(this.visitRightPadded(compilationUnit.padding.packageDeclaration, tree_1.JRightPadded.Location.PACKAGE, p));
|
|
217
|
+
compilationUnit = compilationUnit.padding.withImports(core_1.ListUtils.map(compilationUnit.padding.imports, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.IMPORT, p)));
|
|
218
|
+
compilationUnit = compilationUnit.withClasses(core_1.ListUtils.map(compilationUnit.classes, el => this.visitAndCast(el, p)));
|
|
219
|
+
compilationUnit = compilationUnit.withEof(this.visitSpace(compilationUnit.eof, 31, p));
|
|
220
|
+
return compilationUnit;
|
|
221
|
+
}
|
|
222
|
+
visitContinue(_continue, p) {
|
|
223
|
+
_continue = _continue.withPrefix(this.visitSpace(_continue.prefix, 33, p));
|
|
224
|
+
let tempStatement = this.visitStatement(_continue, p);
|
|
225
|
+
if (!(tempStatement instanceof tree_2.Continue)) {
|
|
226
|
+
return tempStatement;
|
|
227
|
+
}
|
|
228
|
+
_continue = tempStatement;
|
|
229
|
+
_continue = _continue.withMarkers(this.visitMarkers(_continue.markers, p));
|
|
230
|
+
_continue = _continue.withLabel(this.visitAndCast(_continue.label, p));
|
|
231
|
+
return _continue;
|
|
232
|
+
}
|
|
233
|
+
visitDoWhileLoop(doWhileLoop, p) {
|
|
234
|
+
doWhileLoop = doWhileLoop.withPrefix(this.visitSpace(doWhileLoop.prefix, 38, p));
|
|
235
|
+
let tempStatement = this.visitStatement(doWhileLoop, p);
|
|
236
|
+
if (!(tempStatement instanceof tree_2.DoWhileLoop)) {
|
|
237
|
+
return tempStatement;
|
|
238
|
+
}
|
|
239
|
+
doWhileLoop = tempStatement;
|
|
240
|
+
doWhileLoop = doWhileLoop.withMarkers(this.visitMarkers(doWhileLoop.markers, p));
|
|
241
|
+
doWhileLoop = doWhileLoop.padding.withBody(this.visitRightPadded(doWhileLoop.padding.body, tree_1.JRightPadded.Location.WHILE_BODY, p));
|
|
242
|
+
doWhileLoop = doWhileLoop.padding.withWhileCondition(this.visitLeftPadded(doWhileLoop.padding.whileCondition, tree_1.JLeftPadded.Location.WHILE_CONDITION, p));
|
|
243
|
+
return doWhileLoop;
|
|
244
|
+
}
|
|
245
|
+
visitEmpty(empty, p) {
|
|
246
|
+
empty = empty.withPrefix(this.visitSpace(empty.prefix, 40, p));
|
|
247
|
+
let tempStatement = this.visitStatement(empty, p);
|
|
248
|
+
if (!(tempStatement instanceof tree_2.Empty)) {
|
|
249
|
+
return tempStatement;
|
|
250
|
+
}
|
|
251
|
+
empty = tempStatement;
|
|
252
|
+
let tempExpression = this.visitExpression(empty, p);
|
|
253
|
+
if (!(tempExpression instanceof tree_2.Empty)) {
|
|
254
|
+
return tempExpression;
|
|
255
|
+
}
|
|
256
|
+
empty = tempExpression;
|
|
257
|
+
empty = empty.withMarkers(this.visitMarkers(empty.markers, p));
|
|
258
|
+
return empty;
|
|
259
|
+
}
|
|
260
|
+
visitEnumValue(enumValue, p) {
|
|
261
|
+
enumValue = enumValue.withPrefix(this.visitSpace(enumValue.prefix, 41, p));
|
|
262
|
+
enumValue = enumValue.withMarkers(this.visitMarkers(enumValue.markers, p));
|
|
263
|
+
enumValue = enumValue.withAnnotations(core_1.ListUtils.map(enumValue.annotations, el => this.visitAndCast(el, p)));
|
|
264
|
+
enumValue = enumValue.withName(this.visitAndCast(enumValue.name, p));
|
|
265
|
+
enumValue = enumValue.withInitializer(this.visitAndCast(enumValue.initializer, p));
|
|
266
|
+
return enumValue;
|
|
267
|
+
}
|
|
268
|
+
visitEnumValueSet(enumValueSet, p) {
|
|
269
|
+
enumValueSet = enumValueSet.withPrefix(this.visitSpace(enumValueSet.prefix, 42, p));
|
|
270
|
+
let tempStatement = this.visitStatement(enumValueSet, p);
|
|
271
|
+
if (!(tempStatement instanceof tree_2.EnumValueSet)) {
|
|
272
|
+
return tempStatement;
|
|
273
|
+
}
|
|
274
|
+
enumValueSet = tempStatement;
|
|
275
|
+
enumValueSet = enumValueSet.withMarkers(this.visitMarkers(enumValueSet.markers, p));
|
|
276
|
+
enumValueSet = enumValueSet.padding.withEnums(core_1.ListUtils.map(enumValueSet.padding.enums, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.ENUM_VALUE, p)));
|
|
277
|
+
return enumValueSet;
|
|
278
|
+
}
|
|
279
|
+
visitFieldAccess(fieldAccess, p) {
|
|
280
|
+
fieldAccess = fieldAccess.withPrefix(this.visitSpace(fieldAccess.prefix, 47, p));
|
|
281
|
+
let tempStatement = this.visitStatement(fieldAccess, p);
|
|
282
|
+
if (!(tempStatement instanceof tree_2.FieldAccess)) {
|
|
283
|
+
return tempStatement;
|
|
284
|
+
}
|
|
285
|
+
fieldAccess = tempStatement;
|
|
286
|
+
let tempExpression = this.visitExpression(fieldAccess, p);
|
|
287
|
+
if (!(tempExpression instanceof tree_2.FieldAccess)) {
|
|
288
|
+
return tempExpression;
|
|
289
|
+
}
|
|
290
|
+
fieldAccess = tempExpression;
|
|
291
|
+
fieldAccess = fieldAccess.withMarkers(this.visitMarkers(fieldAccess.markers, p));
|
|
292
|
+
fieldAccess = fieldAccess.withTarget(this.visitAndCast(fieldAccess.target, p));
|
|
293
|
+
fieldAccess = fieldAccess.padding.withName(this.visitLeftPadded(fieldAccess.padding.name, tree_1.JLeftPadded.Location.FIELD_ACCESS_NAME, p));
|
|
294
|
+
return fieldAccess;
|
|
295
|
+
}
|
|
296
|
+
visitForEachLoop(forEachLoop, p) {
|
|
297
|
+
forEachLoop = forEachLoop.withPrefix(this.visitSpace(forEachLoop.prefix, 54, p));
|
|
298
|
+
let tempStatement = this.visitStatement(forEachLoop, p);
|
|
299
|
+
if (!(tempStatement instanceof tree_2.ForEachLoop)) {
|
|
300
|
+
return tempStatement;
|
|
301
|
+
}
|
|
302
|
+
forEachLoop = tempStatement;
|
|
303
|
+
forEachLoop = forEachLoop.withMarkers(this.visitMarkers(forEachLoop.markers, p));
|
|
304
|
+
forEachLoop = forEachLoop.withControl(this.visitAndCast(forEachLoop.control, p));
|
|
305
|
+
forEachLoop = forEachLoop.padding.withBody(this.visitRightPadded(forEachLoop.padding.body, tree_1.JRightPadded.Location.FOR_BODY, p));
|
|
306
|
+
return forEachLoop;
|
|
307
|
+
}
|
|
308
|
+
visitForEachControl(control, p) {
|
|
309
|
+
control = control.withPrefix(this.visitSpace(control.prefix, 53, p));
|
|
310
|
+
control = control.withMarkers(this.visitMarkers(control.markers, p));
|
|
311
|
+
control = control.padding.withVariable(this.visitRightPadded(control.padding.variable, tree_1.JRightPadded.Location.FOREACH_VARIABLE, p));
|
|
312
|
+
control = control.padding.withIterable(this.visitRightPadded(control.padding.iterable, tree_1.JRightPadded.Location.FOREACH_ITERABLE, p));
|
|
313
|
+
return control;
|
|
314
|
+
}
|
|
315
|
+
visitForLoop(forLoop, p) {
|
|
316
|
+
forLoop = forLoop.withPrefix(this.visitSpace(forLoop.prefix, 56, p));
|
|
317
|
+
let tempStatement = this.visitStatement(forLoop, p);
|
|
318
|
+
if (!(tempStatement instanceof tree_2.ForLoop)) {
|
|
319
|
+
return tempStatement;
|
|
320
|
+
}
|
|
321
|
+
forLoop = tempStatement;
|
|
322
|
+
forLoop = forLoop.withMarkers(this.visitMarkers(forLoop.markers, p));
|
|
323
|
+
forLoop = forLoop.withControl(this.visitAndCast(forLoop.control, p));
|
|
324
|
+
forLoop = forLoop.padding.withBody(this.visitRightPadded(forLoop.padding.body, tree_1.JRightPadded.Location.FOR_BODY, p));
|
|
325
|
+
return forLoop;
|
|
326
|
+
}
|
|
327
|
+
visitForControl(control, p) {
|
|
328
|
+
control = control.withPrefix(this.visitSpace(control.prefix, 52, p));
|
|
329
|
+
control = control.withMarkers(this.visitMarkers(control.markers, p));
|
|
330
|
+
control = control.padding.withInit(core_1.ListUtils.map(control.padding.init, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.FOR_INIT, p)));
|
|
331
|
+
control = control.padding.withCondition(this.visitRightPadded(control.padding.condition, tree_1.JRightPadded.Location.FOR_CONDITION, p));
|
|
332
|
+
control = control.padding.withUpdate(core_1.ListUtils.map(control.padding.update, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.FOR_UPDATE, p)));
|
|
333
|
+
return control;
|
|
334
|
+
}
|
|
335
|
+
visitParenthesizedTypeTree(parenthesizedTypeTree, p) {
|
|
336
|
+
parenthesizedTypeTree = parenthesizedTypeTree.withPrefix(this.visitSpace(parenthesizedTypeTree.prefix, 107, p));
|
|
337
|
+
let tempExpression = this.visitExpression(parenthesizedTypeTree, p);
|
|
338
|
+
if (!(tempExpression instanceof tree_2.ParenthesizedTypeTree)) {
|
|
339
|
+
return tempExpression;
|
|
340
|
+
}
|
|
341
|
+
parenthesizedTypeTree = tempExpression;
|
|
342
|
+
parenthesizedTypeTree = parenthesizedTypeTree.withMarkers(this.visitMarkers(parenthesizedTypeTree.markers, p));
|
|
343
|
+
parenthesizedTypeTree = parenthesizedTypeTree.withAnnotations(core_1.ListUtils.map(parenthesizedTypeTree.annotations, el => this.visitAndCast(el, p)));
|
|
344
|
+
parenthesizedTypeTree = parenthesizedTypeTree.withParenthesizedType(this.visitAndCast(parenthesizedTypeTree.parenthesizedType, p));
|
|
345
|
+
return parenthesizedTypeTree;
|
|
346
|
+
}
|
|
347
|
+
visitIdentifier(identifier, p) {
|
|
348
|
+
identifier = identifier.withPrefix(this.visitSpace(identifier.prefix, 58, p));
|
|
349
|
+
let tempExpression = this.visitExpression(identifier, p);
|
|
350
|
+
if (!(tempExpression instanceof tree_2.Identifier)) {
|
|
351
|
+
return tempExpression;
|
|
352
|
+
}
|
|
353
|
+
identifier = tempExpression;
|
|
354
|
+
identifier = identifier.withMarkers(this.visitMarkers(identifier.markers, p));
|
|
355
|
+
identifier = identifier.withAnnotations(core_1.ListUtils.map(identifier.annotations, el => this.visitAndCast(el, p)));
|
|
356
|
+
return identifier;
|
|
357
|
+
}
|
|
358
|
+
visitIf(_if, p) {
|
|
359
|
+
_if = _if.withPrefix(this.visitSpace(_if.prefix, 60, p));
|
|
360
|
+
let tempStatement = this.visitStatement(_if, p);
|
|
361
|
+
if (!(tempStatement instanceof tree_2.If)) {
|
|
362
|
+
return tempStatement;
|
|
363
|
+
}
|
|
364
|
+
_if = tempStatement;
|
|
365
|
+
_if = _if.withMarkers(this.visitMarkers(_if.markers, p));
|
|
366
|
+
_if = _if.withIfCondition(this.visitAndCast(_if.ifCondition, p));
|
|
367
|
+
_if = _if.padding.withThenPart(this.visitRightPadded(_if.padding.thenPart, tree_1.JRightPadded.Location.IF_THEN, p));
|
|
368
|
+
_if = _if.withElsePart(this.visitAndCast(_if.elsePart, p));
|
|
369
|
+
return _if;
|
|
370
|
+
}
|
|
371
|
+
visitElse(_else, p) {
|
|
372
|
+
_else = _else.withPrefix(this.visitSpace(_else.prefix, 39, p));
|
|
373
|
+
_else = _else.withMarkers(this.visitMarkers(_else.markers, p));
|
|
374
|
+
_else = _else.padding.withBody(this.visitRightPadded(_else.padding.body, tree_1.JRightPadded.Location.IF_ELSE, p));
|
|
375
|
+
return _else;
|
|
376
|
+
}
|
|
377
|
+
visitImport(_import, p) {
|
|
378
|
+
_import = _import.withPrefix(this.visitSpace(_import.prefix, 66, p));
|
|
379
|
+
let tempStatement = this.visitStatement(_import, p);
|
|
380
|
+
if (!(tempStatement instanceof tree_2.Import)) {
|
|
381
|
+
return tempStatement;
|
|
382
|
+
}
|
|
383
|
+
_import = tempStatement;
|
|
384
|
+
_import = _import.withMarkers(this.visitMarkers(_import.markers, p));
|
|
385
|
+
_import = _import.padding.withStatic(this.visitLeftPadded(_import.padding.static, tree_1.JLeftPadded.Location.STATIC_IMPORT, p));
|
|
386
|
+
_import = _import.withQualid(this.visitAndCast(_import.qualid, p));
|
|
387
|
+
_import = _import.padding.withAlias(this.visitLeftPadded(_import.padding.alias, tree_1.JLeftPadded.Location.IMPORT_ALIAS_PREFIX, p));
|
|
388
|
+
return _import;
|
|
389
|
+
}
|
|
390
|
+
visitInstanceOf(instanceOf, p) {
|
|
391
|
+
instanceOf = instanceOf.withPrefix(this.visitSpace(instanceOf.prefix, 68, p));
|
|
392
|
+
let tempExpression = this.visitExpression(instanceOf, p);
|
|
393
|
+
if (!(tempExpression instanceof tree_2.InstanceOf)) {
|
|
394
|
+
return tempExpression;
|
|
395
|
+
}
|
|
396
|
+
instanceOf = tempExpression;
|
|
397
|
+
instanceOf = instanceOf.withMarkers(this.visitMarkers(instanceOf.markers, p));
|
|
398
|
+
instanceOf = instanceOf.padding.withExpression(this.visitRightPadded(instanceOf.padding.expression, tree_1.JRightPadded.Location.INSTANCEOF, p));
|
|
399
|
+
instanceOf = instanceOf.withClazz(this.visitAndCast(instanceOf.clazz, p));
|
|
400
|
+
instanceOf = instanceOf.withPattern(this.visitAndCast(instanceOf.pattern, p));
|
|
401
|
+
return instanceOf;
|
|
402
|
+
}
|
|
403
|
+
visitIntersectionType(intersectionType, p) {
|
|
404
|
+
intersectionType = intersectionType.withPrefix(this.visitSpace(intersectionType.prefix, 70, p));
|
|
405
|
+
let tempExpression = this.visitExpression(intersectionType, p);
|
|
406
|
+
if (!(tempExpression instanceof tree_2.IntersectionType)) {
|
|
407
|
+
return tempExpression;
|
|
408
|
+
}
|
|
409
|
+
intersectionType = tempExpression;
|
|
410
|
+
intersectionType = intersectionType.withMarkers(this.visitMarkers(intersectionType.markers, p));
|
|
411
|
+
intersectionType = intersectionType.padding.withBounds(this.visitContainer(intersectionType.padding.bounds, tree_1.JContainer.Location.TYPE_BOUNDS, p));
|
|
412
|
+
return intersectionType;
|
|
413
|
+
}
|
|
414
|
+
visitLabel(label, p) {
|
|
415
|
+
label = label.withPrefix(this.visitSpace(label.prefix, 71, p));
|
|
416
|
+
let tempStatement = this.visitStatement(label, p);
|
|
417
|
+
if (!(tempStatement instanceof tree_2.Label)) {
|
|
418
|
+
return tempStatement;
|
|
419
|
+
}
|
|
420
|
+
label = tempStatement;
|
|
421
|
+
label = label.withMarkers(this.visitMarkers(label.markers, p));
|
|
422
|
+
label = label.padding.withLabel(this.visitRightPadded(label.padding.label, tree_1.JRightPadded.Location.LABEL, p));
|
|
423
|
+
label = label.withStatement(this.visitAndCast(label.statement, p));
|
|
424
|
+
return label;
|
|
425
|
+
}
|
|
426
|
+
visitLambda(lambda, p) {
|
|
427
|
+
lambda = lambda.withPrefix(this.visitSpace(lambda.prefix, 76, p));
|
|
428
|
+
let tempStatement = this.visitStatement(lambda, p);
|
|
429
|
+
if (!(tempStatement instanceof tree_2.Lambda)) {
|
|
430
|
+
return tempStatement;
|
|
431
|
+
}
|
|
432
|
+
lambda = tempStatement;
|
|
433
|
+
let tempExpression = this.visitExpression(lambda, p);
|
|
434
|
+
if (!(tempExpression instanceof tree_2.Lambda)) {
|
|
435
|
+
return tempExpression;
|
|
436
|
+
}
|
|
437
|
+
lambda = tempExpression;
|
|
438
|
+
lambda = lambda.withMarkers(this.visitMarkers(lambda.markers, p));
|
|
439
|
+
lambda = lambda.withParameters(this.visitAndCast(lambda.parameters, p));
|
|
440
|
+
lambda = lambda.withArrow(this.visitSpace(lambda.arrow, 73, p));
|
|
441
|
+
lambda = lambda.withBody(this.visitAndCast(lambda.body, p));
|
|
442
|
+
return lambda;
|
|
443
|
+
}
|
|
444
|
+
visitLambdaParameters(parameters, p) {
|
|
445
|
+
parameters = parameters.withPrefix(this.visitSpace(parameters.prefix, 75, p));
|
|
446
|
+
parameters = parameters.withMarkers(this.visitMarkers(parameters.markers, p));
|
|
447
|
+
parameters = parameters.padding.withParameters(core_1.ListUtils.map(parameters.padding.parameters, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.LAMBDA_PARAM, p)));
|
|
448
|
+
return parameters;
|
|
449
|
+
}
|
|
450
|
+
visitLiteral(literal, p) {
|
|
451
|
+
literal = literal.withPrefix(this.visitSpace(literal.prefix, 78, p));
|
|
452
|
+
let tempExpression = this.visitExpression(literal, p);
|
|
453
|
+
if (!(tempExpression instanceof tree_2.Literal)) {
|
|
454
|
+
return tempExpression;
|
|
455
|
+
}
|
|
456
|
+
literal = tempExpression;
|
|
457
|
+
literal = literal.withMarkers(this.visitMarkers(literal.markers, p));
|
|
458
|
+
return literal;
|
|
459
|
+
}
|
|
460
|
+
visitMemberReference(memberReference, p) {
|
|
461
|
+
memberReference = memberReference.withPrefix(this.visitSpace(memberReference.prefix, 81, p));
|
|
462
|
+
let tempExpression = this.visitExpression(memberReference, p);
|
|
463
|
+
if (!(tempExpression instanceof tree_2.MemberReference)) {
|
|
464
|
+
return tempExpression;
|
|
465
|
+
}
|
|
466
|
+
memberReference = tempExpression;
|
|
467
|
+
memberReference = memberReference.withMarkers(this.visitMarkers(memberReference.markers, p));
|
|
468
|
+
memberReference = memberReference.padding.withContaining(this.visitRightPadded(memberReference.padding.containing, tree_1.JRightPadded.Location.MEMBER_REFERENCE_CONTAINING, p));
|
|
469
|
+
memberReference = memberReference.padding.withTypeParameters(this.visitContainer(memberReference.padding.typeParameters, tree_1.JContainer.Location.TYPE_PARAMETERS, p));
|
|
470
|
+
memberReference = memberReference.padding.withReference(this.visitLeftPadded(memberReference.padding.reference, tree_1.JLeftPadded.Location.MEMBER_REFERENCE_NAME, p));
|
|
471
|
+
return memberReference;
|
|
472
|
+
}
|
|
473
|
+
visitMethodDeclaration(methodDeclaration, p) {
|
|
474
|
+
methodDeclaration = methodDeclaration.withPrefix(this.visitSpace(methodDeclaration.prefix, 85, p));
|
|
475
|
+
let tempStatement = this.visitStatement(methodDeclaration, p);
|
|
476
|
+
if (!(tempStatement instanceof tree_2.MethodDeclaration)) {
|
|
477
|
+
return tempStatement;
|
|
478
|
+
}
|
|
479
|
+
methodDeclaration = tempStatement;
|
|
480
|
+
methodDeclaration = methodDeclaration.withMarkers(this.visitMarkers(methodDeclaration.markers, p));
|
|
481
|
+
methodDeclaration = methodDeclaration.withLeadingAnnotations(core_1.ListUtils.map(methodDeclaration.leadingAnnotations, el => this.visitAndCast(el, p)));
|
|
482
|
+
methodDeclaration = methodDeclaration.withModifiers(core_1.ListUtils.map(methodDeclaration.modifiers, el => this.visitAndCast(el, p)));
|
|
483
|
+
methodDeclaration = methodDeclaration.annotations.withTypeParameters(this.visitAndCast(methodDeclaration.annotations.typeParameters, p));
|
|
484
|
+
methodDeclaration = methodDeclaration.withReturnTypeExpression(this.visitAndCast(methodDeclaration.returnTypeExpression, p));
|
|
485
|
+
methodDeclaration = methodDeclaration.annotations.withName(methodDeclaration.annotations.name.withAnnotations(core_1.ListUtils.map(methodDeclaration.annotations.name.annotations, el => this.visitAndCast(el, p))).withIdentifier(this.visitAndCast(methodDeclaration.annotations.name.identifier, p)));
|
|
486
|
+
methodDeclaration = methodDeclaration.padding.withParameters(this.visitContainer(methodDeclaration.padding.parameters, tree_1.JContainer.Location.METHOD_DECLARATION_PARAMETERS, p));
|
|
487
|
+
methodDeclaration = methodDeclaration.padding.withThrows(this.visitContainer(methodDeclaration.padding.throws, tree_1.JContainer.Location.THROWS, p));
|
|
488
|
+
methodDeclaration = methodDeclaration.withBody(this.visitAndCast(methodDeclaration.body, p));
|
|
489
|
+
methodDeclaration = methodDeclaration.padding.withDefaultValue(this.visitLeftPadded(methodDeclaration.padding.defaultValue, tree_1.JLeftPadded.Location.METHOD_DECLARATION_DEFAULT_VALUE, p));
|
|
490
|
+
return methodDeclaration;
|
|
491
|
+
}
|
|
492
|
+
visitMethodInvocation(methodInvocation, p) {
|
|
493
|
+
methodInvocation = methodInvocation.withPrefix(this.visitSpace(methodInvocation.prefix, 89, p));
|
|
494
|
+
let tempStatement = this.visitStatement(methodInvocation, p);
|
|
495
|
+
if (!(tempStatement instanceof tree_2.MethodInvocation)) {
|
|
496
|
+
return tempStatement;
|
|
497
|
+
}
|
|
498
|
+
methodInvocation = tempStatement;
|
|
499
|
+
let tempExpression = this.visitExpression(methodInvocation, p);
|
|
500
|
+
if (!(tempExpression instanceof tree_2.MethodInvocation)) {
|
|
501
|
+
return tempExpression;
|
|
502
|
+
}
|
|
503
|
+
methodInvocation = tempExpression;
|
|
504
|
+
methodInvocation = methodInvocation.withMarkers(this.visitMarkers(methodInvocation.markers, p));
|
|
505
|
+
methodInvocation = methodInvocation.padding.withSelect(this.visitRightPadded(methodInvocation.padding.select, tree_1.JRightPadded.Location.METHOD_SELECT, p));
|
|
506
|
+
methodInvocation = methodInvocation.padding.withTypeParameters(this.visitContainer(methodInvocation.padding.typeParameters, tree_1.JContainer.Location.TYPE_PARAMETERS, p));
|
|
507
|
+
methodInvocation = methodInvocation.withName(this.visitAndCast(methodInvocation.name, p));
|
|
508
|
+
methodInvocation = methodInvocation.padding.withArguments(this.visitContainer(methodInvocation.padding.arguments, tree_1.JContainer.Location.METHOD_INVOCATION_ARGUMENTS, p));
|
|
509
|
+
return methodInvocation;
|
|
510
|
+
}
|
|
511
|
+
visitModifier(modifier, p) {
|
|
512
|
+
modifier = modifier.withPrefix(this.visitSpace(modifier.prefix, 91, p));
|
|
513
|
+
modifier = modifier.withMarkers(this.visitMarkers(modifier.markers, p));
|
|
514
|
+
modifier = modifier.withAnnotations(core_1.ListUtils.map(modifier.annotations, el => this.visitAndCast(el, p)));
|
|
515
|
+
return modifier;
|
|
516
|
+
}
|
|
517
|
+
visitMultiCatch(multiCatch, p) {
|
|
518
|
+
multiCatch = multiCatch.withPrefix(this.visitSpace(multiCatch.prefix, 92, p));
|
|
519
|
+
multiCatch = multiCatch.withMarkers(this.visitMarkers(multiCatch.markers, p));
|
|
520
|
+
multiCatch = multiCatch.padding.withAlternatives(core_1.ListUtils.map(multiCatch.padding.alternatives, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.CATCH_ALTERNATIVE, p)));
|
|
521
|
+
return multiCatch;
|
|
522
|
+
}
|
|
523
|
+
visitNewArray(newArray, p) {
|
|
524
|
+
newArray = newArray.withPrefix(this.visitSpace(newArray.prefix, 96, p));
|
|
525
|
+
let tempExpression = this.visitExpression(newArray, p);
|
|
526
|
+
if (!(tempExpression instanceof tree_2.NewArray)) {
|
|
527
|
+
return tempExpression;
|
|
528
|
+
}
|
|
529
|
+
newArray = tempExpression;
|
|
530
|
+
newArray = newArray.withMarkers(this.visitMarkers(newArray.markers, p));
|
|
531
|
+
newArray = newArray.withTypeExpression(this.visitAndCast(newArray.typeExpression, p));
|
|
532
|
+
newArray = newArray.withDimensions(core_1.ListUtils.map(newArray.dimensions, el => this.visitAndCast(el, p)));
|
|
533
|
+
newArray = newArray.padding.withInitializer(this.visitContainer(newArray.padding.initializer, tree_1.JContainer.Location.NEW_ARRAY_INITIALIZER, p));
|
|
534
|
+
return newArray;
|
|
535
|
+
}
|
|
536
|
+
visitArrayDimension(arrayDimension, p) {
|
|
537
|
+
arrayDimension = arrayDimension.withPrefix(this.visitSpace(arrayDimension.prefix, 35, p));
|
|
538
|
+
arrayDimension = arrayDimension.withMarkers(this.visitMarkers(arrayDimension.markers, p));
|
|
539
|
+
arrayDimension = arrayDimension.padding.withIndex(this.visitRightPadded(arrayDimension.padding.index, tree_1.JRightPadded.Location.ARRAY_INDEX, p));
|
|
540
|
+
return arrayDimension;
|
|
541
|
+
}
|
|
542
|
+
visitNewClass(newClass, p) {
|
|
543
|
+
newClass = newClass.withPrefix(this.visitSpace(newClass.prefix, 100, p));
|
|
544
|
+
let tempStatement = this.visitStatement(newClass, p);
|
|
545
|
+
if (!(tempStatement instanceof tree_2.NewClass)) {
|
|
546
|
+
return tempStatement;
|
|
547
|
+
}
|
|
548
|
+
newClass = tempStatement;
|
|
549
|
+
let tempExpression = this.visitExpression(newClass, p);
|
|
550
|
+
if (!(tempExpression instanceof tree_2.NewClass)) {
|
|
551
|
+
return tempExpression;
|
|
552
|
+
}
|
|
553
|
+
newClass = tempExpression;
|
|
554
|
+
newClass = newClass.withMarkers(this.visitMarkers(newClass.markers, p));
|
|
555
|
+
newClass = newClass.padding.withEnclosing(this.visitRightPadded(newClass.padding.enclosing, tree_1.JRightPadded.Location.NEW_CLASS_ENCLOSING, p));
|
|
556
|
+
newClass = newClass.withNew(this.visitSpace(newClass.new, 101, p));
|
|
557
|
+
newClass = newClass.withClazz(this.visitAndCast(newClass.clazz, p));
|
|
558
|
+
newClass = newClass.padding.withArguments(this.visitContainer(newClass.padding.arguments, tree_1.JContainer.Location.NEW_CLASS_ARGUMENTS, p));
|
|
559
|
+
newClass = newClass.withBody(this.visitAndCast(newClass.body, p));
|
|
560
|
+
return newClass;
|
|
561
|
+
}
|
|
562
|
+
visitNullableType(nullableType, p) {
|
|
563
|
+
nullableType = nullableType.withPrefix(this.visitSpace(nullableType.prefix, 102, p));
|
|
564
|
+
let tempExpression = this.visitExpression(nullableType, p);
|
|
565
|
+
if (!(tempExpression instanceof tree_2.NullableType)) {
|
|
566
|
+
return tempExpression;
|
|
567
|
+
}
|
|
568
|
+
nullableType = tempExpression;
|
|
569
|
+
nullableType = nullableType.withMarkers(this.visitMarkers(nullableType.markers, p));
|
|
570
|
+
nullableType = nullableType.withAnnotations(core_1.ListUtils.map(nullableType.annotations, el => this.visitAndCast(el, p)));
|
|
571
|
+
nullableType = nullableType.padding.withTypeTree(this.visitRightPadded(nullableType.padding.typeTree, tree_1.JRightPadded.Location.NULLABLE, p));
|
|
572
|
+
return nullableType;
|
|
573
|
+
}
|
|
574
|
+
visitPackage(_package, p) {
|
|
575
|
+
_package = _package.withPrefix(this.visitSpace(_package.prefix, 104, p));
|
|
576
|
+
let tempStatement = this.visitStatement(_package, p);
|
|
577
|
+
if (!(tempStatement instanceof tree_2.Package)) {
|
|
578
|
+
return tempStatement;
|
|
579
|
+
}
|
|
580
|
+
_package = tempStatement;
|
|
581
|
+
_package = _package.withMarkers(this.visitMarkers(_package.markers, p));
|
|
582
|
+
_package = _package.withExpression(this.visitAndCast(_package.expression, p));
|
|
583
|
+
_package = _package.withAnnotations(core_1.ListUtils.map(_package.annotations, el => this.visitAndCast(el, p)));
|
|
584
|
+
return _package;
|
|
585
|
+
}
|
|
586
|
+
visitParameterizedType(parameterizedType, p) {
|
|
587
|
+
parameterizedType = parameterizedType.withPrefix(this.visitSpace(parameterizedType.prefix, 106, p));
|
|
588
|
+
let tempExpression = this.visitExpression(parameterizedType, p);
|
|
589
|
+
if (!(tempExpression instanceof tree_2.ParameterizedType)) {
|
|
590
|
+
return tempExpression;
|
|
591
|
+
}
|
|
592
|
+
parameterizedType = tempExpression;
|
|
593
|
+
parameterizedType = parameterizedType.withMarkers(this.visitMarkers(parameterizedType.markers, p));
|
|
594
|
+
parameterizedType = parameterizedType.withClazz(this.visitAndCast(parameterizedType.clazz, p));
|
|
595
|
+
parameterizedType = parameterizedType.padding.withTypeParameters(this.visitContainer(parameterizedType.padding.typeParameters, tree_1.JContainer.Location.TYPE_PARAMETERS, p));
|
|
596
|
+
return parameterizedType;
|
|
597
|
+
}
|
|
598
|
+
visitParentheses(parentheses, p) {
|
|
599
|
+
parentheses = parentheses.withPrefix(this.visitSpace(parentheses.prefix, 107, p));
|
|
600
|
+
let tempExpression = this.visitExpression(parentheses, p);
|
|
601
|
+
if (!(tempExpression instanceof tree_2.Parentheses)) {
|
|
602
|
+
return tempExpression;
|
|
603
|
+
}
|
|
604
|
+
parentheses = tempExpression;
|
|
605
|
+
parentheses = parentheses.withMarkers(this.visitMarkers(parentheses.markers, p));
|
|
606
|
+
parentheses = parentheses.padding.withTree(this.visitRightPadded(parentheses.padding.tree, tree_1.JRightPadded.Location.PARENTHESES, p));
|
|
607
|
+
return parentheses;
|
|
608
|
+
}
|
|
609
|
+
visitControlParentheses(controlParentheses, p) {
|
|
610
|
+
controlParentheses = controlParentheses.withPrefix(this.visitSpace(controlParentheses.prefix, 34, p));
|
|
611
|
+
let tempExpression = this.visitExpression(controlParentheses, p);
|
|
612
|
+
if (!(tempExpression instanceof tree_2.ControlParentheses)) {
|
|
613
|
+
return tempExpression;
|
|
614
|
+
}
|
|
615
|
+
controlParentheses = tempExpression;
|
|
616
|
+
controlParentheses = controlParentheses.withMarkers(this.visitMarkers(controlParentheses.markers, p));
|
|
617
|
+
controlParentheses = controlParentheses.padding.withTree(this.visitRightPadded(controlParentheses.padding.tree, tree_1.JRightPadded.Location.PARENTHESES, p));
|
|
618
|
+
return controlParentheses;
|
|
619
|
+
}
|
|
620
|
+
visitPrimitive(primitive, p) {
|
|
621
|
+
primitive = primitive.withPrefix(this.visitSpace(primitive.prefix, 110, p));
|
|
622
|
+
let tempExpression = this.visitExpression(primitive, p);
|
|
623
|
+
if (!(tempExpression instanceof tree_2.Primitive)) {
|
|
624
|
+
return tempExpression;
|
|
625
|
+
}
|
|
626
|
+
primitive = tempExpression;
|
|
627
|
+
primitive = primitive.withMarkers(this.visitMarkers(primitive.markers, p));
|
|
628
|
+
return primitive;
|
|
629
|
+
}
|
|
630
|
+
visitReturn(_return, p) {
|
|
631
|
+
_return = _return.withPrefix(this.visitSpace(_return.prefix, 113, p));
|
|
632
|
+
let tempStatement = this.visitStatement(_return, p);
|
|
633
|
+
if (!(tempStatement instanceof tree_2.Return)) {
|
|
634
|
+
return tempStatement;
|
|
635
|
+
}
|
|
636
|
+
_return = tempStatement;
|
|
637
|
+
_return = _return.withMarkers(this.visitMarkers(_return.markers, p));
|
|
638
|
+
_return = _return.withExpression(this.visitAndCast(_return.expression, p));
|
|
639
|
+
return _return;
|
|
640
|
+
}
|
|
641
|
+
visitSwitch(_switch, p) {
|
|
642
|
+
_switch = _switch.withPrefix(this.visitSpace(_switch.prefix, 117, p));
|
|
643
|
+
let tempStatement = this.visitStatement(_switch, p);
|
|
644
|
+
if (!(tempStatement instanceof tree_2.Switch)) {
|
|
645
|
+
return tempStatement;
|
|
646
|
+
}
|
|
647
|
+
_switch = tempStatement;
|
|
648
|
+
_switch = _switch.withMarkers(this.visitMarkers(_switch.markers, p));
|
|
649
|
+
_switch = _switch.withSelector(this.visitAndCast(_switch.selector, p));
|
|
650
|
+
_switch = _switch.withCases(this.visitAndCast(_switch.cases, p));
|
|
651
|
+
return _switch;
|
|
652
|
+
}
|
|
653
|
+
visitSwitchExpression(switchExpression, p) {
|
|
654
|
+
switchExpression = switchExpression.withPrefix(this.visitSpace(switchExpression.prefix, 118, p));
|
|
655
|
+
let tempExpression = this.visitExpression(switchExpression, p);
|
|
656
|
+
if (!(tempExpression instanceof tree_2.SwitchExpression)) {
|
|
657
|
+
return tempExpression;
|
|
658
|
+
}
|
|
659
|
+
switchExpression = tempExpression;
|
|
660
|
+
switchExpression = switchExpression.withMarkers(this.visitMarkers(switchExpression.markers, p));
|
|
661
|
+
switchExpression = switchExpression.withSelector(this.visitAndCast(switchExpression.selector, p));
|
|
662
|
+
switchExpression = switchExpression.withCases(this.visitAndCast(switchExpression.cases, p));
|
|
663
|
+
return switchExpression;
|
|
664
|
+
}
|
|
665
|
+
visitSynchronized(synchronized, p) {
|
|
666
|
+
synchronized = synchronized.withPrefix(this.visitSpace(synchronized.prefix, 119, p));
|
|
667
|
+
let tempStatement = this.visitStatement(synchronized, p);
|
|
668
|
+
if (!(tempStatement instanceof tree_2.Synchronized)) {
|
|
669
|
+
return tempStatement;
|
|
670
|
+
}
|
|
671
|
+
synchronized = tempStatement;
|
|
672
|
+
synchronized = synchronized.withMarkers(this.visitMarkers(synchronized.markers, p));
|
|
673
|
+
synchronized = synchronized.withLock(this.visitAndCast(synchronized.lock, p));
|
|
674
|
+
synchronized = synchronized.withBody(this.visitAndCast(synchronized.body, p));
|
|
675
|
+
return synchronized;
|
|
676
|
+
}
|
|
677
|
+
visitTernary(ternary, p) {
|
|
678
|
+
ternary = ternary.withPrefix(this.visitSpace(ternary.prefix, 121, p));
|
|
679
|
+
let tempStatement = this.visitStatement(ternary, p);
|
|
680
|
+
if (!(tempStatement instanceof tree_2.Ternary)) {
|
|
681
|
+
return tempStatement;
|
|
682
|
+
}
|
|
683
|
+
ternary = tempStatement;
|
|
684
|
+
let tempExpression = this.visitExpression(ternary, p);
|
|
685
|
+
if (!(tempExpression instanceof tree_2.Ternary)) {
|
|
686
|
+
return tempExpression;
|
|
687
|
+
}
|
|
688
|
+
ternary = tempExpression;
|
|
689
|
+
ternary = ternary.withMarkers(this.visitMarkers(ternary.markers, p));
|
|
690
|
+
ternary = ternary.withCondition(this.visitAndCast(ternary.condition, p));
|
|
691
|
+
ternary = ternary.padding.withTruePart(this.visitLeftPadded(ternary.padding.truePart, tree_1.JLeftPadded.Location.TERNARY_TRUE, p));
|
|
692
|
+
ternary = ternary.padding.withFalsePart(this.visitLeftPadded(ternary.padding.falsePart, tree_1.JLeftPadded.Location.TERNARY_FALSE, p));
|
|
693
|
+
return ternary;
|
|
694
|
+
}
|
|
695
|
+
visitThrow(_throw, p) {
|
|
696
|
+
_throw = _throw.withPrefix(this.visitSpace(_throw.prefix, 125, p));
|
|
697
|
+
let tempStatement = this.visitStatement(_throw, p);
|
|
698
|
+
if (!(tempStatement instanceof tree_2.Throw)) {
|
|
699
|
+
return tempStatement;
|
|
700
|
+
}
|
|
701
|
+
_throw = tempStatement;
|
|
702
|
+
_throw = _throw.withMarkers(this.visitMarkers(_throw.markers, p));
|
|
703
|
+
_throw = _throw.withException(this.visitAndCast(_throw.exception, p));
|
|
704
|
+
return _throw;
|
|
705
|
+
}
|
|
706
|
+
visitTry(_try, p) {
|
|
707
|
+
_try = _try.withPrefix(this.visitSpace(_try.prefix, 127, p));
|
|
708
|
+
let tempStatement = this.visitStatement(_try, p);
|
|
709
|
+
if (!(tempStatement instanceof tree_2.Try)) {
|
|
710
|
+
return tempStatement;
|
|
711
|
+
}
|
|
712
|
+
_try = tempStatement;
|
|
713
|
+
_try = _try.withMarkers(this.visitMarkers(_try.markers, p));
|
|
714
|
+
_try = _try.padding.withResources(this.visitContainer(_try.padding.resources, tree_1.JContainer.Location.TRY_RESOURCES, p));
|
|
715
|
+
_try = _try.withBody(this.visitAndCast(_try.body, p));
|
|
716
|
+
_try = _try.withCatches(core_1.ListUtils.map(_try.catches, el => this.visitAndCast(el, p)));
|
|
717
|
+
_try = _try.padding.withFinally(this.visitLeftPadded(_try.padding.finally, tree_1.JLeftPadded.Location.TRY_FINALLY, p));
|
|
718
|
+
return _try;
|
|
719
|
+
}
|
|
720
|
+
visitTryResource(resource, p) {
|
|
721
|
+
resource = resource.withPrefix(this.visitSpace(resource.prefix, 128, p));
|
|
722
|
+
resource = resource.withMarkers(this.visitMarkers(resource.markers, p));
|
|
723
|
+
resource = resource.withVariableDeclarations(this.visitAndCast(resource.variableDeclarations, p));
|
|
724
|
+
return resource;
|
|
725
|
+
}
|
|
726
|
+
visitCatch(_catch, p) {
|
|
727
|
+
_catch = _catch.withPrefix(this.visitSpace(_catch.prefix, 28, p));
|
|
728
|
+
_catch = _catch.withMarkers(this.visitMarkers(_catch.markers, p));
|
|
729
|
+
_catch = _catch.withParameter(this.visitAndCast(_catch.parameter, p));
|
|
730
|
+
_catch = _catch.withBody(this.visitAndCast(_catch.body, p));
|
|
731
|
+
return _catch;
|
|
732
|
+
}
|
|
733
|
+
visitTypeCast(typeCast, p) {
|
|
734
|
+
typeCast = typeCast.withPrefix(this.visitSpace(typeCast.prefix, 133, p));
|
|
735
|
+
let tempExpression = this.visitExpression(typeCast, p);
|
|
736
|
+
if (!(tempExpression instanceof tree_2.TypeCast)) {
|
|
737
|
+
return tempExpression;
|
|
738
|
+
}
|
|
739
|
+
typeCast = tempExpression;
|
|
740
|
+
typeCast = typeCast.withMarkers(this.visitMarkers(typeCast.markers, p));
|
|
741
|
+
typeCast = typeCast.withClazz(this.visitAndCast(typeCast.clazz, p));
|
|
742
|
+
typeCast = typeCast.withExpression(this.visitAndCast(typeCast.expression, p));
|
|
743
|
+
return typeCast;
|
|
744
|
+
}
|
|
745
|
+
visitTypeParameter(typeParameter, p) {
|
|
746
|
+
typeParameter = typeParameter.withPrefix(this.visitSpace(typeParameter.prefix, 135, p));
|
|
747
|
+
typeParameter = typeParameter.withMarkers(this.visitMarkers(typeParameter.markers, p));
|
|
748
|
+
typeParameter = typeParameter.withAnnotations(core_1.ListUtils.map(typeParameter.annotations, el => this.visitAndCast(el, p)));
|
|
749
|
+
typeParameter = typeParameter.withModifiers(core_1.ListUtils.map(typeParameter.modifiers, el => this.visitAndCast(el, p)));
|
|
750
|
+
typeParameter = typeParameter.withName(this.visitAndCast(typeParameter.name, p));
|
|
751
|
+
typeParameter = typeParameter.padding.withBounds(this.visitContainer(typeParameter.padding.bounds, tree_1.JContainer.Location.TYPE_BOUNDS, p));
|
|
752
|
+
return typeParameter;
|
|
753
|
+
}
|
|
754
|
+
visitTypeParameters(typeParameters, p) {
|
|
755
|
+
typeParameters = typeParameters.withPrefix(this.visitSpace(typeParameters.prefix, 135, p));
|
|
756
|
+
typeParameters = typeParameters.withMarkers(this.visitMarkers(typeParameters.markers, p));
|
|
757
|
+
typeParameters = typeParameters.withAnnotations(core_1.ListUtils.map(typeParameters.annotations, el => this.visitAndCast(el, p)));
|
|
758
|
+
typeParameters = typeParameters.padding.withTypeParameters(core_1.ListUtils.map(typeParameters.padding.typeParameters, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.TYPE_PARAMETER, p)));
|
|
759
|
+
return typeParameters;
|
|
760
|
+
}
|
|
761
|
+
visitUnary(unary, p) {
|
|
762
|
+
unary = unary.withPrefix(this.visitSpace(unary.prefix, 138, p));
|
|
763
|
+
let tempStatement = this.visitStatement(unary, p);
|
|
764
|
+
if (!(tempStatement instanceof tree_2.Unary)) {
|
|
765
|
+
return tempStatement;
|
|
766
|
+
}
|
|
767
|
+
unary = tempStatement;
|
|
768
|
+
let tempExpression = this.visitExpression(unary, p);
|
|
769
|
+
if (!(tempExpression instanceof tree_2.Unary)) {
|
|
770
|
+
return tempExpression;
|
|
771
|
+
}
|
|
772
|
+
unary = tempExpression;
|
|
773
|
+
unary = unary.withMarkers(this.visitMarkers(unary.markers, p));
|
|
774
|
+
unary = unary.padding.withOperator(this.visitLeftPadded(unary.padding.operator, tree_1.JLeftPadded.Location.UNARY_OPERATOR, p));
|
|
775
|
+
unary = unary.withExpression(this.visitAndCast(unary.expression, p));
|
|
776
|
+
return unary;
|
|
777
|
+
}
|
|
778
|
+
visitVariableDeclarations(variableDeclarations, p) {
|
|
779
|
+
variableDeclarations = variableDeclarations.withPrefix(this.visitSpace(variableDeclarations.prefix, 142, p));
|
|
780
|
+
let tempStatement = this.visitStatement(variableDeclarations, p);
|
|
781
|
+
if (!(tempStatement instanceof tree_2.VariableDeclarations)) {
|
|
782
|
+
return tempStatement;
|
|
783
|
+
}
|
|
784
|
+
variableDeclarations = tempStatement;
|
|
785
|
+
variableDeclarations = variableDeclarations.withMarkers(this.visitMarkers(variableDeclarations.markers, p));
|
|
786
|
+
variableDeclarations = variableDeclarations.withLeadingAnnotations(core_1.ListUtils.map(variableDeclarations.leadingAnnotations, el => this.visitAndCast(el, p)));
|
|
787
|
+
variableDeclarations = variableDeclarations.withModifiers(core_1.ListUtils.map(variableDeclarations.modifiers, el => this.visitAndCast(el, p)));
|
|
788
|
+
variableDeclarations = variableDeclarations.withTypeExpression(this.visitAndCast(variableDeclarations.typeExpression, p));
|
|
789
|
+
variableDeclarations = variableDeclarations.withVarargs(this.visitSpace(variableDeclarations.varargs, 141, p));
|
|
790
|
+
variableDeclarations = variableDeclarations.withDimensionsBeforeName(core_1.ListUtils.map(variableDeclarations.dimensionsBeforeName, el => el.withBefore(this.visitSpace(el.before, 35, p)).withElement(this.visitSpace(el.element, 36, p))));
|
|
791
|
+
variableDeclarations = variableDeclarations.padding.withVariables(core_1.ListUtils.map(variableDeclarations.padding.variables, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.NAMED_VARIABLE, p)));
|
|
792
|
+
return variableDeclarations;
|
|
793
|
+
}
|
|
794
|
+
visitVariable(namedVariable, p) {
|
|
795
|
+
namedVariable = namedVariable.withPrefix(this.visitSpace(namedVariable.prefix, 144, p));
|
|
796
|
+
namedVariable = namedVariable.withMarkers(this.visitMarkers(namedVariable.markers, p));
|
|
797
|
+
namedVariable = namedVariable.withName(this.visitAndCast(namedVariable.name, p));
|
|
798
|
+
namedVariable = namedVariable.withDimensionsAfterName(core_1.ListUtils.map(namedVariable.dimensionsAfterName, el => el.withBefore(this.visitSpace(el.before, 35, p)).withElement(this.visitSpace(el.element, 36, p))));
|
|
799
|
+
namedVariable = namedVariable.padding.withInitializer(this.visitLeftPadded(namedVariable.padding.initializer, tree_1.JLeftPadded.Location.VARIABLE_INITIALIZER, p));
|
|
800
|
+
return namedVariable;
|
|
801
|
+
}
|
|
802
|
+
visitWhileLoop(whileLoop, p) {
|
|
803
|
+
whileLoop = whileLoop.withPrefix(this.visitSpace(whileLoop.prefix, 147, p));
|
|
804
|
+
let tempStatement = this.visitStatement(whileLoop, p);
|
|
805
|
+
if (!(tempStatement instanceof tree_2.WhileLoop)) {
|
|
806
|
+
return tempStatement;
|
|
807
|
+
}
|
|
808
|
+
whileLoop = tempStatement;
|
|
809
|
+
whileLoop = whileLoop.withMarkers(this.visitMarkers(whileLoop.markers, p));
|
|
810
|
+
whileLoop = whileLoop.withCondition(this.visitAndCast(whileLoop.condition, p));
|
|
811
|
+
whileLoop = whileLoop.padding.withBody(this.visitRightPadded(whileLoop.padding.body, tree_1.JRightPadded.Location.WHILE_BODY, p));
|
|
812
|
+
return whileLoop;
|
|
813
|
+
}
|
|
814
|
+
visitWildcard(wildcard, p) {
|
|
815
|
+
wildcard = wildcard.withPrefix(this.visitSpace(wildcard.prefix, 149, p));
|
|
816
|
+
let tempExpression = this.visitExpression(wildcard, p);
|
|
817
|
+
if (!(tempExpression instanceof tree_2.Wildcard)) {
|
|
818
|
+
return tempExpression;
|
|
819
|
+
}
|
|
820
|
+
wildcard = tempExpression;
|
|
821
|
+
wildcard = wildcard.withMarkers(this.visitMarkers(wildcard.markers, p));
|
|
822
|
+
wildcard = wildcard.padding.withBound(this.visitLeftPadded(wildcard.padding.bound, tree_1.JLeftPadded.Location.WILDCARD_BOUND, p));
|
|
823
|
+
wildcard = wildcard.withBoundedType(this.visitAndCast(wildcard.boundedType, p));
|
|
824
|
+
return wildcard;
|
|
825
|
+
}
|
|
826
|
+
visitYield(_yield, p) {
|
|
827
|
+
_yield = _yield.withPrefix(this.visitSpace(_yield.prefix, 150, p));
|
|
828
|
+
let tempStatement = this.visitStatement(_yield, p);
|
|
829
|
+
if (!(tempStatement instanceof tree_2.Yield)) {
|
|
830
|
+
return tempStatement;
|
|
831
|
+
}
|
|
832
|
+
_yield = tempStatement;
|
|
833
|
+
_yield = _yield.withMarkers(this.visitMarkers(_yield.markers, p));
|
|
834
|
+
_yield = _yield.withValue(this.visitAndCast(_yield.value, p));
|
|
835
|
+
return _yield;
|
|
836
|
+
}
|
|
837
|
+
visitUnknown(unknown, p) {
|
|
838
|
+
unknown = unknown.withPrefix(this.visitSpace(unknown.prefix, 139, p));
|
|
839
|
+
let tempStatement = this.visitStatement(unknown, p);
|
|
840
|
+
if (!(tempStatement instanceof tree_2.Unknown)) {
|
|
841
|
+
return tempStatement;
|
|
842
|
+
}
|
|
843
|
+
unknown = tempStatement;
|
|
844
|
+
let tempExpression = this.visitExpression(unknown, p);
|
|
845
|
+
if (!(tempExpression instanceof tree_2.Unknown)) {
|
|
846
|
+
return tempExpression;
|
|
847
|
+
}
|
|
848
|
+
unknown = tempExpression;
|
|
849
|
+
unknown = unknown.withMarkers(this.visitMarkers(unknown.markers, p));
|
|
850
|
+
unknown = unknown.withSource(this.visitAndCast(unknown.source, p));
|
|
851
|
+
return unknown;
|
|
852
|
+
}
|
|
853
|
+
visitUnknownSource(source, p) {
|
|
854
|
+
source = source.withPrefix(this.visitSpace(source.prefix, 140, p));
|
|
855
|
+
source = source.withMarkers(this.visitMarkers(source.markers, p));
|
|
856
|
+
return source;
|
|
857
|
+
}
|
|
858
|
+
visitContainer(container, loc, p) {
|
|
859
|
+
return extensions.visitContainer(this, container, loc, p);
|
|
860
|
+
}
|
|
861
|
+
visitLeftPadded(left, loc, p) {
|
|
862
|
+
return extensions.visitLeftPadded(this, left, loc, p);
|
|
863
|
+
}
|
|
864
|
+
visitRightPadded(right, loc, p) {
|
|
865
|
+
return extensions.visitRightPadded(this, right, loc, p);
|
|
866
|
+
}
|
|
867
|
+
visitSpace(space, loc, p) {
|
|
868
|
+
return extensions.visitSpace(this, space, loc, p);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
exports.JavaVisitor = JavaVisitor;
|
|
872
|
+
//# sourceMappingURL=visitor.js.map
|