-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependency considers annotations #171
Dependencies now consider annotations, nested annotations and annotation parameters. * Dependencies from and to class, field, method and constructor annotations. * Dependencies from and to annotation parameters. * Dependencies from and to nested annotations (and parameters).
- Loading branch information
Showing
77 changed files
with
2,530 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...nit-example/example-junit4/src/test/resources/frozen/a81a2b54-5a18-4145-b544-7a580aba0425
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
Class <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService> implements interface <com.tngtech.archunit.example.layers.service.ServiceInterface> in (DaoCallingService.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> has annotation member of type <com.tngtech.archunit.example.layers.service.ServiceType> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> has annotation member of type <com.tngtech.archunit.example.layers.service.SimpleServiceAnnotation> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> is annotated with <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.impl.ServiceImplementation> implements interface <com.tngtech.archunit.example.layers.service.ServiceInterface> in (ServiceImplementation.java:0) | ||
Constructor <com.tngtech.archunit.example.layers.SomeMediator.<init>(com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules)> has parameter of type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeMediator.java:0) | ||
Field <com.tngtech.archunit.example.layers.SomeMediator.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeMediator.java:0) | ||
Field <com.tngtech.archunit.example.layers.controller.SomeController.otherService> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeController.java:0) | ||
Field <com.tngtech.archunit.example.layers.controller.SomeController.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules> in (SomeController.java:0) | ||
Field <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (DaoCallingService.java:0) | ||
Field <com.tngtech.archunit.example.layers.service.ServiceType.$VALUES> has type <[Lcom.tngtech.archunit.example.layers.service.ServiceType;> in (ServiceType.java:0) | ||
Field <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules.myEntityManager> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules$MyEntityManager> in (ServiceViolatingDaoRules.java:0) | ||
Method <com.tngtech.archunit.example.layers.SomeMediator.violateLayerRulesIndirectly()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules.doSomething()> in (SomeMediator.java:15) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> calls constructor <com.tngtech.archunit.example.layers.service.ServiceHelper.<init>()> in (SomeGuiController.java:7) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> calls constructor <com.tngtech.archunit.example.layers.service.ServiceHelper.<init>(java.lang.String)> in (SomeGuiController.java:8) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> gets field <com.tngtech.archunit.example.layers.service.ServiceHelper.insecure> in (SomeGuiController.java:10) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> gets field <com.tngtech.archunit.example.layers.service.ServiceHelper.properlySecured> in (SomeGuiController.java:11) | ||
Method <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService.violateLayerRules()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules.doSomething()> in (DaoCallingService.java:14) | ||
Method <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation.serviceType()> has return type <com.tngtech.archunit.example.layers.service.ServiceType> in (ComplexServiceAnnotation.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation.simpleServiceAnnotation()> has return type <com.tngtech.archunit.example.layers.service.SimpleServiceAnnotation> in (ComplexServiceAnnotation.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceType.values()> calls method <[Lcom.tngtech.archunit.example.layers.service.ServiceType;.clone()> in (ServiceType.java:3) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceType.values()> has return type <[Lcom.tngtech.archunit.example.layers.service.ServiceType;> in (ServiceType.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules.illegallyUseEntityManager()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules$MyEntityManager.persist(java.lang.Object)> in (ServiceViolatingDaoRules.java:27) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...nit-example/example-junit5/src/test/resources/frozen/a81a2b54-5a18-4145-b544-7a580aba0425
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
Class <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService> implements interface <com.tngtech.archunit.example.layers.service.ServiceInterface> in (DaoCallingService.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> has annotation member of type <com.tngtech.archunit.example.layers.service.ServiceType> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> has annotation member of type <com.tngtech.archunit.example.layers.service.SimpleServiceAnnotation> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> is annotated with <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.impl.ServiceImplementation> implements interface <com.tngtech.archunit.example.layers.service.ServiceInterface> in (ServiceImplementation.java:0) | ||
Constructor <com.tngtech.archunit.example.layers.SomeMediator.<init>(com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules)> has parameter of type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeMediator.java:0) | ||
Field <com.tngtech.archunit.example.layers.SomeMediator.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeMediator.java:0) | ||
Field <com.tngtech.archunit.example.layers.controller.SomeController.otherService> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeController.java:0) | ||
Field <com.tngtech.archunit.example.layers.controller.SomeController.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules> in (SomeController.java:0) | ||
Field <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (DaoCallingService.java:0) | ||
Field <com.tngtech.archunit.example.layers.service.ServiceType.$VALUES> has type <[Lcom.tngtech.archunit.example.layers.service.ServiceType;> in (ServiceType.java:0) | ||
Field <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules.myEntityManager> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules$MyEntityManager> in (ServiceViolatingDaoRules.java:0) | ||
Method <com.tngtech.archunit.example.layers.SomeMediator.violateLayerRulesIndirectly()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules.doSomething()> in (SomeMediator.java:15) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> calls constructor <com.tngtech.archunit.example.layers.service.ServiceHelper.<init>()> in (SomeGuiController.java:7) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> calls constructor <com.tngtech.archunit.example.layers.service.ServiceHelper.<init>(java.lang.String)> in (SomeGuiController.java:8) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> gets field <com.tngtech.archunit.example.layers.service.ServiceHelper.insecure> in (SomeGuiController.java:10) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> gets field <com.tngtech.archunit.example.layers.service.ServiceHelper.properlySecured> in (SomeGuiController.java:11) | ||
Method <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService.violateLayerRules()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules.doSomething()> in (DaoCallingService.java:14) | ||
Method <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation.serviceType()> has return type <com.tngtech.archunit.example.layers.service.ServiceType> in (ComplexServiceAnnotation.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation.simpleServiceAnnotation()> has return type <com.tngtech.archunit.example.layers.service.SimpleServiceAnnotation> in (ComplexServiceAnnotation.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceType.values()> calls method <[Lcom.tngtech.archunit.example.layers.service.ServiceType;.clone()> in (ServiceType.java:3) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceType.values()> has return type <[Lcom.tngtech.archunit.example.layers.service.ServiceType;> in (ServiceType.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules.illegallyUseEntityManager()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules$MyEntityManager.persist(java.lang.Object)> in (ServiceViolatingDaoRules.java:27) |
5 changes: 5 additions & 0 deletions
5
...main/java/com/tngtech/archunit/example/layers/controller/ComplexControllerAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.tngtech.archunit.example.layers.controller; | ||
|
||
public @interface ComplexControllerAnnotation { | ||
SimpleControllerAnnotation simpleControllerAnnotation(); | ||
} |
4 changes: 4 additions & 0 deletions
4
.../main/java/com/tngtech/archunit/example/layers/controller/SimpleControllerAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.tngtech.archunit.example.layers.controller; | ||
|
||
public @interface SimpleControllerAnnotation { | ||
} |
14 changes: 14 additions & 0 deletions
14
...n/src/main/java/com/tngtech/archunit/example/layers/service/ComplexServiceAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.tngtech.archunit.example.layers.service; | ||
|
||
import com.tngtech.archunit.example.layers.controller.ComplexControllerAnnotation; | ||
import com.tngtech.archunit.example.layers.controller.one.SomeEnum; | ||
|
||
public @interface ComplexServiceAnnotation { | ||
ComplexControllerAnnotation controllerAnnotation(); | ||
|
||
SimpleServiceAnnotation simpleServiceAnnotation(); | ||
|
||
SomeEnum controllerEnum(); | ||
|
||
ServiceType serviceType(); | ||
} |
5 changes: 5 additions & 0 deletions
5
.../example-plain/src/main/java/com/tngtech/archunit/example/layers/service/ServiceType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.tngtech.archunit.example.layers.service; | ||
|
||
public enum ServiceType { | ||
STANDARD | ||
} |
9 changes: 9 additions & 0 deletions
9
...src/main/java/com/tngtech/archunit/example/layers/service/ServiceViolatingLayerRules.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...in/src/main/java/com/tngtech/archunit/example/layers/service/SimpleServiceAnnotation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.tngtech.archunit.example.layers.service; | ||
|
||
public @interface SimpleServiceAnnotation { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...unit-example/example-plain/src/test/resources/frozen/a81a2b54-5a18-4145-b544-7a580aba0425
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
Class <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService> implements interface <com.tngtech.archunit.example.layers.service.ServiceInterface> in (DaoCallingService.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> has annotation member of type <com.tngtech.archunit.example.layers.service.ServiceType> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> has annotation member of type <com.tngtech.archunit.example.layers.service.SimpleServiceAnnotation> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> is annotated with <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation> in (ServiceViolatingLayerRules.java:0) | ||
Class <com.tngtech.archunit.example.layers.service.impl.ServiceImplementation> implements interface <com.tngtech.archunit.example.layers.service.ServiceInterface> in (ServiceImplementation.java:0) | ||
Constructor <com.tngtech.archunit.example.layers.SomeMediator.<init>(com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules)> has parameter of type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeMediator.java:0) | ||
Field <com.tngtech.archunit.example.layers.SomeMediator.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeMediator.java:0) | ||
Field <com.tngtech.archunit.example.layers.controller.SomeController.otherService> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (SomeController.java:0) | ||
Field <com.tngtech.archunit.example.layers.controller.SomeController.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules> in (SomeController.java:0) | ||
Field <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService.service> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules> in (DaoCallingService.java:0) | ||
Field <com.tngtech.archunit.example.layers.service.ServiceType.$VALUES> has type <[Lcom.tngtech.archunit.example.layers.service.ServiceType;> in (ServiceType.java:0) | ||
Field <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules.myEntityManager> has type <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules$MyEntityManager> in (ServiceViolatingDaoRules.java:0) | ||
Method <com.tngtech.archunit.example.layers.SomeMediator.violateLayerRulesIndirectly()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules.doSomething()> in (SomeMediator.java:15) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> calls constructor <com.tngtech.archunit.example.layers.service.ServiceHelper.<init>()> in (SomeGuiController.java:7) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> calls constructor <com.tngtech.archunit.example.layers.service.ServiceHelper.<init>(java.lang.String)> in (SomeGuiController.java:8) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> gets field <com.tngtech.archunit.example.layers.service.ServiceHelper.insecure> in (SomeGuiController.java:10) | ||
Method <com.tngtech.archunit.example.layers.controller.SomeGuiController.callServiceLayer()> gets field <com.tngtech.archunit.example.layers.service.ServiceHelper.properlySecured> in (SomeGuiController.java:11) | ||
Method <com.tngtech.archunit.example.layers.persistence.layerviolation.DaoCallingService.violateLayerRules()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingLayerRules.doSomething()> in (DaoCallingService.java:14) | ||
Method <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation.serviceType()> has return type <com.tngtech.archunit.example.layers.service.ServiceType> in (ComplexServiceAnnotation.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ComplexServiceAnnotation.simpleServiceAnnotation()> has return type <com.tngtech.archunit.example.layers.service.SimpleServiceAnnotation> in (ComplexServiceAnnotation.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceType.values()> calls method <[Lcom.tngtech.archunit.example.layers.service.ServiceType;.clone()> in (ServiceType.java:3) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceType.values()> has return type <[Lcom.tngtech.archunit.example.layers.service.ServiceType;> in (ServiceType.java:0) | ||
Method <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules.illegallyUseEntityManager()> calls method <com.tngtech.archunit.example.layers.service.ServiceViolatingDaoRules$MyEntityManager.persist(java.lang.Object)> in (ServiceViolatingDaoRules.java:27) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.