View | Details | Raw Unified | Return to bug 180905 | Differences between
and this patch

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/BindingResolver.java (-1 / +15 lines)
Lines 11-16 Link Here
11
11
12
package org.eclipse.jdt.core.dom;
12
package org.eclipse.jdt.core.dom;
13
13
14
import org.eclipse.jdt.core.WorkingCopyOwner;
14
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
15
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
15
import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
16
import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
16
import org.eclipse.jdt.internal.compiler.lookup.ElementValuePair;
17
import org.eclipse.jdt.internal.compiler.lookup.ElementValuePair;
Lines 219-227 Link Here
219
	 * </p>
220
	 * </p>
220
	 *
221
	 *
221
	 * @param recoveredTypeBinding the recovered type binding
222
	 * @param recoveredTypeBinding the recovered type binding
223
	 * @param dimensions the dimensions to add the to given type binding dimensions
222
	 * @return the new type binding
224
	 * @return the new type binding
223
	 */
225
	 */
224
	ITypeBinding getTypeBinding(RecoveredTypeBinding recoveredTypeBinding) {
226
	ITypeBinding getTypeBinding(RecoveredTypeBinding recoveredTypeBinding, int dimensions) {
225
		return null;
227
		return null;
226
	}
228
	}
227
229
Lines 240-245 Link Here
240
	}
242
	}
241
243
242
	/**
244
	/**
245
	 * Return the working copy owner for the receiver.
246
	 * <p>
247
	 * The default implementation of this method returns <code>null</code>.
248
	 * Subclasses may reimplement.
249
	 * </p>
250
	 * @return the working copy owner for the receiver
251
	 */
252
	public WorkingCopyOwner getWorkingCopyOwner() {
253
		return null;
254
	}
255
256
	/**
243
	 * Return the new annotation corresponding to the given old annotation
257
	 * Return the new annotation corresponding to the given old annotation
244
	 * <p>
258
	 * <p>
245
	 * The default implementation of this method returns <code>null</code>
259
	 * The default implementation of this method returns <code>null</code>
(-)dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java (-16 / +73 lines)
Lines 14-21 Link Here
14
import java.util.List;
14
import java.util.List;
15
15
16
import org.eclipse.jdt.core.IJavaElement;
16
import org.eclipse.jdt.core.IJavaElement;
17
import org.eclipse.jdt.core.JavaModelException;
17
import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
18
import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
19
import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
18
import org.eclipse.jdt.internal.compiler.util.Util;
20
import org.eclipse.jdt.internal.compiler.util.Util;
21
import org.eclipse.jdt.internal.core.CompilationUnit;
19
22
20
/**
23
/**
21
 * This class represents the recovered binding for a type
24
 * This class represents the recovered binding for a type
Lines 55-71 Link Here
55
		}
58
		}
56
	}
59
	}
57
60
58
	RecoveredTypeBinding(BindingResolver resolver, RecoveredTypeBinding typeBinding) {
61
	RecoveredTypeBinding(BindingResolver resolver, RecoveredTypeBinding typeBinding, int dimensions) {
59
		this.innerTypeBinding = typeBinding;
62
		this.innerTypeBinding = typeBinding;
60
		this.dimensions = typeBinding.getDimensions() - 1;
63
		this.dimensions = typeBinding.getDimensions() + dimensions;
61
		this.resolver = resolver;
64
		this.resolver = resolver;
62
	}
65
	}
63
66
64
	/* (non-Javadoc)
67
	/* (non-Javadoc)
65
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#createArrayType(int)
68
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#createArrayType(int)
66
	 */
69
	 */
67
	public ITypeBinding createArrayType(int dimension) {
70
	public ITypeBinding createArrayType(int dims) {
68
		throw new IllegalArgumentException("Cannot be called on a recovered type binding"); //$NON-NLS-1$
71
		return this.resolver.getTypeBinding(this, dims);
69
	}
72
	}
70
73
71
	/* (non-Javadoc)
74
	/* (non-Javadoc)
Lines 87-93 Link Here
87
	 */
90
	 */
88
	public ITypeBinding getComponentType() {
91
	public ITypeBinding getComponentType() {
89
		if (this.dimensions == 0) return null;
92
		if (this.dimensions == 0) return null;
90
		return this.resolver.getTypeBinding(this);
93
		return this.resolver.getTypeBinding(this, -1);
91
	}
94
	}
