From 34aa6add64bb6a5d420e633e6e2bcdf64234c36c Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 6 Jan 2009 22:07:36 +0000 Subject: [PATCH] 258206: package declaration support in the model --- tests/model/expected/pr115607.txt | 2 +- tests/model/expected/pr120356.txt | 6 +++--- tests/model/expected/pr131932.txt | 4 ++-- tests/model/expected/pr132130.txt | 2 +- tests/model/expected/pr141730_1.txt | 4 ++-- tests/model/expected/pr141730_2.txt | 10 +++++----- tests/model/expected/pr141730_3.txt | 14 ++++++++------ tests/model/expected/pr141730_4.txt | 12 ++++++++---- tests/model/expected/pr143924.txt | 4 ++-- tests/model/expected/pr145963_1.txt | 7 +++++-- tests/model/expected/pr145963_2.txt | 7 +++++-- tests/model/expected/pr145963_3.txt | 2 +- tests/model/expected/pr145963_4.txt | 4 +++- tests/model/expected/pr160469_1.txt | 4 +++- tests/model/expected/pr160469_2.txt | 4 +++- tests/model/expected/pr77269_1.txt | 4 +++- tests/model/expected/pr77269_2.txt | 2 +- tests/model/expected/pr77269_3.txt | 4 +++- 18 files changed, 59 insertions(+), 37 deletions(-) diff --git a/tests/model/expected/pr115607.txt b/tests/model/expected/pr115607.txt index 0f0358528..2a6a551bb 100644 --- a/tests/model/expected/pr115607.txt +++ b/tests/model/expected/pr115607.txt @@ -2,7 +2,7 @@ [java source file] [package] pr115607.java [java source file] TEST_SANDBOX\pr115607.java:1: - import declarations [import reference] + [import reference] I [annotation] TEST_SANDBOX\pr115607.java:1: Simple [class] TEST_SANDBOX\pr115607.java:3: pr115607 [aspect] TEST_SANDBOX\pr115607.java:5: diff --git a/tests/model/expected/pr120356.txt b/tests/model/expected/pr120356.txt index 29f6438c8..c4060f72e 100644 --- a/tests/model/expected/pr120356.txt +++ b/tests/model/expected/pr120356.txt @@ -2,7 +2,7 @@ [java source file] [package] A.java [java source file] TEST_SANDBOX\A.java:1: - import declarations [import reference] + [import reference] org.aspectj.lang.annotation.DeclareError [import reference] TEST_SANDBOX\A.java:4: org.aspectj.lang.annotation.DeclareWarning [import reference] TEST_SANDBOX\A.java:3: org.aspectj.lang.annotation.Aspect [import reference] TEST_SANDBOX\A.java:2: @@ -10,15 +10,15 @@ warning [field] TEST_SANDBOX\A.java:10: error [field] TEST_SANDBOX\A.java:13: C.java [java source file] TEST_SANDBOX\C.java:1: - import declarations [import reference] + [import reference] C [class] TEST_SANDBOX\C.java:3: warningMethod() [method] TEST_SANDBOX\C.java:5: badMethod() [method] TEST_SANDBOX\C.java:8: === END OF MODEL REPORT ========= === RELATIONSHIPS REPORT ========= After a batch build +(targets=1) <{C.java[C~badMethod (matches declare) <{A.java}A^error (targets=1) <{C.java[C~warningMethod (matches declare) <{A.java}A^warning (targets=1) <{A.java}A^warning (matched by) <{C.java[C~warningMethod -(targets=1) <{C.java[C~badMethod (matches declare) <{A.java}A^error (targets=1) <{A.java}A^error (matched by) <{C.java[C~badMethod === END OF RELATIONSHIPS REPORT == === Properties of the model and relationships map ===== diff --git a/tests/model/expected/pr131932.txt b/tests/model/expected/pr131932.txt index 0955fb19e..4f038a447 100644 --- a/tests/model/expected/pr131932.txt +++ b/tests/model/expected/pr131932.txt @@ -2,7 +2,7 @@ [java source file] [package] pr131932.aj [java source file] TEST_SANDBOX\pr131932.aj:1: - import declarations [import reference] + [import reference] java.util.List [import reference] TEST_SANDBOX\pr131932.aj:1: Slide74 [aspect] TEST_SANDBOX\pr131932.aj:3: Bar [class] TEST_SANDBOX\pr131932.aj:13: @@ -16,9 +16,9 @@ (targets=1) <*pr131932.aj}Slide74)Bar.children (declared on) <*pr131932.aj}Slide74[Bar (targets=1) <*pr131932.aj}Slide74)Bar.getFirst (declared on) <*pr131932.aj}Slide74[Bar (targets=1) <*pr131932.aj[Foo (aspect declarations) <*pr131932.aj}Slide74)Foo.Foo_new)Qjava.util.List\; -(targets=1) <*pr131932.aj}Slide74)Foo.Foo_new)Qjava.util.List\; (declared on) <*pr131932.aj[Foo (targets=2) <*pr131932.aj}Slide74[Bar (aspect declarations) <*pr131932.aj}Slide74)Bar.getFirst (targets=2) <*pr131932.aj}Slide74[Bar (aspect declarations) <*pr131932.aj}Slide74)Bar.children +(targets=1) <*pr131932.aj}Slide74)Foo.Foo_new)Qjava.util.List\; (declared on) <*pr131932.aj[Foo === END OF RELATIONSHIPS REPORT == === Properties of the model and relationships map ===== import reference=2 diff --git a/tests/model/expected/pr132130.txt b/tests/model/expected/pr132130.txt index f64bc7cfd..e4b7e0968 100644 --- a/tests/model/expected/pr132130.txt +++ b/tests/model/expected/pr132130.txt @@ -2,7 +2,7 @@ [java source file] [package] pr132130.aj [java source file] TEST_SANDBOX\pr132130.aj:1: - import declarations [import reference] + [import reference] basic [aspect] TEST_SANDBOX\pr132130.aj:1: declare @method: * debit(..) : @Secured(role = "supervisor") [declare @method] TEST_SANDBOX\pr132130.aj:3: declare @constructor: BankAccount+.new(..) : @Secured(role = "supervisor") [declare @constructor] TEST_SANDBOX\pr132130.aj:4: diff --git a/tests/model/expected/pr141730_1.txt b/tests/model/expected/pr141730_1.txt index 479b2a5f0..2f6eb6f9d 100644 --- a/tests/model/expected/pr141730_1.txt +++ b/tests/model/expected/pr141730_1.txt @@ -2,7 +2,7 @@ [java source file] [package] pr141730.aj [java source file] TEST_SANDBOX\pr141730.aj:1: - import declarations [import reference] + [import reference] A [aspect] TEST_SANDBOX\pr141730.aj:1: p() [pointcut] TEST_SANDBOX\pr141730.aj:3: before(): p.. [advice] TEST_SANDBOX\pr141730.aj:5: @@ -35,12 +35,12 @@ (targets=11) <*pr141730.aj}A&before (advises) <*pr141730.aj[C~main~\[QString; (targets=11) <*pr141730.aj}A&before (advises) <*pr141730.aj[C~multiMethod~\[\[QString; (targets=11) <*pr141730.aj}A&before (advises) <*pr141730.aj[C~intArray~\[I +(targets=1) <*pr141730.aj[C~multiMethod~\[\[QString; (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj[C~stringMethod~QString; (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj[C~intArray~\[I (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj[C~myClassMethod~LMyClass; (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj[C~C (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj}A (advised by) <*pr141730.aj}A&before -(targets=1) <*pr141730.aj[C~multiMethod~\[\[QString; (advised by) <*pr141730.aj}A&before === END OF RELATIONSHIPS REPORT == === Properties of the model and relationships map ===== method=8 diff --git a/tests/model/expected/pr141730_2.txt b/tests/model/expected/pr141730_2.txt index 565f2471d..49282247b 100644 --- a/tests/model/expected/pr141730_2.txt +++ b/tests/model/expected/pr141730_2.txt @@ -2,7 +2,7 @@ [java source file] [package] pr141730.aj [java source file] TEST_SANDBOX\pr141730.aj:1: - import declarations [import reference] + [import reference] java.util.List [import reference] TEST_SANDBOX\pr141730.aj:1: A [aspect] TEST_SANDBOX\pr141730.aj:3: p() [pointcut] TEST_SANDBOX\pr141730.aj:5: @@ -14,17 +14,17 @@ MyGenericClass [class] TEST_SANDBOX\pr141730.aj:22: === END OF MODEL REPORT ========= === RELATIONSHIPS REPORT ========= After a batch build -(targets=1) <*pr141730.aj[MyClass (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj[MyGenericClass (advised by) <*pr141730.aj}A&before -(targets=1) <*pr141730.aj[C~genericMethod2~QMyGenericClass\; (advised by) <*pr141730.aj}A&before +(targets=1) <*pr141730.aj[MyClass (advised by) <*pr141730.aj}A&before +(targets=1) <*pr141730.aj[C~genericMethod~Qjava.util.List\; (advised by) <*pr141730.aj}A&before (targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj}A (targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj[C (targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj[C~genericMethod~Qjava.util.List\; (targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj[C~genericMethod2~QMyGenericClass\; -(targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj[MyGenericClass (targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj[MyClass -(targets=1) <*pr141730.aj[C~genericMethod~Qjava.util.List\; (advised by) <*pr141730.aj}A&before +(targets=6) <*pr141730.aj}A&before (advises) <*pr141730.aj[MyGenericClass (targets=1) <*pr141730.aj[C (advised by) <*pr141730.aj}A&before +(targets=1) <*pr141730.aj[C~genericMethod2~QMyGenericClass\; (advised by) <*pr141730.aj}A&before (targets=1) <*pr141730.aj}A (advised by) <*pr141730.aj}A&before === END OF RELATIONSHIPS REPORT == === Properties of the model and relationships map ===== diff --git a/tests/model/expected/pr141730_3.txt b/tests/model/expected/pr141730_3.txt index 2b3c3fb34..07ce50218 100644 --- a/tests/model/expected/pr141730_3.txt +++ b/tests/model/expected/pr141730_3.txt @@ -2,7 +2,8 @@ [java source file] foo [package] MyFoo.java [java source file] TEST_SANDBOX\MyFoo.java:1: - import declarations [import reference] + foo [package declaration] TEST_SANDBOX\MyFoo.java:1: + [import reference] MyFoo [class] TEST_SANDBOX\MyFoo.java:3: callMain() [method] TEST_SANDBOX\MyFoo.java:5: method-call(void foo.MyFoo.main()) [code] TEST_SANDBOX\MyFoo.java:6: @@ -13,11 +14,12 @@ (targets=1) {MyBar.class (advises) [java source file] bar [package] MyBar.aj [java source file] TEST_SANDBOX\MyBar.aj:1: - import declarations [import reference] + bar [package declaration] TEST_SANDBOX\MyBar.aj:1: + [import reference] foo.* [import reference] TEST_SANDBOX\MyBar.aj:3: MyBar [aspect] TEST_SANDBOX\MyBar.aj:5: before(): [advice] TEST_SANDBOX\MyBar.aj:7: @@ -13,17 +14,19 @@ declare @constructor: *Foo.new(java.lang.String) : @MyAnnotation [declare @constructor] TEST_SANDBOX\MyBar.aj:15: declare @field: int *Foo.* : @MyAnnotation [declare @field] TEST_SANDBOX\MyBar.aj:16: MyAnnotation.java [java source file] TEST_SANDBOX\MyAnnotation.java:1: - import declarations [import reference] + bar [package declaration] TEST_SANDBOX\MyAnnotation.java:1: + [import reference] MyAnnotation [annotation] TEST_SANDBOX\MyAnnotation.java:3: NewClass.java [java source file] TEST_SANDBOX\NewClass.java:1: - import declarations [import reference] + bar [package declaration] TEST_SANDBOX\NewClass.java:1: + [import reference] NewClass [class] TEST_SANDBOX\NewClass.java:3: === END OF MODEL REPORT ========= === RELATIONSHIPS REPORT ========= After a batch build +(targets=1) [java source file] [package] pr143924.aj [java source file] TEST_SANDBOX\pr143924.aj:1: - import declarations [import reference] + [import reference] DeclareAnnotation [aspect] TEST_SANDBOX\pr143924.aj:1: declare @method: * debit(..) : @Secured(role = "supervisor") [declare @method] TEST_SANDBOX\pr143924.aj:2: BankAccount [class] TEST_SANDBOX\pr143924.aj:5: @@ -10,8 +10,8 @@ Secured [annotation] TEST_SANDBOX\pr143924.aj:11: === END OF MODEL REPORT ========= === RELATIONSHIPS REPORT ========= After a batch build -(targets=1) <*pr143924.aj}DeclareAnnotation`declare \@method (annotates) <*pr143924.aj[BankAccount~debit~QString;~J (targets=1) <*pr143924.aj[BankAccount~debit~QString;~J (annotated by) <*pr143924.aj}DeclareAnnotation`declare \@method +(targets=1) <*pr143924.aj}DeclareAnnotation`declare \@method (annotates) <*pr143924.aj[BankAccount~debit~QString;~J === END OF RELATIONSHIPS REPORT == === Properties of the model and relationships map ===== method=1 diff --git a/tests/model/expected/pr145963_1.txt b/tests/model/expected/pr145963_1.txt index a0bfee878..f8f81d2bb 100644 --- a/tests/model/expected/pr145963_1.txt +++ b/tests/model/expected/pr145963_1.txt @@ -2,14 +2,16 @@ [java source file] pkg [package] SourceAspect.aj [java source file] TEST_SANDBOX\SourceAspect.aj:1: - import declarations [import reference] + pkg [package declaration] TEST_SANDBOX\SourceAspect.aj:1: + [import reference] SourceAspect [aspect] TEST_SANDBOX\SourceAspect.aj:3: declare warning: "There should be n.." [declare warning] TEST_SANDBOX\SourceAspect.aj:5: p() [pointcut] TEST_SANDBOX\SourceAspect.aj:7: before(): p.. [advice] TEST_SANDBOX\SourceAspect.aj:9: pack [package] C.java [java source file] TEST_SANDBOX\C.java:1: - import declarations [import reference] + pack [package declaration] TEST_SANDBOX\C.java:1: + [import reference] C [class] TEST_SANDBOX\C.java:3: method1() [method] TEST_SANDBOX\C.java:5: field-get(java.io.PrintStream java.lang.System.out) [code] TEST_SANDBOX\C.java:6: @@ -43,6 +45,7 @@ class=1 advice=2 pointcut=2 RelationshipMapSize=6 +package declaration=2 source folder=1 FileMapSize=2 package=3 diff --git a/tests/model/expected/pr145963_2.txt b/tests/model/expected/pr145963_2.txt index ea19d2623..84f017ba4 100644 --- a/tests/model/expected/pr145963_2.txt +++ b/tests/model/expected/pr145963_2.txt @@ -2,14 +2,16 @@ [java source file] pkg [package] SourceAspect.aj [java source file] TEST_SANDBOX\SourceAspect.aj:1: - import declarations [import reference] + pkg [package declaration] TEST_SANDBOX\SourceAspect.aj:1: + [import reference] SourceAspect [aspect] TEST_SANDBOX\SourceAspect.aj:3: declare warning: "There should be n.." [declare warning] TEST_SANDBOX\SourceAspect.aj:5: p() [pointcut] TEST_SANDBOX\SourceAspect.aj:7: before(): p.. [advice] TEST_SANDBOX\SourceAspect.aj:9: pack [package] C.java [java source file] TEST_SANDBOX\C.java:1: - import declarations [import reference] + pack [package declaration] TEST_SANDBOX\C.java:1: + [import reference] C [class] TEST_SANDBOX\C.java:3: method1() [method] TEST_SANDBOX\C.java:5: field-get(java.io.PrintStream java.lang.System.out) [code] TEST_SANDBOX\C.java:6: @@ -43,6 +45,7 @@ class=1 advice=2 pointcut=2 RelationshipMapSize=6 +package declaration=2 source folder=1 FileMapSize=2 package=3 diff --git a/tests/model/expected/pr145963_3.txt b/tests/model/expected/pr145963_3.txt index f7dc1dd8f..73bdb3f28 100644 --- a/tests/model/expected/pr145963_3.txt +++ b/tests/model/expected/pr145963_3.txt @@ -2,7 +2,7 @@ [java source file] [package] C.java [java source file] TEST_SANDBOX\C.java:1: - import declarations [import reference] + [import reference] C [class] TEST_SANDBOX\C.java:3: method1() [method] TEST_SANDBOX\C.java:5: field-get(java.io.PrintStream java.lang.System.out) [code] TEST_SANDBOX\C.java:6: diff --git a/tests/model/expected/pr145963_4.txt b/tests/model/expected/pr145963_4.txt index 178bcecdd..d03053acd 100644 --- a/tests/model/expected/pr145963_4.txt +++ b/tests/model/expected/pr145963_4.txt @@ -2,7 +2,8 @@ [java source file] pack [package] C.java [java source file] TEST_SANDBOX\C.java:1: - import declarations [import reference] + pack [package declaration] TEST_SANDBOX\C.java:1: + [import reference] C [class] TEST_SANDBOX\C.java:3: method1() [method] TEST_SANDBOX\C.java:5: field-get(java.io.PrintStream java.lang.System.out) [code] TEST_SANDBOX\C.java:6: @@ -26,6 +27,7 @@ declare warning=1 file=1 class=1 RelationshipMapSize=2 +package declaration=1 source folder=1 FileMapSize=1 package=2 diff --git a/tests/model/expected/pr160469_1.txt b/tests/model/expected/pr160469_1.txt index 67fc2d6b9..75011b373 100644 --- a/tests/model/expected/pr160469_1.txt +++ b/tests/model/expected/pr160469_1.txt @@ -2,7 +2,8 @@ [java source file] test [package] Simple.java [java source file] TEST_SANDBOX\Simple.java:1: - import declarations [import reference] + test [package declaration] TEST_SANDBOX\Simple.java:1: + [import reference] Simple [class] TEST_SANDBOX\Simple.java:3: Simple() [constructor] TEST_SANDBOX\Simple.java:5: binaries [source folder] @@ -29,6 +30,7 @@ class=1 advice=2 pointcut=1 RelationshipMapSize=3 +package declaration=1 source folder=1 FileMapSize=1 package=2 diff --git a/tests/model/expected/pr160469_2.txt b/tests/model/expected/pr160469_2.txt index d32d6a1df..957aeab33 100644 --- a/tests/model/expected/pr160469_2.txt +++ b/tests/model/expected/pr160469_2.txt @@ -2,7 +2,8 @@ [java source file] test [package] Simple.java [java source file] TEST_SANDBOX\Simple.java:1: - import declarations [import reference] + test [package declaration] TEST_SANDBOX\Simple.java:1: + [import reference] Simple [class] TEST_SANDBOX\Simple.java:3: Simple() [constructor] TEST_SANDBOX\Simple.java:5: binaries [source folder] @@ -26,6 +27,7 @@ file=1 class=1 pointcut=1 RelationshipMapSize=2 +package declaration=1 source folder=1 FileMapSize=1 package=2 diff --git a/tests/model/expected/pr77269_1.txt b/tests/model/expected/pr77269_1.txt index bdd591ea8..0e15585af 100644 --- a/tests/model/expected/pr77269_1.txt +++ b/tests/model/expected/pr77269_1.txt @@ -2,7 +2,8 @@ [java source file] pack [package] pr77269.aj [java source file] TEST_SANDBOX\pack\pr77269.aj:1: - import declarations [import reference] + pack [package declaration] TEST_SANDBOX\pack\pr77269.aj:1: + [import reference] Test [class] TEST_SANDBOX\pack\pr77269.aj:2: testMethod() [method] TEST_SANDBOX\pack\pr77269.aj:4: new Runnable() {..} [class] TEST_SANDBOX\pack\pr77269.aj:5: @@ -25,6 +26,7 @@ class=3 advice=1 pointcut=1 RelationshipMapSize=2 +package declaration=1 FileMapSize=1 package=1 java source file=2 diff --git a/tests/model/expected/pr77269_2.txt b/tests/model/expected/pr77269_2.txt index cd750034c..1a9459f5b 100644 --- a/tests/model/expected/pr77269_2.txt +++ b/tests/model/expected/pr77269_2.txt @@ -2,7 +2,7 @@ [java source file] [package] pr77269b.aj [java source file] TEST_SANDBOX\pr77269b.aj:1: - import declarations [import reference] + [import reference] Test [class] TEST_SANDBOX\pr77269b.aj:1: testMethod() [method] TEST_SANDBOX\pr77269b.aj:3: new Runnable() {..} [class] TEST_SANDBOX\pr77269b.aj:4: diff --git a/tests/model/expected/pr77269_3.txt b/tests/model/expected/pr77269_3.txt index 48fae6a5f..bac930da3 100644 --- a/tests/model/expected/pr77269_3.txt +++ b/tests/model/expected/pr77269_3.txt @@ -2,7 +2,8 @@ [java source file] pack [package] pr77269c.aj [java source file] TEST_SANDBOX\pack\pr77269c.aj:1: - import declarations [import reference] + pack [package declaration] TEST_SANDBOX\pack\pr77269c.aj:1: + [import reference] Test [class] TEST_SANDBOX\pack\pr77269c.aj:3: testMethod() [method] TEST_SANDBOX\pack\pr77269c.aj:5: new Runnable() {..} [class] TEST_SANDBOX\pack\pr77269c.aj:6: @@ -24,6 +25,7 @@ code=1 declare warning=1 class=2 RelationshipMapSize=2 +package declaration=1 FileMapSize=1 package=1 java source file=2 -- 2.39.5