Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.jdt.internal.eval;
public class CodeSnippetTypeDeclaration extends TypeDeclaration {
public CodeSnippetTypeDeclaration(CompilationResult compilationResult){
	super(compilationResult);
Generic bytecode generation for type
public void generateCode(ClassFile enclosingClassFile) {
	if ((this. & .) != 0) return;
		if (this. == null)
			return;
		return;
	}
	try {
		// create the result for a compiled type
		ClassFile classFile = new CodeSnippetClassFile(this.enclosingClassFilefalse);
		// generate all fiels
		classFile.addFieldInfos();
		if (this..isMemberType()) {
			classFile.recordInnerClasses(this.);
else if (this..isLocalType()) {
			enclosingClassFile.recordInnerClasses(this.);
			classFile.recordInnerClasses(this.);
		}
		TypeVariableBinding[] typeVariables = this..typeVariables();
		for (int i = 0, max = typeVariables.lengthi < maxi++) {
			TypeVariableBinding typeVariableBinding = typeVariables[i];
			if ((typeVariableBinding.tagBits & .) != 0) {
				Util.recordNestedType(classFiletypeVariableBinding);
			}
		}
		if (this. != null) {
			for (int i = 0, max = this..lengthi < maxi++) {
				TypeDeclaration memberType = this.[i];
				classFile.recordInnerClasses(memberType.binding);
				memberType.generateCode(this.classFile);
			}
		}
		// generate all methods
		classFile.setForMethodInfos();
		if (this. != null) {
			for (int i = 0, max = this..lengthi < maxi++) {
				this.[i].generateCode(this.classFile);
			}
		}
		// generate all methods
		classFile.addSpecialMethods();
		if (this.){ // trigger problem type generation for code gen errors
		}
		// finalize the compiled type result
		classFile.addAttributes();
catch (AbortType e) {
		if (this. == null)
			return;
	}
New to GrepCode? Check out our FAQ X