92
95
93
	/* (non-Javadoc)
96
	/* (non-Javadoc)
Lines 143-151 Link Here
143
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getElementType()
146
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getElementType()
144
	 */
147
	 */
145
	public ITypeBinding getElementType() {
148
	public ITypeBinding getElementType() {
146
		if (this.referenceBinding != null && this.referenceBinding.isArrayType()) {
149
		if (this.referenceBinding != null) {
147
			ArrayBinding arrayBinding = (ArrayBinding) this.referenceBinding;
150
			if (this.referenceBinding.isArrayType()) {
148
			return new RecoveredTypeBinding(this.resolver, arrayBinding.leafComponentType);
151
				ArrayBinding arrayBinding = (ArrayBinding) this.referenceBinding;
152
				return new RecoveredTypeBinding(this.resolver, arrayBinding.leafComponentType);
153
			} else {
154
				return new RecoveredTypeBinding(this.resolver, this.referenceBinding);
155
			}
149
		}
156
		}
150
		if (this.innerTypeBinding != null) {
157
		if (this.innerTypeBinding != null) {
151
			return this.innerTypeBinding.getElementType();
158
			return this.innerTypeBinding.getElementType();
Lines 216-221 Link Here
216
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getPackage()
223
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getPackage()
217
	 */
224
	 */
218
	public IPackageBinding getPackage() {
225
	public IPackageBinding getPackage() {
226
		CompilationUnitScope scope = this.resolver.scope();
227
		if (scope != null) {
228
			return this.resolver.getPackageBinding(scope.getCurrentPackage());
229
		}
219
		return null;
230
		return null;
220
	}
231
	}
221
232
Lines 230-236 Link Here
230
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getSuperclass()
241
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getSuperclass()
231
	 */
242
	 */
232
	public ITypeBinding getSuperclass() {
243
	public ITypeBinding getSuperclass() {
233
		return null;
244
		return this.resolver.resolveWellKnownType("java.lang.Object"); //$NON-NLS-1$
234
	}
245
	}
235
246
236
	/* (non-Javadoc)
247
	/* (non-Javadoc)
Lines 240-246 Link Here
240
		if (this.referenceBinding != null) {
251
		if (this.referenceBinding != null) {
241
			return this.typeArguments = TypeBinding.NO_TYPE_BINDINGS;
252
			return this.typeArguments = TypeBinding.NO_TYPE_BINDINGS;
242
		}
253
		}
243
		if (this.typeArguments != null) return typeArguments;
254
		if (this.typeArguments != null) {
255
			return typeArguments;
256
		}
244
257
245
		if (this.innerTypeBinding != null) {
258
		if (this.innerTypeBinding != null) {
246
			return this.innerTypeBinding.getTypeArguments();
259
			return this.innerTypeBinding.getTypeArguments();
Lines 315-322 Link Here
315
	/* (non-Javadoc)
328
	/* (non-Javadoc)
316
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isAssignmentCompatible(org.eclipse.jdt.core.dom.ITypeBinding)
329
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isAssignmentCompatible(org.eclipse.jdt.core.dom.ITypeBinding)
317
	 */
330
	 */
318
	public boolean isAssignmentCompatible(ITypeBinding variableType) {
331
	public boolean isAssignmentCompatible(ITypeBinding typeBinding) {
319
		return false;
332
		if ("java.lang.Object".equals(typeBinding.getQualifiedName())) { //$NON-NLS-1$
333
			return true;
334
		}
335
		return this.isEqualTo(typeBinding);
320
	}
336
	}
321
337
322
	/* (non-Javadoc)
338
	/* (non-Javadoc)
Lines 330-336 Link Here
330
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isCastCompatible(org.eclipse.jdt.core.dom.ITypeBinding)
346
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isCastCompatible(org.eclipse.jdt.core.dom.ITypeBinding)
331
	 */
347
	 */
332
	public boolean isCastCompatible(ITypeBinding typeBinding) {
348
	public boolean isCastCompatible(ITypeBinding typeBinding) {
333
		return false;
349
		if ("java.lang.Object".equals(typeBinding.getQualifiedName())) { //$NON-NLS-1$
350
			return true;
351
		}
352
		return this.isEqualTo(typeBinding);
334
	}
353
	}
335
354
336
	/* (non-Javadoc)
355
	/* (non-Javadoc)
Lines 427-433 Link Here
427
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isSubTypeCompatible(org.eclipse.jdt.core.dom.ITypeBinding)
446
	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isSubTypeCompatible(org.eclipse.jdt.core.dom.ITypeBinding)
428
	 */
447
	 */
429
	public boolean isSubTypeCompatible(ITypeBinding typeBinding) {
448
	public boolean isSubTypeCompatible(ITypeBinding typeBinding) {
430
		return false;
449
		if ("java.lang.Object".equals(typeBinding.getQualifiedName())) { //$NON-NLS-1$
450
			return true;
451
		}
452
		return this.isEqualTo(typeBinding);
431
	}
453
	}
432
454
433
	/* (non-Javadoc)
455
	/* (non-Javadoc)
Lines 469-474 Link Here
469
	 * @see org.eclipse.jdt.core.dom.IBinding#getJavaElement()
491
	 * @see org.eclipse.jdt.core.dom.IBinding#getJavaElement()
470
	 */
492
	 */
471
	public IJavaElement getJavaElement() {
493
	public IJavaElement getJavaElement() {
494
		try {
495
			return new CompilationUnit(null, this.getInternalName(), this.resolver.getWorkingCopyOwner()).getWorkingCopy(this.resolver.getWorkingCopyOwner(), null);
496
		} catch (JavaModelException e) {
497
			//ignore
498
		}
472
		return null;
499
		return null;
473
	}
500
	}
474
501
Lines 476-482 Link Here
476
	 * @see org.eclipse.jdt.core.dom.IBinding#getKey()
503
	 * @see org.eclipse.jdt.core.dom.IBinding#getKey()
477
	 */
504
	 */
478
	public String getKey() {
505
	public String getKey() {
479
		return null;
506
		StringBuffer buffer = new StringBuffer();
507
		buffer.append("Recovered#"); //$NON-NLS-1$
508
		if (this.innerTypeBinding != null) {
509
			buffer.append("innerTypeBinding") //$NON-NLS-1$
510
			      .append(this.innerTypeBinding.getKey());
511
		} else if (this.currentType != null) {
512
			buffer.append("currentType") //$NON-NLS-1$
513
			      .append(this.currentType.toString());
514
		} else if (this.referenceBinding != null) {
515
			buffer.append("referenceBinding") //$NON-NLS-1$
516
				  .append(this.referenceBinding.computeUniqueKey());
517
		} else if (variableDeclaration != null) {
518
			buffer
519
				.append("variableDeclaration") //$NON-NLS-1$
520
				.append(this.variableDeclaration.getClass())
521
				.append(this.variableDeclaration.getName().getIdentifier())
522
				.append(this.variableDeclaration.getExtraDimensions());
523
		}
524
		buffer.append(this.getDimensions());
525
		if (this.typeArguments != null) {
526
			buffer.append('<');
527
			for (int i = 0, max = this.typeArguments.length; i < max; i++) {
528
				if (i != 0) {
529
					buffer.append(',');
530
				}
531
				buffer.append(this.typeArguments[i].getKey());
532
			}
533
			buffer.append('>');
534
		}
535
		return String.valueOf(buffer);
480
	}
536
	}
481
537
482
	/* (non-Javadoc)
538
	/* (non-Javadoc)
Lines 497-503 Link Here
497
	 * @see org.eclipse.jdt.core.dom.IBinding#isEqualTo(org.eclipse.jdt.core.dom.IBinding)
553
	 * @see org.eclipse.jdt.core.dom.IBinding#isEqualTo(org.eclipse.jdt.core.dom.IBinding)
498
	 */
554
	 */
499
	public boolean isEqualTo(IBinding other) {
555
	public boolean isEqualTo(IBinding other) {
500
		return false;
556
		if (!other.isRecovered() || other.getKind() != IBinding.TYPE) return false;
557
		return this.getKey().equals(other.getKey());
501
	}
558
	}
502
559
503
	/* (non-Javadoc)
560
	/* (non-Javadoc)
(-)dom/org/eclipse/jdt/core/dom/ITypeBinding.java (-14 / +18 lines)
Lines 54-66 Link Here
54
	 * <p>If the receiver is an array binding, then the resulting dimension is the given dimension
54
	 * <p>If the receiver is an array binding, then the resulting dimension is the given dimension
55
	 * plus the dimension of the receiver. Otherwise the resulting dimension is the given
55
	 * plus the dimension of the receiver. Otherwise the resulting dimension is the given
56
	 * dimension.</p>
56
	 * dimension.</p>
57
	 * <p>It cannot be called on a recovered binding.</p>
58
	 *
57
	 *
59
	 * @param dimension the given dimension
58
	 * @param dimension the given dimension
60
	 * @return an array type binding
59
	 * @return an array type binding
61
	 * @throws IllegalArgumentException:<ul>
60
	 * @throws IllegalArgumentException:<ul>
62
	 * <li>if the receiver represents the void type</li>
61
	 * <li>if the receiver represents the void type</li>
63
	 * <li>if the receiver represents a recovered binding</li>
64
	 * <li>if the resulting dimensions is lower than one or greater than 255</li>
62
	 * <li>if the resulting dimensions is lower than one or greater than 255</li>
65
	 * </ul>
63
	 * </ul>
66
	 * @since 3.3
64
	 * @since 3.3
Lines 306-317 Link Here
306
	 * original source, since the compiler may change them (in particular,
304
	 * original source, since the compiler may change them (in particular,
307
	 * for inner class emulation). The <code>getDeclaredModifiers</code> method
305
	 * for inner class emulation). The <code>getDeclaredModifiers</code> method
308
	 * should be used if the original modifiers are needed.
306
	 * should be used if the original modifiers are needed.
309
	 * Returns 0 if this type does not represent a class, interface, enum, or annotation
307
	 * Returns 0 if this type does not represent a class, an interface, an enum, an annotation
310
	 * type.
308
	 * type or a recovered type.
311
	 *
309
	 *
312
	 * @return the compiled modifiers for this type binding or 0
310
	 * @return the compiled modifiers for this type binding or 0
313
	 * if this type does not represent a class, interface, enum, or annotation
311
	 * if this type does not represent a class, an interface, an enum, an annotation
314
	 * type
312
	 * type or a recovered type.
315
	 * @see #getDeclaredModifiers()
313
	 * @see #getDeclaredModifiers()
316
	 */
314
	 */
317
	public int getModifiers();
315
	public int getModifiers();
Lines 365-375 Link Here
365
363
366
	/**
364
	/**
367
	 * Returns the binding for the package in which this type is declared.
365
	 * Returns the binding for the package in which this type is declared.
366
	 * 
367
	 * <p>The package of a recovered type reference binding is the package of the
368
	 * enclosing type.</p>
368
	 *
369
	 *
369
	 * @return the binding for the package in which this class, interface,
370
	 * @return the binding for the package in which this class, interface,
370
	 * enum, or annotation type is declared, or <code>null</code> if this type
371
	 * enum, or annotation type is declared, or <code>null</code> if this type
371
	 * binding represents a primitive type, an array type, the null type,
372
	 * binding represents a primitive type, an array type, the null type,
372
	 * a type variable, a wildcard type, a capture binding, or a recovered binding.
373
	 * a type variable, a wildcard type, a capture binding.
373
	 */
374
	 */
374
	public IPackageBinding getPackage();
375
	public IPackageBinding getPackage();
375
376
Lines 454-461 Link Here
454
	 * <p>
455
	 * <p>
455
	 * If this type binding represents an interface, an array type, a
456
	 * If this type binding represents an interface, an array type, a
456
	 * primitive type, the null type, a type variable, an enum type,
457
	 * primitive type, the null type, a type variable, an enum type,
457
	 * an annotation type, a wildcard type, a capture binding, or a
458
	 * an annotation type, a wildcard type, or a capture binding then
458
	 * recovered binding then <code>null</code> is returned.
459
	 * <code>null</code> is returned.
459
	 * </p>
460
	 * </p>
460
	 *
461
	 *
461
	 * @return the superclass of the class represented by this type binding,
462
	 * @return the superclass of the class represented by this type binding,
Lines 593-599 Link Here
593
	 * of the given type, as specified in section 5.2 of <em>The Java Language
594
	 * of the given type, as specified in section 5.2 of <em>The Java Language
594
	 * Specification, Third Edition</em> (JLS3).
595
	 * Specification, Third Edition</em> (JLS3).
595
	 *
596
	 *
596
	 * <p>If the receiver or the argument is a recovered type, the answer is always false.</p>
597
	 * <p>If the receiver or the argument is a recovered type, the answer is always false,
598
	 * unless the two types are identical or the argument is <code>java.lang.Object</code>.</p>
597
	 *
599
	 *
598
	 * @param variableType the type of a variable to check compatibility against
600
	 * @param variableType the type of a variable to check compatibility against
599
	 * @return <code>true</code> if an expression of this type can be assigned to a
601
	 * @return <code>true</code> if an expression of this type can be assigned to a
Lines 641-647 Link Here
641
	 * <code>A.isCastCompatible(B)</code>
643
	 * <code>A.isCastCompatible(B)</code>
642
	 * </p>
644
	 * </p>
643
	 *
645
	 *
644
	 * <p>If the receiver or the argument is a recovered type, the answer is always false.</p>
646
	 * <p>If the receiver or the argument is a recovered type, the answer is always false,
647
	 * unless the two types are identical or the argument is <code>java.lang.Object</code>.</p>
645
	 *
648
	 *
646
	 * @param type the type to check compatibility against
649
	 * @param type the type to check compatibility against
647
	 * @return <code>true</code> if this type is cast compatible with the
650
	 * @return <code>true</code> if this type is cast compatible with the
Lines 651-659 Link Here
651
	public boolean isCastCompatible(ITypeBinding type);
654
	public boolean isCastCompatible(ITypeBinding type);
652
655
653
	/**
656
	/**
654
	 * Returns whether this type binding represents a class type.
657
	 * Returns whether this type binding represents a class type or a recovered binding.
655
	 *
658
	 *
656
	 * @return <code>true</code> if this object represents a class,
659
	 * @return <code>true</code> if this object represents a class or a recovered binding,
657
	 *    and <code>false</code> otherwise
660
	 *    and <code>false</code> otherwise
658
	 */
661
	 */
659
	public boolean isClass();
662
	public boolean isClass();
Lines 844-850 Link Here
844
	 * as specified in section 4.10 of <em>The Java Language
847
	 * as specified in section 4.10 of <em>The Java Language
845
	 * Specification, Third Edition</em> (JLS3).
848
	 * Specification, Third Edition</em> (JLS3).
846
	 *
849
	 *
847
	 * <p>If the receiver or the argument is a recovered type, the answer is always false.</p>
850
	 * <p>If the receiver or the argument is a recovered type, the answer is always false,
851
	 * unless the two types are identical or the argument is <code>java.lang.Object</code>.</p>
848
	 *
852
	 *
849
	 * @param type the type to check compatibility against
853
	 * @param type the type to check compatibility against
850
	 * @return <code>true</code> if this type is subtype compatible with the
854
	 * @return <code>true</code> if this type is subtype compatible with the
(-)dom/org/eclipse/jdt/core/dom/RecoveredVariableBinding.java (-1 / +27 lines)
Lines 29-38 Link Here
29
	}
29
	}
30
30
31
	public ITypeBinding getDeclaringClass() {
31
	public ITypeBinding getDeclaringClass() {
32
		ASTNode parent = this.variableDeclaration.getParent();
33
		while (parent != null && parent.getNodeType() != ASTNode.TYPE_DECLARATION) {
34
			parent = parent.getParent();
35
		}
36
		if (parent != null) {
37
			return ((TypeDeclaration) parent).resolveBinding();
38
		}
32
		return null;
39
		return null;
33
	}
40
	}
34
41
35
	public IMethodBinding getDeclaringMethod() {
42
	public IMethodBinding getDeclaringMethod() {
43
		ASTNode parent = this.variableDeclaration.getParent();
44
		while (parent != null && parent.getNodeType() != ASTNode.METHOD_DECLARATION) {
45
			parent = parent.getParent();
46
		}
47
		if (parent != null) {
48
			return ((MethodDeclaration) parent).resolveBinding();
49
		}
36
		return null;
50
		return null;
37
	}
51
	}
38
52
Lines 73-79 Link Here
73
	}
87
	}
