summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-01-14 17:33:36 +0000
committerjhugunin <jhugunin>2003-01-14 17:33:36 +0000
commita5fb21459045ea1ed295c21836672eecf2ca0242 (patch)
treeaf4f1b261483237ff2d2484e7245a8dc41048d0f
parent08c86843265088699f88a4fedc4c78c5d7081d6a (diff)
downloadaspectj-a5fb21459045ea1ed295c21836672eecf2ca0242.tar.gz
aspectj-a5fb21459045ea1ed295c21836672eecf2ca0242.zip
renamed "declare dominates" to "declare precedence"
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java2
-rw-r--r--org.aspectj.ajdt.core/testdata/src1/UnimplementedSyntax.java2
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BasicCommandTestCase.java2
-rw-r--r--tests/base/test117/Driver.java2
-rw-r--r--tests/errors/CircularDominates.java6
-rw-r--r--tests/new/AdviceOrdering.java16
-rw-r--r--tests/new/Counting1.java2
-rw-r--r--tests/new/DeclarationCollisionCE.java2
-rw-r--r--tests/new/DominatesTypePattern.java2
-rw-r--r--tests/new/DominatesTypePatternCE.java2
-rw-r--r--tests/new/MultiDispatchCp.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PatternParser.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java4
14 files changed, 27 insertions, 23 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java
index 26b4be2a0..c6a4a3b58 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectDeclaration.java
@@ -76,7 +76,7 @@ public class AspectDeclaration extends MemberTypeDeclaration {
if (dominatesPattern != null) {
scope.problemReporter().signalError(
dominatesPattern.getStart(), dominatesPattern.getEnd(),
- "dominates has changed for 1.1, use 'declare dominates: " +
+ "dominates has changed for 1.1, use 'declare precedence: " +
new String(this.name) + ", " + dominatesPattern.toString() + ";' " +
"in the body of the aspect instead");
}
diff --git a/org.aspectj.ajdt.core/testdata/src1/UnimplementedSyntax.java b/org.aspectj.ajdt.core/testdata/src1/UnimplementedSyntax.java
index 3ea1a1685..de99c1905 100644
--- a/org.aspectj.ajdt.core/testdata/src1/UnimplementedSyntax.java
+++ b/org.aspectj.ajdt.core/testdata/src1/UnimplementedSyntax.java
@@ -18,6 +18,8 @@ aspect C {
pointcut p(): handler(Foo);
pointcut p2(): initialization(Object.new(..));
+
+ declare dominates: A, B;
}
aspect D a b c {} \ No newline at end of file
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BasicCommandTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BasicCommandTestCase.java
index 2ee04a21d..22e8a6412 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BasicCommandTestCase.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BasicCommandTestCase.java
@@ -82,7 +82,7 @@ public class BasicCommandTestCase extends CommandTestCase {
public void testUnimplementedSyntax() {
checkCompile("src1/UnimplementedSyntax.java",
- new int[] {5, 15, 16, 23});
+ new int[] {5, 15, 16, 22, 25});
}
public void testXlintWarn() {
checkCompile("src1/Xlint.java", NO_ERRORS);
diff --git a/tests/base/test117/Driver.java b/tests/base/test117/Driver.java
index 9abfb1789..c8cf1a2b3 100644
--- a/tests/base/test117/Driver.java
+++ b/tests/base/test117/Driver.java
@@ -111,7 +111,7 @@ aspect A1 {
}
aspect A2 {
- declare dominates: A2, A1;
+ declare precedence: A2, A1;
int around() : set(int C1.f) && within(A1) {
return C1.f = 3;
diff --git a/tests/errors/CircularDominates.java b/tests/errors/CircularDominates.java
index 3db4b691e..107135829 100644
--- a/tests/errors/CircularDominates.java
+++ b/tests/errors/CircularDominates.java
@@ -6,17 +6,17 @@ class C {
}
}
-aspect A1 { declare dominates: A1, A2;
+aspect A1 { declare precedence: A1, A2;
pointcut cut(): target(C) && execution(void a());
before(): A1.cut() { T.add("A1"); }
}
-aspect A2 { declare dominates: A2, A3;
+aspect A2 { declare precedence: A2, A3;
before(): A1.cut() { T.add("A2"); }
}
-aspect A3 { declare dominates: A3, A1;
+aspect A3 { declare precedence: A3, A1;
before(): A1.cut() { T.add("A3"); }
}
diff --git a/tests/new/AdviceOrdering.java b/tests/new/AdviceOrdering.java
index a67dc57c6..a5f4103c6 100644
--- a/tests/new/AdviceOrdering.java
+++ b/tests/new/AdviceOrdering.java
@@ -84,21 +84,21 @@ aspect FlowCheck {
// This cluster of aspects checks that the partial order rules work
//aspect A1 dominates A2, B1 {
-aspect A1 { declare dominates: A1, A2 || B1;
+aspect A1 { declare precedence: A1, A2 || B1;
pointcut cut() : target(C) && call(void a());
before(): A1.cut() { T.add("A1"); }
}
-aspect A2 { declare dominates: A2, B1;
+aspect A2 { declare precedence: A2, B1;
before(): A1.cut() { T.add("A2"); }
}
-aspect A3 { declare dominates: A3, A4, A1;
+aspect A3 { declare precedence: A3, A4, A1;
before(): A1.cut() { T.add("A3"); }
}
-aspect A4 { declare dominates: A4, A1;
+aspect A4 { declare precedence: A4, A1;
before(): A1.cut() { T.add("A4"); }
}
@@ -109,17 +109,17 @@ aspect B1 {
//aspect C1 dominates C2, C3 {
-aspect C1 { declare dominates: C1, C2 || C3;
+aspect C1 { declare precedence: C1, C2 || C3;
before(): A1.cut() { T.add("C1"); }
}
-aspect C2 { declare dominates: C2, C3;
+aspect C2 { declare precedence: C2, C3;
before(): A1.cut() { T.add("C2"); }
}
-aspect C3 { declare dominates: C3, C4;
+aspect C3 { declare precedence: C3, C4;
before(): A1.cut() { T.add("C3"); }
}
//aspect C4 dominates A1, A2, A3, A4, B1 {
-aspect C4 { declare dominates: C4, (A1 || A2 || A3 || A4 || B1);
+aspect C4 { declare precedence: C4, (A1 || A2 || A3 || A4 || B1);
before(): A1.cut() { T.add("C4"); }
}
diff --git a/tests/new/Counting1.java b/tests/new/Counting1.java
index 6027409e2..62cb32528 100644
--- a/tests/new/Counting1.java
+++ b/tests/new/Counting1.java
@@ -142,7 +142,7 @@ aspect MoveTracking {
}
}
-aspect Mobility { declare dominates: Mobility, MoveTracking;
+aspect Mobility { declare precedence: Mobility, MoveTracking;
private static boolean enableMoves = true;
diff --git a/tests/new/DeclarationCollisionCE.java b/tests/new/DeclarationCollisionCE.java
index b9c8d7445..452eb377c 100644
--- a/tests/new/DeclarationCollisionCE.java
+++ b/tests/new/DeclarationCollisionCE.java
@@ -10,7 +10,7 @@ public class DeclarationCollisionCE {
class C {}
// bug: dominates clause prevents collision error
-abstract aspect AA { declare dominates: AA, B;
+abstract aspect AA { declare precedence: AA, B;
// same result if this line is uncommented
//public String C.title() { return "[AA] C.title()"; }
}
diff --git a/tests/new/DominatesTypePattern.java b/tests/new/DominatesTypePattern.java
index 1409241fb..9edc5d5ea 100644
--- a/tests/new/DominatesTypePattern.java
+++ b/tests/new/DominatesTypePattern.java
@@ -12,7 +12,7 @@ public class DominatesTypePattern {
class C {}
// works if A is specified explicitly
-abstract aspect AA { declare dominates: AA, (AA+ && !AA); // error: should dominate A
+abstract aspect AA { declare precedence: AA, (AA+ && !AA); // error: should dominate A
public String C.method() { return "pass"; }
}
diff --git a/tests/new/DominatesTypePatternCE.java b/tests/new/DominatesTypePatternCE.java
index a9787394d..962a9ed04 100644
--- a/tests/new/DominatesTypePatternCE.java
+++ b/tests/new/DominatesTypePatternCE.java
@@ -12,7 +12,7 @@ public class DominatesTypePatternCE {
class C {}
// works if A is specified explicitly
-abstract aspect AA { declare dominates: AA, AA+; // CE, AA is matched by both pieces
+abstract aspect AA { declare precedence: AA, AA+; // CE, AA is matched by both pieces
public String C.method() { return "pass"; }
}
diff --git a/tests/new/MultiDispatchCp.java b/tests/new/MultiDispatchCp.java
index a373bab55..fa7330601 100644
--- a/tests/new/MultiDispatchCp.java
+++ b/tests/new/MultiDispatchCp.java
@@ -68,7 +68,7 @@ aspect MultiCall extends Multi {
// dominates should have no effect as call join points
// always come before executions
-aspect MultiExec extends Multi { declare dominates: MultiExec, MultiCall;
+aspect MultiExec extends Multi { declare precedence: MultiExec, MultiCall;
public static boolean enabled = false;
String getPrefix() { return "exec"; }
diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java b/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java
index 1d354f0cc..b5c9f563f 100644
--- a/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java
+++ b/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java
@@ -34,7 +34,7 @@ public class DeclareDominates extends Declare {
public String toString() {
StringBuffer buf = new StringBuffer();
- buf.append("declare dominates: ");
+ buf.append("declare precedence: ");
buf.append(patterns);
buf.append(";");
return buf.toString();
diff --git a/weaver/src/org/aspectj/weaver/patterns/PatternParser.java b/weaver/src/org/aspectj/weaver/patterns/PatternParser.java
index f29cced68..315272981 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PatternParser.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PatternParser.java
@@ -92,8 +92,10 @@ public class PatternParser {
ret = parseErrorOrWarning(true);
} else if (kind.equals("warning")) {
ret = parseErrorOrWarning(false);
- } else if (kind.equals("dominates")) {
+ } else if (kind.equals("precedence")) {
ret = parseDominates();
+ } else if (kind.equals("dominates")) {
+ throw new ParserException("name changed to declare precedence", tokenSource.peek(-2));
} else if (kind.equals("parents")) {
ret = parseParents();
} else if (kind.equals("soft")) {
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
index bfa222ed6..270faf6fc 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
@@ -83,7 +83,7 @@ public class WeaveOrderTestCase extends WeaveTestCase {
public void testDominates() {
Declare dom =
- new PatternParser("declare dominates: java.lang.String, java.lang.Throwable").parseDeclare();
+ new PatternParser("declare precedence: java.lang.String, java.lang.Throwable").parseDeclare();
//??? concretize dom
ResolvedTypeX aType = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(aType);
@@ -111,7 +111,7 @@ public class WeaveOrderTestCase extends WeaveTestCase {
public void testDominatesHarder() {
Declare dom =
- new PatternParser("declare dominates: *, java.lang.String, java.lang.Throwable").parseDeclare();
+ new PatternParser("declare precedence: *, java.lang.String, java.lang.Throwable").parseDeclare();
//??? concretize dom
ResolvedTypeX aType = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(aType);