private void addMissingAbstractProblemMethod(MethodDeclaration methodDeclaration, MethodBinding methodBinding, CategorizedProblem problem, CompilationResult compilationResult) { // always clear the strictfp/native/abstract bit for a problem method generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(ClassFileConstants.AccStrictfp | ClassFileConstants.AccNative | ClassFileConstants.AccAbstract)); int methodAttributeOffset = this.contentsOffset; int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute attributeNumber++; int codeAttributeOffset = this.contentsOffset; generateCodeAttributeHeader(); StringBuffer buffer = new StringBuffer(25); buffer.append("\t" + problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$ buffer.insert(0, Messages.compilation_unresolvedProblem); String problemString = buffer.toString(); this.codeStream.init(this); this.codeStream.preserveUnusedLocals = true; this.codeStream.initializeMaxLocals(methodBinding); // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "") this.codeStream.generateCodeAttributeForProblemMethod(problemString); completeCodeAttributeForMissingAbstractProblemMethod( methodBinding, codeAttributeOffset, compilationResult.getLineSeparatorPositions(), problem.getSourceLineNumber()); completeMethodInfo(methodBinding, methodAttributeOffset, attributeNumber); }
private void addMissingAbstractProblemMethod(MethodDeclaration methodDeclaration, MethodBinding methodBinding, CategorizedProblem problem, CompilationResult compilationResult) { // always clear the strictfp/native/abstract bit for a problem method generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(ClassFileConstants.AccStrictfp | ClassFileConstants.AccNative | ClassFileConstants.AccAbstract)); int methodAttributeOffset = this.contentsOffset; int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute attributeNumber++; int codeAttributeOffset = this.contentsOffset; generateCodeAttributeHeader(); StringBuffer buffer = new StringBuffer(25); buffer.append("\t" + problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$ buffer.insert(0, Messages.compilation_unresolvedProblem); String problemString = buffer.toString(); this.codeStream.init(this); this.codeStream.preserveUnusedLocals = true; this.codeStream.initializeMaxLocals(methodBinding); // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "") this.codeStream.generateCodeAttributeForProblemMethod(problemString); completeCodeAttributeForMissingAbstractProblemMethod( methodBinding, codeAttributeOffset, compilationResult.getLineSeparatorPositions(), problem.getSourceLineNumber()); completeMethodInfo(methodBinding, methodAttributeOffset, attributeNumber); }
private void addMissingAbstractProblemMethod(MethodDeclaration methodDeclaration, MethodBinding methodBinding, CategorizedProblem problem, CompilationResult compilationResult) { // always clear the strictfp/native/abstract bit for a problem method generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(ClassFileConstants.AccStrictfp | ClassFileConstants.AccNative | ClassFileConstants.AccAbstract)); int methodAttributeOffset = this.contentsOffset; int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute attributeNumber++; int codeAttributeOffset = this.contentsOffset; generateCodeAttributeHeader(); StringBuffer buffer = new StringBuffer(25); buffer.append("\t" + problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$ buffer.insert(0, Messages.compilation_unresolvedProblem); String problemString = buffer.toString(); this.codeStream.init(this); this.codeStream.preserveUnusedLocals = true; this.codeStream.initializeMaxLocals(methodBinding); // return codeStream.generateCodeAttributeForProblemMethod(comp.options.runtimeExceptionNameForCompileError, "") this.codeStream.generateCodeAttributeForProblemMethod(problemString); completeCodeAttributeForMissingAbstractProblemMethod( methodBinding, codeAttributeOffset, compilationResult.getLineSeparatorPositions(), problem.getSourceLineNumber()); completeMethodInfo(methodBinding, methodAttributeOffset, attributeNumber); }
public void addSyntheticArrayConstructor(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForArrayConstructor(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } public void addSyntheticArrayClone(SyntheticMethodBinding methodBinding) {
public void addSyntheticArrayClone(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForArrayClone(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } public void addSyntheticFactoryMethod(SyntheticMethodBinding methodBinding) {
public void addSyntheticArrayClone(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForArrayClone(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } public void addSyntheticFactoryMethod(SyntheticMethodBinding methodBinding) {
public void addSyntheticArrayClone(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForArrayClone(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } public void addSyntheticFactoryMethod(SyntheticMethodBinding methodBinding) {
public void addSyntheticEnumInitializationMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForEnumInitializationMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding); completeCodeAttributeForSyntheticMethod( true, methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; }
public void addSyntheticFactoryMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForFactoryMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticEnumInitializationMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForEnumInitializationMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding); completeCodeAttributeForSyntheticMethod( true, methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; }
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding); completeCodeAttributeForSyntheticMethod( true, methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; }
public void addSyntheticEnumInitializationMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForEnumInitializationMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding); completeCodeAttributeForSyntheticMethod( true, methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; }
public void addSyntheticFactoryMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForFactoryMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticEnumInitializationMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForEnumInitializationMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticEnumInitializationMethod(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForEnumInitializationMethod(methodBinding); completeCodeAttributeForSyntheticMethod( methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; } /**
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttributes(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding); completeCodeAttributeForSyntheticMethod( true, methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; }
public void addSyntheticSwitchTable(SyntheticMethodBinding methodBinding) { generateMethodInfoHeader(methodBinding); int methodAttributeOffset = this.contentsOffset; // this will add exception attribute, synthetic attribute, deprecated attribute,... int attributeNumber = generateMethodInfoAttribute(methodBinding); // Code attribute int codeAttributeOffset = this.contentsOffset; attributeNumber++; // add code attribute generateCodeAttributeHeader(); this.codeStream.init(this); this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding); completeCodeAttributeForSyntheticMethod( true, methodBinding, codeAttributeOffset, ((SourceTypeBinding) methodBinding.declaringClass) .scope .referenceCompilationUnit() .compilationResult .getLineSeparatorPositions()); // update the number of attributes this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8); this.contents[methodAttributeOffset] = (byte) attributeNumber; }