74
88
75
	public String getKey() {
89
	public String getKey() {
76
		return null;
90
		StringBuffer buffer = new StringBuffer();
91
		buffer.append("Recovered#"); //$NON-NLS-1$
92
		if (variableDeclaration != null) {
93
			buffer
94
				.append("variableDeclaration") //$NON-NLS-1$
95
				.append(this.variableDeclaration.getClass())
96
				.append(this.variableDeclaration.getName().getIdentifier())
97
				.append(this.variableDeclaration.getExtraDimensions());
98
		}
99
		return String.valueOf(buffer);
77
	}
100
	}
78
101
79
	public int getKind() {
102
	public int getKind() {
Lines 89-94 Link Here
89
	}
112
	}
90
113
91
	public boolean isEqualTo(IBinding binding) {
114
	public boolean isEqualTo(IBinding binding) {
115
		if (binding.isRecovered() && binding.getKind() == IBinding.VARIABLE) {
116
			return this.getKey().equals(binding.getKey());
117
		}
92
		return false;
118
		return false;
93
	}
119
	}
94
120
(-)dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java (-10 / +7 lines)
Lines 358-374 Link Here
358
	/*
358
	/*
359
	 * Method declared on BindingResolver.
359
	 * Method declared on BindingResolver.
360
	 */
