summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-01-17 00:27:21 +0000
committeraclement <aclement>2008-01-17 00:27:21 +0000
commitf8b2e74a129cda256fd7fe58dea85661e6d62856 (patch)
tree9e0514384920135d0ee9a217b14872f64598be56
parentc6c22b6a6942ef6039a026fe871e72640374b160 (diff)
downloadaspectj-f8b2e74a129cda256fd7fe58dea85661e6d62856.tar.gz
aspectj-f8b2e74a129cda256fd7fe58dea85661e6d62856.zip
AspectJ6: picking up compiler interface changes
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AtAspectJAnnotationFactory.java54
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java5
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java6
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java6
4 files changed, 38 insertions, 33 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AtAspectJAnnotationFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AtAspectJAnnotationFactory.java
index bd0eb825f..965eef3a3 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AtAspectJAnnotationFactory.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AtAspectJAnnotationFactory.java
@@ -63,7 +63,7 @@ public class AtAspectJAnnotationFactory {
NormalAnnotation atAspectAnnotation = new NormalAnnotation(orgAspectJLangAnnotationAspect,pos);
if (!perclause.equals("")) {
// we have to set the value
- Expression perclauseExpr = new StringLiteral(perclause.toCharArray(),pos,pos);
+ Expression perclauseExpr = new StringLiteral(perclause.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[1];
mvps[0] = new MemberValuePair(value,pos,pos,perclauseExpr);
atAspectAnnotation.memberValuePairs = mvps;
@@ -84,10 +84,10 @@ public class AtAspectJAnnotationFactory {
long[] positions = new long[] {pos,pos,pos,pos,pos};
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
+ Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[2];
mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
- Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
+ Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
ann.memberValuePairs = mvps;
return ann;
@@ -98,10 +98,10 @@ public class AtAspectJAnnotationFactory {
long[] positions = new long[] {pos,pos,pos,pos,pos};
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
+ Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[2];
mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
- Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
+ Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
ann.memberValuePairs = mvps;
return ann;
@@ -112,12 +112,12 @@ public class AtAspectJAnnotationFactory {
long[] positions = new long[] {pos,pos,pos,pos,pos};
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
+ Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[3];
mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcExpr);
- Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos);
+ Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos,1);
mvps[1] = new MemberValuePair("returning".toCharArray(),pos,pos,argExpr);
- Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
+ Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
mvps[2] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
ann.memberValuePairs = mvps;
return ann;
@@ -128,12 +128,12 @@ public class AtAspectJAnnotationFactory {
long[] positions = new long[] {pos,pos,pos,pos,pos};
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
+ Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[3];
mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcExpr);
- Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos);
+ Expression argExpr = new StringLiteral(extraArgumentName.toCharArray(),pos,pos,1);
mvps[1] = new MemberValuePair("throwing".toCharArray(),pos,pos,argExpr);
- Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
+ Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
mvps[2] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
ann.memberValuePairs = mvps;
return ann;
@@ -144,10 +144,10 @@ public class AtAspectJAnnotationFactory {
long[] positions = new long[] {pos,pos,pos,pos,pos};
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
+ Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[2];
mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
- Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
+ Expression argNamesExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argNamesExpr);
ann.memberValuePairs = mvps;
return ann;
@@ -158,10 +158,10 @@ public class AtAspectJAnnotationFactory {
long[] positions = new long[] {pos,pos,pos,pos,pos};
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
+ Expression pcExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[2];
mvps[0] = new MemberValuePair("value".toCharArray(),pos,pos,pcExpr);
- Expression argExpr = new StringLiteral(argNames.toCharArray(),pos,pos);
+ Expression argExpr = new StringLiteral(argNames.toCharArray(),pos,pos,1);
mvps[1] = new MemberValuePair("argNames".toCharArray(),pos,pos,argExpr);
ann.memberValuePairs = mvps;
return ann;
@@ -173,8 +173,8 @@ public class AtAspectJAnnotationFactory {
for (int i = 0; i < positions.length; i++) positions[i] = pos;
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcutExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
- Expression msgExpr = new StringLiteral(message.toCharArray(),pos,pos);
+ Expression pcutExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
+ Expression msgExpr = new StringLiteral(message.toCharArray(),pos,pos,1);
Expression isErrorExpr;
if (isError) {
isErrorExpr = new TrueLiteral(pos,pos);
@@ -195,8 +195,8 @@ public class AtAspectJAnnotationFactory {
for (int i = 0; i < positions.length; i++) positions[i] = pos;
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression targetExpression = new StringLiteral(childPattern.toCharArray(),pos,pos);
- Expression parentsExpression = new StringLiteral(parentPatterns.toCharArray(),pos,pos);
+ Expression targetExpression = new StringLiteral(childPattern.toCharArray(),pos,pos,1);
+ Expression parentsExpression = new StringLiteral(parentPatterns.toCharArray(),pos,pos,1);
Expression isExtendsExpression;
if (isExtends) {
isExtendsExpression = new TrueLiteral(pos,pos);
@@ -217,8 +217,8 @@ public class AtAspectJAnnotationFactory {
for (int i = 0; i < positions.length; i++) positions[i] = pos;
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pcutExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos);
- Expression exExpr = new StringLiteral(exceptionType.toCharArray(),pos,pos);
+ Expression pcutExpr = new StringLiteral(pointcutExpression.toCharArray(),pos,pos,1);
+ Expression exExpr = new StringLiteral(exceptionType.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[2];
mvps[0] = new MemberValuePair("pointcut".toCharArray(),pos,pos,pcutExpr);
mvps[1] = new MemberValuePair("exceptionType".toCharArray(),pos,pos,exExpr);
@@ -232,9 +232,9 @@ public class AtAspectJAnnotationFactory {
for (int i = 0; i < positions.length; i++) positions[i] = pos;
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression pattExpr = new StringLiteral(patternString.toCharArray(),pos,pos);
- Expression annExpr = new StringLiteral(annString.toCharArray(),pos,pos);
- Expression kindExpr = new StringLiteral(kind.toCharArray(),pos,pos);
+ Expression pattExpr = new StringLiteral(patternString.toCharArray(),pos,pos,1);
+ Expression annExpr = new StringLiteral(annString.toCharArray(),pos,pos,1);
+ Expression kindExpr = new StringLiteral(kind.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[3];
mvps[0] = new MemberValuePair("pattern".toCharArray(),pos,pos,pattExpr);
mvps[1] = new MemberValuePair("annotation".toCharArray(),pos,pos,annExpr);
@@ -249,8 +249,8 @@ public class AtAspectJAnnotationFactory {
for (int i = 0; i < positions.length; i++) positions[i] = pos;
TypeReference annType = new QualifiedTypeReference(typeName,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression targetExpr = new StringLiteral(targetTypeName,pos,pos);
- Expression nameExpr = new StringLiteral(name,pos,pos);
+ Expression targetExpr = new StringLiteral(targetTypeName,pos,pos,1);
+ Expression nameExpr = new StringLiteral(name,pos,pos,1);
Expression modsExpr = new IntLiteral(Integer.toString(modifiers).toCharArray(),pos,pos);
MemberValuePair[] mvps = new MemberValuePair[3];
mvps[0] = new MemberValuePair("targetType".toCharArray(),pos,pos,targetExpr);
@@ -271,7 +271,7 @@ public class AtAspectJAnnotationFactory {
for (int i = 0; i < positions.length; i++) positions[i] = pos;
TypeReference annType = new QualifiedTypeReference(name,positions);
NormalAnnotation ann = new NormalAnnotation(annType,pos);
- Expression valueExpr = new StringLiteral(annValue.toCharArray(),pos,pos);
+ Expression valueExpr = new StringLiteral(annValue.toCharArray(),pos,pos,1);
MemberValuePair[] mvps = new MemberValuePair[1];
mvps[0] = new MemberValuePair(value,pos,pos,valueExpr);
ann.memberValuePairs = mvps;
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java
index 955c835f7..4c3eeff06 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java
@@ -32,6 +32,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleType
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodScope;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
@@ -80,7 +81,7 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration {
public InterTypeDeclaration(CompilationResult result, TypeReference onType) {
super(result);
setOnType(onType);
- modifiers = AccPublic | AccStatic;
+ modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic;
}
public void setOnType(TypeReference onType) {
@@ -266,7 +267,7 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration {
String array_element = (String)typeVariableAliases.get(i);
SingleTypeReference str = new SingleTypeReference(array_element.toCharArray(),0);
TypeBinding tb = str.getTypeBindingPublic(classScope);
- if (tb!=null && !(tb instanceof ProblemReferenceBinding)) {
+ if (tb!=null && !(tb instanceof ProblemReferenceBinding)) {// && !(tb instanceof TypeVariableBinding)) {
scope.problemReporter().signalError(sourceStart,sourceEnd,
"Intertype declarations can only be made on the generic type, not on a parameterized type. The name '"+
array_element+"' cannot be used as a type parameter, since it refers to a real type.");
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java
index eb3af61dc..9e2f9a7eb 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java
@@ -304,8 +304,10 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
// Build a half correct resolvedmember (makeResolvedMember understands tvars) then build a fully correct sig from it
ResolvedMember sigtemp = world.makeResolvedMemberForITD(binding,onTypeBinding,interTypeScope.getRecoveryAliases());
+ UnresolvedType returnType = sigtemp.getReturnType();
+// if (returnType.isParameterizedType() || returnType.isGenericType()) returnType = returnType.getRawType();
ResolvedMember sig = new ResolvedMemberImpl(Member.FIELD,declaringType,declaredModifiers,
- sigtemp.getReturnType(),new String(declaredSelector),UnresolvedType.NONE);
+ returnType,new String(declaredSelector),UnresolvedType.NONE);
sig.setTypeVariables(sigtemp.getTypeVariables());
NewFieldTypeMunger myMunger = new NewFieldTypeMunger(sig, null,typeVariableAliases);
@@ -315,7 +317,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration {
myMunger.getInitMethod(aspectType);
this.selector = binding.selector = me.getName().toCharArray();
this.realFieldType = this.binding.returnType;
- this.binding.returnType = TypeBinding.VoidBinding;
+ this.binding.returnType = TypeBinding.VOID;
//??? all other pieces should already match
return new EclipseTypeMunger(world, myMunger, aspectType, this);
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
index 6dad0b35a..9a457245e 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
@@ -26,7 +26,9 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope;
+import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TagBits;
import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser;
import org.aspectj.weaver.AjAttribute;
@@ -193,7 +195,7 @@ public class PointcutDeclaration extends AjMethodDeclaration {
public void resolveStatements() {
if (isAbstract()) {
- this.modifiers |= AccSemicolonBody;
+ this.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
}
@@ -250,7 +252,7 @@ public class PointcutDeclaration extends AjMethodDeclaration {
addVersionAttributeIfNecessary(classFile);
if (generateSyntheticPointcutMethod) {
- this.binding.modifiers |= AccSynthetic;
+ this.binding.modifiers |= ClassFileConstants.AccSynthetic;
super.generateCode(classScope,classFile);
}
return;