Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 320832
Collapse All | Expand All

(-)src/org/eclipse/jdt/internal/compiler/apt/model/ElementImpl.java (-1 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 41-46 Link Here
41
	public final Binding _binding;
41
	public final Binding _binding;
42
	
42
	
43
	protected ElementImpl(BaseProcessingEnvImpl env, Binding binding) {
43
	protected ElementImpl(BaseProcessingEnvImpl env, Binding binding) {
44
		if (null == binding) {
45
			throw new NullPointerException("Cannot pass null binding to ElementImpl c'tor"); //$NON-NLS-1$
46
		}
44
		_env = env;
47
		_env = env;
45
		_binding = binding;
48
		_binding = binding;
46
	}
49
	}
(-)src/org/eclipse/jdt/internal/compiler/apt/model/ErrorTypeElement.java (-2 / +13 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007, 2008 IBM Corporation and others.
2
 * Copyright (c) 2007, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 27-32 Link Here
27
import javax.lang.model.type.TypeMirror;
27
import javax.lang.model.type.TypeMirror;
28
28
29
import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl;
29
import org.eclipse.jdt.internal.compiler.apt.dispatch.BaseProcessingEnvImpl;
30
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
30
import org.eclipse.jdt.internal.compiler.util.Util;
31
import org.eclipse.jdt.internal.compiler.util.Util;
31
32
32
/**
33
/**
Lines 34-42 Link Here
34
 */
35
 */
35
public class ErrorTypeElement extends TypeElementImpl {
36
public class ErrorTypeElement extends TypeElementImpl {
36
	
37
	
38
	/**
39
	 * The parent ElementImpl type won't permit a null binding; it has too
40
	 * many methods that assume binding is non-null. So we use a fake binding.
41
	 */
42
	private static class NullBinding extends ReferenceBinding {
43
	}
44
	
37
	ErrorTypeElement(BaseProcessingEnvImpl env) {
45
	ErrorTypeElement(BaseProcessingEnvImpl env) {
38
		super(env, null, null);
46
		// each ErrorTypeElement gets its own NullBinding so that distinct 
47
		// elements are not .equals() to each other.
48
		super(env, new NullBinding(), null);
39
	}
49
	}
50
	
40
	/* (non-Javadoc)
51
	/* (non-Javadoc)
41
	 * @see javax.lang.model.element.TypeElement#getInterfaces()
52
	 * @see javax.lang.model.element.TypeElement#getInterfaces()
42
	 */
53
	 */

Return to bug 320832