360
	 */
361
	synchronized ITypeBinding getTypeBinding(RecoveredTypeBinding recoveredTypeBinding) {
361
	synchronized ITypeBinding getTypeBinding(RecoveredTypeBinding recoveredTypeBinding, int dimensions) {
362
		if (recoveredTypeBinding== null) {
362
		if (recoveredTypeBinding== null) {
363
			return null;
363
			return null;
364
		}
364
		}
365
		ITypeBinding binding = (ITypeBinding) this.bindingTables.compilerBindingsToASTBindings.get(recoveredTypeBinding);
365
		return new RecoveredTypeBinding(this, recoveredTypeBinding, dimensions);
366
		if (binding != null) {
367
			return binding;
368
		}
369
		binding = new RecoveredTypeBinding(this, recoveredTypeBinding);
370
		this.bindingTables.compilerBindingsToASTBindings.put(recoveredTypeBinding, binding);
371
		return binding;
372
	}
366
	}
373
367
374
	synchronized IVariableBinding getVariableBinding(org.eclipse.jdt.internal.compiler.lookup.VariableBinding variableBinding, VariableDeclaration variableDeclaration) {
368
	synchronized IVariableBinding getVariableBinding(org.eclipse.jdt.internal.compiler.lookup.VariableBinding variableBinding, VariableDeclaration variableDeclaration) {
Lines 417-422 Link Here
417
		return this.getVariableBinding(variableBinding);
411
		return this.getVariableBinding(variableBinding);
418
	}
412
	}
