View | Details | Raw Unified | Return to bug 298238
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ClassFile.java (-8 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 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 191-196 Link Here
191
					AbstractMethodDeclaration methodDecl = methodDecls[i];
191
					AbstractMethodDeclaration methodDecl = methodDecls[i];
192
					MethodBinding method = methodDecl.binding;
192
					MethodBinding method = methodDecl.binding;
193
					if (method == null || method.isConstructor()) continue;
193
					if (method == null || method.isConstructor()) continue;
194
					method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
194
					classFile.addAbstractMethod(methodDecl, method);
195
					classFile.addAbstractMethod(methodDecl, method);
195
				}
196
				}
196
			} else {
197
			} else {
Lines 209-215 Link Here
209
			}
210
			}
210
			// add abstract methods
211
			// add abstract methods
211
			classFile.addDefaultAbstractMethods();
212
			classFile.addDefaultAbstractMethods();
212
			//classFile.addSpecialMethods();
213
		}
213
		}
214
214
215
		// propagate generation of (problem) member types
215
		// propagate generation of (problem) member types
Lines 260-276 Link Here
260
260
261
	/**
261
	/**
262
	 * INTERNAL USE-ONLY
262
	 * INTERNAL USE-ONLY
263
	 * Generate the byte for a problem method info that correspond to a boggus method.
263
	 * Generate the byte for a problem method info that correspond to a bogus method.
264
	 *
264
	 *
265
	 * @param method org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
265
	 * @param method org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
266
	 * @param methodBinding org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
266
	 * @param methodBinding org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
267
	 */
267
	 */
268
	public void addAbstractMethod(
268
	public void addAbstractMethod(
269
		AbstractMethodDeclaration method,
269
			AbstractMethodDeclaration method,
270
		MethodBinding methodBinding) {
270
			MethodBinding methodBinding) {
271
272
		// force the modifiers to be public and abstract
273
		methodBinding.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
274
271
275
		this.generateMethodInfoHeader(methodBinding);
272
		this.generateMethodInfoHeader(methodBinding);
276
		int methodAttributeOffset = this.contentsOffset;
273
		int methodAttributeOffset = this.contentsOffset;
(-)eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java (-1 / +13 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 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 140-145 Link Here
140
	ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true);
140
	ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true);
141
141
142
	// inner attributes
142
	// inner attributes
143
	if (typeBinding.hasMemberTypes()) {
144
		// see bug 180109
145
		ReferenceBinding[] members = typeBinding.memberTypes;
146
		for (int i = 0, l = members.length; i < l; i++)
147
			classFile.recordInnerClasses(members[i]);
148
	}
149
	// TODO (olivier) handle cases where a field cannot be generated (name too long)
150
	// TODO (olivier) handle too many methods
151
	// inner attributes
143
	if (typeBinding.isNestedType()) {
152
	if (typeBinding.isNestedType()) {
144
		classFile.recordInnerClasses(typeBinding);
153
		classFile.recordInnerClasses(typeBinding);
145
	}
154
	}
Lines 180-185 Link Here
180
				AbstractMethodDeclaration methodDecl = methodDecls[i];
189
				AbstractMethodDeclaration methodDecl = methodDecls[i];
181
				MethodBinding method = methodDecl.binding;
190
				MethodBinding method = methodDecl.binding;
182
				if (method == null || method.isConstructor()) continue;
191
				if (method == null || method.isConstructor()) continue;
192
				method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
183
				classFile.addAbstractMethod(methodDecl, method);
193
				classFile.addAbstractMethod(methodDecl, method);
184
			}
194
			}
185
		} else {
195
		} else {
Lines 189-194 Link Here
189
				if (method == null) continue;
199
				if (method == null) continue;
190
				if (method.isConstructor()) {
200
				if (method.isConstructor()) {
191
					classFile.addProblemConstructor(methodDecl, method, problemsCopy);
201
					classFile.addProblemConstructor(methodDecl, method, problemsCopy);
202
				} else if (method.isAbstract()) {
203
					classFile.addAbstractMethod(methodDecl, method);
192
				} else {
204
				} else {
193
					classFile.addProblemMethod(methodDecl, method, problemsCopy);
205
					classFile.addProblemMethod(methodDecl, method, problemsCopy);
194
				}
206
				}

Return to bug 298238