1 /*******************************************************************************
2  * Copyright (c) 2000, 2010 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.jdt.internal.corext.refactoring.typeconstraints;
15 
16 import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
17 import org.eclipse.jdt.core.dom.ArrayAccess;
18 import org.eclipse.jdt.core.dom.ArrayCreation;
19 import org.eclipse.jdt.core.dom.ArrayInitializer;
20 import org.eclipse.jdt.core.dom.ArrayType;
21 import org.eclipse.jdt.core.dom.AssertStatement;
22 import org.eclipse.jdt.core.dom.Assignment;
23 import org.eclipse.jdt.core.dom.Block;
24 import org.eclipse.jdt.core.dom.BooleanLiteral;
25 import org.eclipse.jdt.core.dom.BreakStatement;
26 import org.eclipse.jdt.core.dom.CastExpression;
27 import org.eclipse.jdt.core.dom.CatchClause;
28 import org.eclipse.jdt.core.dom.CharacterLiteral;
29 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
30 import org.eclipse.jdt.core.dom.CompilationUnit;
31 import org.eclipse.jdt.core.dom.ConditionalExpression;
32 import org.eclipse.jdt.core.dom.ConstructorInvocation;
33 import org.eclipse.jdt.core.dom.ContinueStatement;
34 import org.eclipse.jdt.core.dom.DoStatement;
35 import org.eclipse.jdt.core.dom.EmptyStatement;
36 import org.eclipse.jdt.core.dom.ExpressionStatement;
37 import org.eclipse.jdt.core.dom.FieldAccess;
38 import org.eclipse.jdt.core.dom.FieldDeclaration;
39 import org.eclipse.jdt.core.dom.ForStatement;
40 import org.eclipse.jdt.core.dom.IfStatement;
41 import org.eclipse.jdt.core.dom.ImportDeclaration;
42 import org.eclipse.jdt.core.dom.InfixExpression;
43 import org.eclipse.jdt.core.dom.Initializer;
44 import org.eclipse.jdt.core.dom.InstanceofExpression;
45 import org.eclipse.jdt.core.dom.Javadoc;
46 import org.eclipse.jdt.core.dom.LabeledStatement;
47 import org.eclipse.jdt.core.dom.MethodDeclaration;
48 import org.eclipse.jdt.core.dom.MethodInvocation;
49 import org.eclipse.jdt.core.dom.NullLiteral;
50 import org.eclipse.jdt.core.dom.NumberLiteral;
51 import org.eclipse.jdt.core.dom.PackageDeclaration;
52 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
53 import org.eclipse.jdt.core.dom.PostfixExpression;
54 import org.eclipse.jdt.core.dom.PrefixExpression;
55 import org.eclipse.jdt.core.dom.PrimitiveType;
56 import org.eclipse.jdt.core.dom.QualifiedName;
57 import org.eclipse.jdt.core.dom.ReturnStatement;
58 import org.eclipse.jdt.core.dom.SimpleName;
59 import org.eclipse.jdt.core.dom.SimpleType;
60 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
61 import org.eclipse.jdt.core.dom.StringLiteral;
62 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
63 import org.eclipse.jdt.core.dom.SuperFieldAccess;
64 import org.eclipse.jdt.core.dom.SuperMethodInvocation;
65 import org.eclipse.jdt.core.dom.SwitchCase;
66 import org.eclipse.jdt.core.dom.SwitchStatement;
67 import org.eclipse.jdt.core.dom.SynchronizedStatement;
68 import org.eclipse.jdt.core.dom.ThisExpression;
69 import org.eclipse.jdt.core.dom.ThrowStatement;
70 import org.eclipse.jdt.core.dom.TryStatement;
71 import org.eclipse.jdt.core.dom.TypeDeclaration;
72 import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
73 import org.eclipse.jdt.core.dom.TypeLiteral;
74 import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
75 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
76 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
77 import org.eclipse.jdt.core.dom.WhileStatement;
78 
79 /**
80  * Empty implementation of a creator - provided to allow subclasses to override only a subset of methods.
81  * Subclass to provide constraint creation functionality.
82  */
83 public class ConstraintCreator {
84 
85 	public static final ITypeConstraint[] EMPTY_ARRAY= new ITypeConstraint[0];
86 
87 	/**
88 	 * @param node the AST node
89 	 * @return array of type constraints, may be empty
90 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.AnonymousClassDeclaration)
91 	 */
create(AnonymousClassDeclaration node)92 	public ITypeConstraint[] create(AnonymousClassDeclaration node) {
93 		return EMPTY_ARRAY;
94 	}
95 
96 	/**
97 	 * @param node the AST node
98 	 * @return array of type constraints, may be empty
99 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ArrayAccess)
100 	 */
create(ArrayAccess node)101 	public ITypeConstraint[] create(ArrayAccess node) {
102 		return EMPTY_ARRAY;
103 	}
104 
105 	/**
106 	 * @param node the AST node
107 	 * @return array of type constraints, may be empty
108 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ArrayCreation)
109 	 */
create(ArrayCreation node)110 	public ITypeConstraint[] create(ArrayCreation node) {
111 		return EMPTY_ARRAY;
112 	}
113 
114 	/**
115 	 * @param node the AST node
116 	 * @return array of type constraints, may be empty
117 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ArrayInitializer)
118 	 */
create(ArrayInitializer node)119 	public ITypeConstraint[] create(ArrayInitializer node) {
120 		return EMPTY_ARRAY;
121 	}
122 
123 	/**
124 	 * @param node the AST node
125 	 * @return array of type constraints, may be empty
126 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ArrayType)
127 	 */
create(ArrayType node)128 	public ITypeConstraint[] create(ArrayType node) {
129 		return EMPTY_ARRAY;
130 	}
131 
132 	/**
133 	 * @param node the AST node
134 	 * @return array of type constraints, may be empty
135 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.AssertStatement)
136 	 */
create(AssertStatement node)137 	public ITypeConstraint[] create(AssertStatement node) {
138 		return EMPTY_ARRAY;
139 	}
140 
141 	/**
142 	 * @param node the AST node
143 	 * @return array of type constraints, may be empty
144 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.Assignment)
145 	 */
create(Assignment node)146 	public ITypeConstraint[] create(Assignment node) {
147 		return EMPTY_ARRAY;
148 	}
149 
150 	/**
151 	 * @param node the AST node
152 	 * @return array of type constraints, may be empty
153 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.Block)
154 	 */
create(Block node)155 	public ITypeConstraint[] create(Block node) {
156 		return EMPTY_ARRAY;
157 	}
158 
159 	/**
160 	 * @param node the AST node
161 	 * @return array of type constraints, may be empty
162 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.BooleanLiteral)
163 	 */
create(BooleanLiteral node)164 	public ITypeConstraint[] create(BooleanLiteral node) {
165 		return EMPTY_ARRAY;
166 	}
167 
168 	/**
169 	 * @param node the AST node
170 	 * @return array of type constraints, may be empty
171 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.BreakStatement)
172 	 */
create(BreakStatement node)173 	public ITypeConstraint[] create(BreakStatement node) {
174 		return EMPTY_ARRAY;
175 	}
176 
177 	/**
178 	 * @param node the AST node
179 	 * @return array of type constraints, may be empty
180 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.CastExpression)
181 	 */
create(CastExpression node)182 	public ITypeConstraint[] create(CastExpression node) {
183 		return EMPTY_ARRAY;
184 	}
185 
186 	/**
187 	 * @param node the AST node
188 	 * @return array of type constraints, may be empty
189 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.CatchClause)
190 	 */
create(CatchClause node)191 	public ITypeConstraint[] create(CatchClause node) {
192 		return EMPTY_ARRAY;
193 	}
194 
195 	/**
196 	 * @param node the AST node
197 	 * @return array of type constraints, may be empty
198 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.CharacterLiteral)
199 	 */
create(CharacterLiteral node)200 	public ITypeConstraint[] create(CharacterLiteral node) {
201 		return EMPTY_ARRAY;
202 	}
203 
204 	/**
205 	 * @param node the AST node
206 	 * @return array of type constraints, may be empty
207 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ClassInstanceCreation)
208 	 */
create(ClassInstanceCreation node)209 	public ITypeConstraint[] create(ClassInstanceCreation node) {
210 		return EMPTY_ARRAY;
211 	}
212 
213 	/**
214 	 * @param node the AST node
215 	 * @return array of type constraints, may be empty
216 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.CompilationUnit)
217 	 */
create(CompilationUnit node)218 	public ITypeConstraint[] create(CompilationUnit node) {
219 		return EMPTY_ARRAY;
220 	}
221 
222 	/**
223 	 * @param node the AST node
224 	 * @return array of type constraints, may be empty
225 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ConditionalExpression)
226 	 */
create(ConditionalExpression node)227 	public ITypeConstraint[] create(ConditionalExpression node) {
228 		return EMPTY_ARRAY;
229 	}
230 
231 	/**
232 	 * @param node the AST node
233 	 * @return array of type constraints, may be empty
234 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ConstructorInvocation)
235 	 */
create(ConstructorInvocation node)236 	public ITypeConstraint[] create(ConstructorInvocation node) {
237 		return EMPTY_ARRAY;
238 	}
239 
240 	/**
241 	 * @param node the AST node
242 	 * @return array of type constraints, may be empty
243 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ContinueStatement)
244 	 */
create(ContinueStatement node)245 	public ITypeConstraint[] create(ContinueStatement node) {
246 		return EMPTY_ARRAY;
247 	}
248 
249 	/**
250 	 * @param node the AST node
251 	 * @return array of type constraints, may be empty
252 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.DoStatement)
253 	 */
create(DoStatement node)254 	public ITypeConstraint[] create(DoStatement node) {
255 		return EMPTY_ARRAY;
256 	}
257 
258 	/**
259 	 * @param node the AST node
260 	 * @return array of type constraints, may be empty
261 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.EmptyStatement)
262 	 */
create(EmptyStatement node)263 	public ITypeConstraint[] create(EmptyStatement node) {
264 		return EMPTY_ARRAY;
265 	}
266 
267 	/**
268 	 * @param node the AST node
269 	 * @return array of type constraints, may be empty
270 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ExpressionStatement)
271 	 */
create(ExpressionStatement node)272 	public ITypeConstraint[] create(ExpressionStatement node) {
273 		return EMPTY_ARRAY;
274 	}
275 
276 	/**
277 	 * @param node the AST node
278 	 * @return array of type constraints, may be empty
279 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.FieldAccess)
280 	 */
create(FieldAccess node)281 	public ITypeConstraint[] create(FieldAccess node) {
282 		return EMPTY_ARRAY;
283 	}
284 
285 	/**
286 	 * @param node the AST node
287 	 * @return array of type constraints, may be empty
288 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.FieldDeclaration)
289 	 */
create(FieldDeclaration node)290 	public ITypeConstraint[] create(FieldDeclaration node) {
291 		return EMPTY_ARRAY;
292 	}
293 
294 	/**
295 	 * @param node the AST node
296 	 * @return array of type constraints, may be empty
297 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ForStatement)
298 	 */
create(ForStatement node)299 	public ITypeConstraint[] create(ForStatement node) {
300 		return EMPTY_ARRAY;
301 	}
302 
303 	/**
304 	 * @param node the AST node
305 	 * @return array of type constraints, may be empty
306 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.IfStatement)
307 	 */
create(IfStatement node)308 	public ITypeConstraint[] create(IfStatement node) {
309 		return EMPTY_ARRAY;
310 	}
311 
312 	/**
313 	 * @param node the AST node
314 	 * @return array of type constraints, may be empty
315 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ImportDeclaration)
316 	 */
create(ImportDeclaration node)317 	public ITypeConstraint[] create(ImportDeclaration node) {
318 		return EMPTY_ARRAY;
319 	}
320 
321 	/**
322 	 * @param node the AST node
323 	 * @return array of type constraints, may be empty
324 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.InfixExpression)
325 	 */
create(InfixExpression node)326 	public ITypeConstraint[] create(InfixExpression node) {
327 		return EMPTY_ARRAY;
328 	}
329 
330 	/**
331 	 * @param node the AST node
332 	 * @return array of type constraints, may be empty
333 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.Initializer)
334 	 */
create(Initializer node)335 	public ITypeConstraint[] create(Initializer node) {
336 		return EMPTY_ARRAY;
337 	}
338 
339 	/**
340 	 * @param node the AST node
341 	 * @return array of type constraints, may be empty
342 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.InstanceofExpression)
343 	 */
create(InstanceofExpression node)344 	public ITypeConstraint[] create(InstanceofExpression node) {
345 		return EMPTY_ARRAY;
346 	}
347 
348 	/**
349 	 * @param node the AST node
350 	 * @return array of type constraints, may be empty
351 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.Javadoc)
352 	 */
create(Javadoc node)353 	public ITypeConstraint[] create(Javadoc node) {
354 		return EMPTY_ARRAY;
355 	}
356 
357 	/**
358 	 * @param node the AST node
359 	 * @return array of type constraints, may be empty
360 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.LabeledStatement)
361 	 */
create(LabeledStatement node)362 	public ITypeConstraint[] create(LabeledStatement node) {
363 		return EMPTY_ARRAY;
364 	}
365 
366 	/**
367 	 * @param node the AST node
368 	 * @return array of type constraints, may be empty
369 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MethodDeclaration)
370 	 */
create(MethodDeclaration node)371 	public ITypeConstraint[] create(MethodDeclaration node) {
372 		return EMPTY_ARRAY;
373 	}
374 
375 	/**
376 	 * @param node the AST node
377 	 * @return array of type constraints, may be empty
378 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MethodInvocation)
379 	 */
create(MethodInvocation node)380 	public ITypeConstraint[] create(MethodInvocation node) {
381 		return EMPTY_ARRAY;
382 	}
383 
384 	/**
385 	 * @param node the AST node
386 	 * @return array of type constraints, may be empty
387 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.NullLiteral)
388 	 */
create(NullLiteral node)389 	public ITypeConstraint[] create(NullLiteral node) {
390 		return EMPTY_ARRAY;
391 	}
392 
393 	/**
394 	 * @param node the AST node
395 	 * @return array of type constraints, may be empty
396 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.NumberLiteral)
397 	 */
create(NumberLiteral node)398 	public ITypeConstraint[] create(NumberLiteral node) {
399 		return EMPTY_ARRAY;
400 	}
401 
402 	/**
403 	 * @param node the AST node
404 	 * @return array of type constraints, may be empty
405 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.PackageDeclaration)
406 	 */
create(PackageDeclaration node)407 	public ITypeConstraint[] create(PackageDeclaration node) {
408 		return EMPTY_ARRAY;
409 	}
410 
411 	/**
412 	 * @param node the AST node
413 	 * @return array of type constraints, may be empty
414 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ParenthesizedExpression)
415 	 */
create(ParenthesizedExpression node)416 	public ITypeConstraint[] create(ParenthesizedExpression node) {
417 		return EMPTY_ARRAY;
418 	}
419 
420 	/**
421 	 * @param node the AST node
422 	 * @return array of type constraints, may be empty
423 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.PostfixExpression)
424 	 */
create(PostfixExpression node)425 	public ITypeConstraint[] create(PostfixExpression node) {
426 		return EMPTY_ARRAY;
427 	}
428 
429 	/**
430 	 * @param node the AST node
431 	 * @return array of type constraints, may be empty
432 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.PrefixExpression)
433 	 */
create(PrefixExpression node)434 	public ITypeConstraint[] create(PrefixExpression node) {
435 		return EMPTY_ARRAY;
436 	}
437 
438 	/**
439 	 * @param node the AST node
440 	 * @return array of type constraints, may be empty
441 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.PrimitiveType)
442 	 */
create(PrimitiveType node)443 	public ITypeConstraint[] create(PrimitiveType node) {
444 		return EMPTY_ARRAY;
445 	}
446 
447 	/**
448 	 * @param node the AST node
449 	 * @return array of type constraints, may be empty
450 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.QualifiedName)
451 	 */
create(QualifiedName node)452 	public ITypeConstraint[] create(QualifiedName node) {
453 		return EMPTY_ARRAY;
454 	}
455 
456 	/**
457 	 * @param node the AST node
458 	 * @return array of type constraints, may be empty
459 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ReturnStatement)
460 	 */
create(ReturnStatement node)461 	public ITypeConstraint[] create(ReturnStatement node) {
462 		return EMPTY_ARRAY;
463 	}
464 
465 	/**
466 	 * @param node the AST node
467 	 * @return array of type constraints, may be empty
468 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SimpleName)
469 	 */
create(SimpleName node)470 	public ITypeConstraint[] create(SimpleName node) {
471 		return EMPTY_ARRAY;
472 	}
473 
474 	/**
475 	 * @param node the AST node
476 	 * @return array of type constraints, may be empty
477 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SimpleType)
478 	 */
create(SimpleType node)479 	public ITypeConstraint[] create(SimpleType node) {
480 		return EMPTY_ARRAY;
481 	}
482 
483 	/**
484 	 * @param node the AST node
485 	 * @return array of type constraints, may be empty
486 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SingleVariableDeclaration)
487 	 */
create(SingleVariableDeclaration node)488 	public ITypeConstraint[] create(SingleVariableDeclaration node) {
489 		return EMPTY_ARRAY;
490 	}
491 
492 	/**
493 	 * @param node the AST node
494 	 * @return array of type constraints, may be empty
495 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.StringLiteral)
496 	 */
create(StringLiteral node)497 	public ITypeConstraint[] create(StringLiteral node) {
498 		return EMPTY_ARRAY;
499 	}
500 
501 	/**
502 	 * @param node the AST node
503 	 * @return array of type constraints, may be empty
504 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SuperConstructorInvocation)
505 	 */
create(SuperConstructorInvocation node)506 	public ITypeConstraint[] create(SuperConstructorInvocation node) {
507 		return EMPTY_ARRAY;
508 	}
509 
510 	/**
511 	 * @param node the AST node
512 	 * @return array of type constraints, may be empty
513 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SuperFieldAccess)
514 	 */
create(SuperFieldAccess node)515 	public ITypeConstraint[] create(SuperFieldAccess node) {
516 		return EMPTY_ARRAY;
517 	}
518 
519 	/**
520 	 * @param node the AST node
521 	 * @return array of type constraints, may be empty
522 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SuperMethodInvocation)
523 	 */
create(SuperMethodInvocation node)524 	public ITypeConstraint[] create(SuperMethodInvocation node) {
525 		return EMPTY_ARRAY;
526 	}
527 
528 	/**
529 	 * @param node the AST node
530 	 * @return array of type constraints, may be empty
531 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SwitchCase)
532 	 */
create(SwitchCase node)533 	public ITypeConstraint[] create(SwitchCase node) {
534 		return EMPTY_ARRAY;
535 	}
536 
537 	/**
538 	 * @param node the AST node
539 	 * @return array of type constraints, may be empty
540 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SwitchStatement)
541 	 */
create(SwitchStatement node)542 	public ITypeConstraint[] create(SwitchStatement node) {
543 		return EMPTY_ARRAY;
544 	}
545 
546 	/**
547 	 * @param node the AST node
548 	 * @return array of type constraints, may be empty
549 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SynchronizedStatement)
550 	 */
create(SynchronizedStatement node)551 	public ITypeConstraint[] create(SynchronizedStatement node) {
552 		return EMPTY_ARRAY;
553 	}
554 
555 	/**
556 	 * @param node the AST node
557 	 * @return array of type constraints, may be empty
558 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ThisExpression)
559 	 */
create(ThisExpression node)560 	public ITypeConstraint[] create(ThisExpression node) {
561 		return EMPTY_ARRAY;
562 	}
563 
564 	/**
565 	 * @param node the AST node
566 	 * @return array of type constraints, may be empty
567 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ThrowStatement)
568 	 */
create(ThrowStatement node)569 	public ITypeConstraint[] create(ThrowStatement node) {
570 		return EMPTY_ARRAY;
571 	}
572 
573 	/**
574 	 * @param node the AST node
575 	 * @return array of type constraints, may be empty
576 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TryStatement)
577 	 */
create(TryStatement node)578 	public ITypeConstraint[] create(TryStatement node) {
579 		return EMPTY_ARRAY;
580 	}
581 
582 	/**
583 	 * @param node the AST node
584 	 * @return array of type constraints, may be empty
585 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeDeclaration)
586 	 */
create(TypeDeclaration node)587 	public ITypeConstraint[] create(TypeDeclaration node) {
588 		return EMPTY_ARRAY;
589 
590 		// TODO account for enums and annotations
591 	}
592 
593 	/**
594 	 * @param node the AST node
595 	 * @return array of type constraints, may be empty
596 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeDeclarationStatement)
597 	 */
create(TypeDeclarationStatement node)598 	public ITypeConstraint[] create(TypeDeclarationStatement node) {
599 		return EMPTY_ARRAY;
600 	}
601 
602 	/**
603 	 * @param node the AST node
604 	 * @return array of type constraints, may be empty
605 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeLiteral)
606 	 */
create(TypeLiteral node)607 	public ITypeConstraint[] create(TypeLiteral node) {
608 		return EMPTY_ARRAY;
609 	}
610 
611 	/**
612 	 * @param node the AST node
613 	 * @return array of type constraints, may be empty
614 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.VariableDeclarationExpression)
615 	 */
create(VariableDeclarationExpression node)616 	public ITypeConstraint[] create(VariableDeclarationExpression node) {
617 		return EMPTY_ARRAY;
618 	}
619 
620 	/**
621 	 * @param node the AST node
622 	 * @return array of type constraints, may be empty
623 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.VariableDeclarationFragment)
624 	 */
create(VariableDeclarationFragment node)625 	public ITypeConstraint[] create(VariableDeclarationFragment node) {
626 		return EMPTY_ARRAY;
627 	}
628 
629 	/**
630 	 * @param node the AST node
631 	 * @return array of type constraints, may be empty
632 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.VariableDeclarationStatement)
633 	 */
create(VariableDeclarationStatement node)634 	public ITypeConstraint[] create(VariableDeclarationStatement node) {
635 		return EMPTY_ARRAY;
636 	}
637 
638 	/**
639 	 * @param node the AST node
640 	 * @return array of type constraints, may be empty
641 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.WhileStatement)
642 	 */
create(WhileStatement node)643 	public ITypeConstraint[] create(WhileStatement node) {
644 		return EMPTY_ARRAY;
645 	}
646 
647 }
648