419
413
414
	public WorkingCopyOwner getWorkingCopyOwner() {
415
		return this.workingCopyOwner;
416
	}
417
420
	/*
418
	/*
421
	 * Method declared on BindingResolver.
419
	 * Method declared on BindingResolver.
422
	 */
420
	 */
Lines 1734-1741 Link Here
1734
	 * @param dimensions the given dimensions
1732
	 * @param dimensions the given dimensions
1735
	 * @return an array type binding with the given type binding and the given
1733
	 * @return an array type binding with the given type binding and the given
1736
	 * dimensions
1734
	 * dimensions
1737
	 * @throws IllegalArgumentException if the type binding represents the <code>void</code> type binding or if the
1735
	 * @throws IllegalArgumentException if the type binding represents the <code>void</code> type binding
1738
	 * given type binding is a recovered binding 
1739
	 */
1736
	 */
1740
	ITypeBinding resolveArrayType(ITypeBinding typeBinding, int dimensions) {
1737
	ITypeBinding resolveArrayType(ITypeBinding typeBinding, int dimensions) {
1741
		if (typeBinding.isRecovered()) throw new IllegalArgumentException("Cannot be called on a recovered type binding"); //$NON-NLS-1$
1738
		if (typeBinding.isRecovered()) throw new IllegalArgumentException("Cannot be called on a recovered type binding"); //$NON-NLS-1$
(-)dom/org/eclipse/jdt/core/dom/IBinding.java (-1 / +1 lines)
Lines 274-280 Link Here
274
	 * </p>
274
	 * </p>
275
	 * <p>Note that the key for annotation bindings and member value pair bindings is
275
	 * <p>Note that the key for annotation bindings and member value pair bindings is
276
	 * not yet implemented. This returns <code>null</code> for these 2 kinds of bindings.<br>
276
	 * not yet implemented. This returns <code>null</code> for these 2 kinds of bindings.<br>
277
	 * <code>null</code> is also returned for recovered bindings
277
	 * Recovered bindings have a unique key.
278
	 * </p>
278
	 * </p>
279
	 *
279
	 *
280
	 * @return the key for this binding
280
	 * @return the key for this binding

Return to bug 180905