Browse Source

AspectJ6: picking up compiler interface changes

tags/V1_6_0M1
aclement 16 years ago
parent
commit
c3a96ab736

+ 8
- 4
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java View File

import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile; import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult; import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.*; import org.aspectj.org.eclipse.jdt.internal.compiler.ast.*;
import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.*; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.*;
import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser; import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser;


MethodDeclaration pre = new MethodDeclaration(compilationResult); MethodDeclaration pre = new MethodDeclaration(compilationResult);
pre.modifiers = AccPublic | AccStatic;
pre.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic;
pre.returnType = AstUtil.makeTypeReference(objectArrayBinding); pre.returnType = AstUtil.makeTypeReference(objectArrayBinding);
pre.selector = NameMangler.postIntroducedConstructor(aspectTypeX, targetTypeX).toCharArray(); pre.selector = NameMangler.postIntroducedConstructor(aspectTypeX, targetTypeX).toCharArray();
newArray.initializer = init; newArray.initializer = init;
newArray.type = AstUtil.makeTypeReference(scope.getJavaLangObject()); newArray.type = AstUtil.makeTypeReference(scope.getJavaLangObject());
newArray.dimensions = new Expression[1]; newArray.dimensions = new Expression[1];
newArray.constant = NotAConstant;
newArray.constant = Constant.NotAConstant;


if (explicitConstructor.alwaysNeedsAccessMethod()) { if (explicitConstructor.alwaysNeedsAccessMethod()) {
explicitConstructor = explicitConstructor.getAccessMethod(true); explicitConstructor = explicitConstructor.getAccessMethod(true);
} }
if (explicitConstructor instanceof ParameterizedMethodBinding) {
explicitConstructor = explicitConstructor.original();
}
((NewConstructorTypeMunger)munger).setExplicitConstructor( ((NewConstructorTypeMunger)munger).setExplicitConstructor(
world.makeResolvedMember(explicitConstructor)); world.makeResolvedMember(explicitConstructor));
} else { } else {
EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope); EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope);
classFile.extraAttributes.add(new EclipseAttributeAdapter(makeAttribute(world))); classFile.extraAttributes.add(new EclipseAttributeAdapter(makeAttribute(world)));
super.generateCode(classScope, classFile); super.generateCode(classScope, classFile);
// classFile.codeStream.generateAttributes &= ~ClassFileConstants.ATTR_VARS;
preMethod.generateCode(classScope, classFile); preMethod.generateCode(classScope, classFile);
} }
protected Shadow.Kind getShadowKindForBody() { protected Shadow.Kind getShadowKindForBody() {

Loading…
Cancel
Save