{"id":320912,"date":"2021-04-05T15:01:50","date_gmt":"2021-04-05T15:01:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320912"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320912","title":{"rendered":"\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0431\u0435\u0437 \u0441\u0441\u044b\u043b\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ArchUnit"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 Java-\u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c\u0438.&nbsp;\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u0443\u043b\u043a\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.&nbsp;\u041d\u043e \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043f\u043e\u0445\u043e\u0436\u0435, \u043e\u0442\u0441\u0442\u0430\u044e\u0442 \u043e\u0442 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 Java.&nbsp;\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u043e\u0438\u0441\u043a\u0443 \u043a\u043e\u0434\u0430 \u0431\u0435\u0437 \u0441\u0441\u044b\u043b\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ArchUnit, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Java.<\/p>\n<h4>ArchUnit<\/h4>\n<blockquote>\n<p><a href=\"https:\/\/www.archunit.org\/\" rel=\"noopener noreferrer nofollow\">ArchUnit<\/a>&nbsp;&#8212; \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0432\u0430\u0448\u0435\u0433\u043e Java-\u043a\u043e\u0434\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java.&nbsp;\u0422\u043e \u0435\u0441\u0442\u044c ArchUnit \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u0441\u043b\u043e\u044f\u043c\u0438 \u0438 \u0441\u0440\u0435\u0437\u0430\u043c\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.&nbsp;\u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430 Java \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Java \u043a\u043e\u0434\u0430.&nbsp;<\/p>\n<p>                                                                                &#8212; \u0421\u0430\u0439\u0442 Archunit<\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/blog.jdriven.com\/2018\/10\/testing-the-architecture-archunit-in-practice\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0430\u043c ArchUnit \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u0440\u0430\u043d\u0435\u0435 \u041d\u0438\u043b\u044c\u0441\u043e\u043c<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043b \u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u0440\u0430\u0442\u043a\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0440\u0430\u043d\u0435\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ArchUnit \u0441 JUnit5 \u0438 \u043b\u044f\u043c\u0431\u0434\u0430-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.&nbsp;\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 ArchUnit, \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435.&nbsp;\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u0431\u0449\u0438\u0435, \u0442\u0430\u043a \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<h4>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432<\/h4>\n<p>\u041a&nbsp;\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub<\/u><\/strong><\/a>.&nbsp;\u041e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442&nbsp;<a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\/blob\/main\/src\/main\/java\/com\/github\/timtebeek\/archunit\/ArchunitUnusedRuleApplication.java\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring Boot<\/u><\/strong><\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435&nbsp;<a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\/blob\/main\/src\/test\/java\/com\/github\/timtebeek\/archunit\/ArchunitUnusedRuleApplicationTests.java\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043f\u0440\u0430\u0432\u0438\u043b\u0430 ArchUnit \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/u><\/strong><\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442&nbsp;<a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\/blob\/main\/src\/test\/java\/com\/github\/timtebeek\/archunit\/ArchunitUnusedRuleApplicationTests.java\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0441\u0441\u044b\u043b\u043e\u043a<\/u><\/strong><\/a>.<\/p>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/releases\/tag\/v0.15.0\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 ArchUnit 0.15.0<\/u><\/strong><\/a>.&nbsp;\u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c&nbsp;<a href=\"https:\/\/www.archunit.org\/userguide\/html\/000_Index.html#_junit_4_5_support\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 JUnit5<\/u><\/strong><\/a>&nbsp;\u0447\u0435\u0440\u0435\u0437&nbsp;<code>com.tngtech.archunit:archunit-junit5:0.15.0<\/code>.&nbsp;\u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"java\">@AnalyzeClasses(   packagesOf = ArchunitUnusedRuleApplication.class,   importOptions = {     ImportOption.DoNotIncludeArchives.class,     ImportOption.DoNotIncludeJars.class,     ImportOption.DoNotIncludeTests.class }) class ArchunitUnusedRuleApplicationTests {   @ArchTest   static ArchRule classesShouldNotBeUnused = classes()     .that()       ...     .should(       ...     );   @ArchTest   static ArchRule methodsShouldNotBeUnused = methods()     .that()       ...     .should(       ...     ); }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 <code>packagesOf <\/code>\u0438&nbsp;<code>importOptions<\/code>&nbsp;\u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code><a class=\"mention\" href=\"\/users\/analyzeclasses().\">@AnalyzeClasses().<\/a><\/code>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@ArchTest<\/code> \u0432&nbsp;\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u043b\u0435 \u0442\u0438\u043f\u0430 <code>ArchRule<\/code> \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0441 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>ArchRule.check(JavaClasses)<\/code>,&nbsp;\u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u0432 \u0431\u043b\u043e\u0433\u0435. <\/p>\n<p>\u0421&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u043e\u0432 <code>classes() <\/code>\u0438 <code>methods() <\/code>\u0438\u0437 <code>ArchRuleDefinition  <\/code>\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435&nbsp;\u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u0441\u043b\u0435&nbsp;<code>.that()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u0435\u044f\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e&nbsp;<code>.should()<\/code>\u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0443\u0441\u043b\u043e\u0432\u0438\u044e, \u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h4>\n<p>\u0418\u043c\u0435\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.&nbsp;\u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, ArchUnit \u0441\u0442\u0440\u043e\u0438\u0442 \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u0434\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 Java.<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Spring Boot \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u0435\u0442\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0441\u0435\u0442\u0438, \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434, \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.&nbsp;\u0412 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430 \u0432\u0430\u0441, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.&nbsp;\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Lombok&#8217;s&nbsp;<code>@Data<\/code>or&nbsp;<code>@Value<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442&nbsp;<code>equals<\/code>,&nbsp;<code>hashCode<\/code>\u0438&nbsp;<code>toString<\/code>\u0432 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u044d\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435, \u043c\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0443 ArchRule, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<pre><code class=\"java\">@ArchTest static ArchRule methodsShouldNotBeUnused = methods()   .that().doNotHaveName(\"equals\")   .and().doNotHaveName(\"hashCode\")   .and().doNotHaveName(\"toString\")   .and().doNotHaveName(\"main\")   .and().areNotMetaAnnotatedWith(RequestMapping.class)   .and(not(methodHasAnnotationThatEndsWith(\"Handler\")     .or(methodHasAnnotationThatEndsWith(\"Listener\"))     .or(methodHasAnnotationThatEndsWith(\"Scheduled\"))     .and(declaredIn(describe(\"component\", clazz -&gt; clazz.isMetaAnnotatedWith(Component.class))))))   .should(new ArchCondition&lt;&gt;(\"not be unreferenced\") {     @Override     public void check(JavaMethod javaMethod, ConditionEvents events) {       Set&lt;JavaMethodCall&gt; accesses = new HashSet&lt;&gt;(javaMethod.getAccessesToSelf());       accesses.removeAll(javaMethod.getAccessesFromSelf());       if (accesses.isEmpty()) {         events.add(new SimpleConditionEvent(javaMethod, false, String.format(\"%s is unreferenced in %s\",           javaMethod.getDescription(), javaMethod.getSourceCodeLocation())));       }     }   });  static DescribedPredicate&lt;JavaMethod&gt; methodHasAnnotationThatEndsWith(String suffix) {   return describe(String.format(\"has annotation that ends with '%s'\", suffix),    method -&gt; method.getAnnotations().stream()      .anyMatch(annotation -&gt; annotation.getRawType().getFullName().endsWith(suffix))); }<\/code><\/pre>\n<h4>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.&nbsp;\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439&nbsp;<code>@Component<\/code>\u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c (listener) \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442.&nbsp;\u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 <code>JavaClass.getDirectDependenciesToSelf()<\/code> \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u0435\u044f\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e ArchRule \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<pre><code class=\"java\">@ArchTest static ArchRule classesShouldNotBeUnused = classes()   .that().areNotMetaAnnotatedWith(org.springframework.context.annotation.Configuration.class)   .and().areNotMetaAnnotatedWith(org.springframework.stereotype.Controller.class)   .and(not(classHasMethodWithAnnotationThatEndsWith(\"Handler\")     .or(classHasMethodWithAnnotationThatEndsWith(\"Listener\"))     .or(classHasMethodWithAnnotationThatEndsWith(\"Scheduled\"))     .and(metaAnnotatedWith(Component.class))))   .should(new ArchCondition&lt;&gt;(\"not be unreferenced\") {     @Override     public void check(JavaClass javaClass, ConditionEvents events) {       Set&lt;JavaAccess&lt;?&gt;&gt; accesses = new HashSet&lt;&gt;(javaClass.getAccessesToSelf());       accesses.removeAll(javaClass.getAccessesFromSelf());       if (accesses.isEmpty() &amp;&amp; javaClass.getDirectDependenciesToSelf().isEmpty()) {         events.add(new SimpleConditionEvent(javaClass, false, String.format(\"%s is unreferenced in %s\",           javaClass.getDescription(), javaClass.getSourceCodeLocation())));       }     }   });  static DescribedPredicate&lt;JavaClass&gt; classHasMethodWithAnnotationThatEndsWith(String suffix) {   return describe(String.format(\"has method with annotation that ends with '%s'\", suffix),     clazz -&gt; clazz.getMethods().stream()       .flatMap(method -&gt; method.getAnnotations().stream())       .anyMatch(annotation -&gt; annotation.getRawType().getFullName().endsWith(suffix))); }<\/code><\/pre>\n<h4>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0425\u043e\u0442\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 (\u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438) \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 ArchUnit.&nbsp;\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/issues\/215\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c<\/u><\/strong><\/a>.&nbsp;\u0418\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c,&nbsp;\u0447\u0442\u043e&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/issues\/115\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430<\/u><\/strong><\/a>&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/issues\/307\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/u><\/strong><\/a>.&nbsp;\u0418, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ArchUnit \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0431\u0430\u0439\u0442\u043e\u0432\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e&nbsp;<a href=\"https:\/\/stackoverflow.com\/questions\/1406616\/is-java-guaranteed-to-inline-string-constants-if-they-can-be-determined-at-compi\" rel=\"noopener noreferrer nofollow\"><strong>\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/strong><\/a>.<\/p>\n<h4>\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0436\u043d\u044b\u0445 (\u0438\u043b\u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0445!) \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439<\/h4>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 ArchConditions:&nbsp;<a href=\"https:\/\/www.archunit.org\/userguide\/html\/000_Index.html#_freezing_arch_rules\" rel=\"noopener noreferrer nofollow\"><strong><u>Freezing Arch Rules<\/u><\/strong><\/a>.&nbsp;\u041f\u0435\u0440\u0435\u0434\u0430\u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e ArchRule, \u0432 <code>FreezingArchRule.freeze(ArchRule) <\/code>\u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439.<\/p>\n<blockquote>\n<p>&nbsp;\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u043e\u0442\u043d\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439, \u0438 \u0438\u0445 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.&nbsp;\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u043c\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u043c\u0438 &#8212; \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0443\u0445\u0443\u0434\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b.&nbsp;FreezingArchRule \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 ViolationStore.&nbsp;\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u043d\u043e\u0432\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u0445 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f.&nbsp;\u0415\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b, FreezingArchRule \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u0438\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441.&nbsp;<\/p>\n<p>                                                                   &#8212; \u0421\u0430\u0439\u0442 Archunit<\/p>\n<\/blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u043e\u0431\u0449\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 <code>.that()<\/code>.&nbsp;\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439 \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 &#8212; \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435, \u043d\u0435 \u0437\u0430\u0433\u0440\u044f\u0437\u043d\u044f\u044f \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e.<\/p>\n<h4>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0430\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 ArchUnit<\/h4>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u043d\u044b.&nbsp;\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u043a\u043b\u0430\u0441\u0441\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u043c\u0438, \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.&nbsp;\u042d\u0442\u043e\u0442 \u0448\u0430\u0433, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.&nbsp;\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a.<\/p>\n<pre><code class=\"java\">@Nested class VerifyRulesThemselves {   @Test   void verifyClassesShouldNotBeUnused() {      JavaClasses javaClasses = new ClassFileImporter()        .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_ARCHIVES)        .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)        .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)        .importPackagesOf(ArchunitUnusedRuleApplication.class);      AssertionError error = assertThrows(AssertionError.class,        () -&gt; classesShouldNotBeUnused.check(javaClasses));      assertEquals(\"\"\"        Architecture Violation [Priority: MEDIUM] - Rule 'classes that are not meta-annotated with @Configuration and are not meta-annotated with @Controller and not has method with annotation that ends with 'Handler' or has method with annotation that ends with 'Listener' or has method with annotation that ends with 'Scheduled' and meta-annotated with @Component should not be unreferenced' was violated (3 times):        Class &lt;com.github.timtebeek.archunit.ComponentD&gt; is unreferenced in (ArchunitUnusedRuleApplication.java:0)        Class &lt;com.github.timtebeek.archunit.ModelF&gt; is unreferenced in (ArchunitUnusedRuleApplication.java:0)        Class &lt;com.github.timtebeek.archunit.PathsE&gt; is unreferenced in (ArchunitUnusedRuleApplication.java:0)\"\"\",        error.getMessage());   }    @Test   void verifyMethodsShouldNotBeUnused() {     JavaClasses javaClasses = new ClassFileImporter()       .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_ARCHIVES)       .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_JARS)       .withImportOption(ImportOption.Predefined.DO_NOT_INCLUDE_TESTS)       .importPackagesOf(ArchunitUnusedRuleApplication.class);     AssertionError error = assertThrows(AssertionError.class,       () -&gt; methodsShouldNotBeUnused.check(javaClasses));     assertEquals(\"\"\"       Architecture Violation [Priority: MEDIUM] - Rule 'methods that do not have name 'equals' and do not have name 'hashCode' and do not have name 'toString' and do not have name 'main' and are not meta-annotated with @RequestMapping and not has annotation that ends with 'Handler' or has annotation that ends with 'Listener' or has annotation that ends with 'Scheduled' and declared in component should not be unreferenced' was violated (2 times):       Method &lt;com.github.timtebeek.archunit.ComponentD.doSomething(com.github.timtebeek.archunit.ModelD)&gt; is unreferenced in (ArchunitUnusedRuleApplication.java:102)       Method &lt;com.github.timtebeek.archunit.ModelF.toUpper()&gt; is unreferenced in (ArchunitUnusedRuleApplication.java:143)\"\"\",       error.getMessage());   } }<\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u043d\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u044f\u0442 \u0431\u0435\u0437 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0438 \u043d\u043e\u0432\u044b\u0439 \u043d\u0438 \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043e\u0434.&nbsp;\u041b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u0435\u0435 \u0438\u043b\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a, \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u043f\u0440\u044f\u043c\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.&nbsp;\u0412\u043c\u0435\u0441\u0442\u0435 \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0432\u0430\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.&nbsp;\u0418 \u0432\u044b \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438, \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/550108\/\"> https:\/\/habr.com\/ru\/post\/550108\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 Java-\u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c\u0438.&nbsp;\u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u0443\u043b\u043a\u0438 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.&nbsp;\u041d\u043e \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043f\u043e\u0445\u043e\u0436\u0435, \u043e\u0442\u0441\u0442\u0430\u044e\u0442 \u043e\u0442 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 Java.&nbsp;\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u043e\u0438\u0441\u043a\u0443 \u043a\u043e\u0434\u0430 \u0431\u0435\u0437 \u0441\u0441\u044b\u043b\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ArchUnit, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Java.<\/p>\n<h4>ArchUnit<\/h4>\n<blockquote>\n<p><a href=\"https:\/\/www.archunit.org\/\" rel=\"noopener noreferrer nofollow\">ArchUnit<\/a>&nbsp;&#8212; \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f, \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0432\u0430\u0448\u0435\u0433\u043e Java-\u043a\u043e\u0434\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java.&nbsp;\u0422\u043e \u0435\u0441\u0442\u044c ArchUnit \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u0441\u043b\u043e\u044f\u043c\u0438 \u0438 \u0441\u0440\u0435\u0437\u0430\u043c\u0438, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.&nbsp;\u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430 Java \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Java \u043a\u043e\u0434\u0430.&nbsp;<\/p>\n<p>                                                                                &#8212; \u0421\u0430\u0439\u0442 Archunit<\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/blog.jdriven.com\/2018\/10\/testing-the-architecture-archunit-in-practice\/\" rel=\"noopener noreferrer nofollow\">\u0421\u0430\u043c ArchUnit \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f \u0440\u0430\u043d\u0435\u0435 \u041d\u0438\u043b\u044c\u0441\u043e\u043c<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043b \u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043c\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u0440\u0430\u0442\u043a\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0440\u0430\u043d\u0435\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ArchUnit \u0441 JUnit5 \u0438 \u043b\u044f\u043c\u0431\u0434\u0430-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438.&nbsp;\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 ArchUnit, \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435.&nbsp;\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u0431\u0449\u0438\u0435, \u0442\u0430\u043a \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<h4>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432<\/h4>\n<p>\u041a&nbsp;\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u043f\u0440\u0438\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 GitHub<\/u><\/strong><\/a>.&nbsp;\u041e\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442&nbsp;<a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\/blob\/main\/src\/main\/java\/com\/github\/timtebeek\/archunit\/ArchunitUnusedRuleApplication.java\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring Boot<\/u><\/strong><\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435&nbsp;<a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\/blob\/main\/src\/test\/java\/com\/github\/timtebeek\/archunit\/ArchunitUnusedRuleApplicationTests.java\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043f\u0440\u0430\u0432\u0438\u043b\u0430 ArchUnit \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/u><\/strong><\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442&nbsp;<a href=\"https:\/\/github.com\/timtebeek\/archunit-unreferenced\/blob\/main\/src\/test\/java\/com\/github\/timtebeek\/archunit\/ArchunitUnusedRuleApplicationTests.java\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0441\u0441\u044b\u043b\u043e\u043a<\/u><\/strong><\/a>.<\/p>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/releases\/tag\/v0.15.0\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 ArchUnit 0.15.0<\/u><\/strong><\/a>.&nbsp;\u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c&nbsp;<a href=\"https:\/\/www.archunit.org\/userguide\/html\/000_Index.html#_junit_4_5_support\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 JUnit5<\/u><\/strong><\/a>&nbsp;\u0447\u0435\u0440\u0435\u0437&nbsp;<code>com.tngtech.archunit:archunit-junit5:0.15.0<\/code>.&nbsp;\u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"java\">@AnalyzeClasses(   packagesOf = ArchunitUnusedRuleApplication.class,   importOptions = {     ImportOption.DoNotIncludeArchives.class,     ImportOption.DoNotIncludeJars.class,     ImportOption.DoNotIncludeTests.class }) class ArchunitUnusedRuleApplicationTests {   @ArchTest   static ArchRule classesShouldNotBeUnused = classes()     .that()       ...     .should(       ...     );   @ArchTest   static ArchRule methodsShouldNotBeUnused = methods()     .that()       ...     .should(       ...     ); }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 <code>packagesOf <\/code>\u0438&nbsp;<code>importOptions<\/code>&nbsp;\u0432 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code><a class=\"mention\" href=\"\/users\/analyzeclasses().\">@AnalyzeClasses().<\/a><\/code>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@ArchTest<\/code> \u0432&nbsp;\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u043b\u0435 \u0442\u0438\u043f\u0430 <code>ArchRule<\/code> \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0441 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>ArchRule.check(JavaClasses)<\/code>,&nbsp;\u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 \u0432 \u0431\u043b\u043e\u0433\u0435. <\/p>\n<p>\u0421&nbsp;\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u043e\u0432 <code>classes() <\/code>\u0438 <code>methods() <\/code>\u0438\u0437 <code>ArchRuleDefinition  <\/code>\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435&nbsp;\u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u0441\u043b\u0435&nbsp;<code>.that()<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u0435\u044f\u0442\u044c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e&nbsp;<code>.should()<\/code>\u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0443\u0441\u043b\u043e\u0432\u0438\u044e, \u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h4>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h4>\n<p>\u0418\u043c\u0435\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.&nbsp;\u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435, ArchUnit \u0441\u0442\u0440\u043e\u0438\u0442 \u0433\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u0434\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 Java.<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 Spring Boot \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u0435\u0442\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0441\u0435\u0442\u0438, \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434, \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.&nbsp;\u0412 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430 \u0432\u0430\u0441, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.&nbsp;\u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Lombok&#8217;s&nbsp;<code>@Data<\/code>or&nbsp;<code>@Value<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442&nbsp;<code>equals<\/code>,&nbsp;<code>hashCode<\/code>\u0438&nbsp;<code>toString<\/code>\u0432 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u044d\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435, \u043c\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0443 ArchRule, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<pre><code class=\"java\">@ArchTest static ArchRule methodsShouldNotBeUnused = methods()   .that().doNotHaveName(\"equals\")   .and().doNotHaveName(\"hashCode\")   .and().doNotHaveName(\"toString\")   .and().doNotHaveName(\"main\")   .and().areNotMetaAnnotatedWith(RequestMapping.class)   .and(not(methodHasAnnotationThatEndsWith(\"Handler\")     .or(methodHasAnnotationThatEndsWith(\"Listener\"))     .or(methodHasAnnotationThatEndsWith(\"Scheduled\"))     .and(declaredIn(describe(\"component\", clazz -&gt; clazz.isMetaAnnotatedWith(Component.class))))))   .should(new ArchCondition&lt;&gt;(\"not be unreferenced\") {     @Override     public void check(JavaMethod javaMethod, ConditionEvents events) {       Set&lt;JavaMethodCall&gt; accesses = new HashSet&lt;&gt;(javaMethod.getAccessesToSelf());       accesses.removeAll(javaMethod.getAccessesFromSelf());       if (accesses.isEmpty()) {         events.add(new SimpleConditionEvent(javaMethod, false, String.format(\"%s is unreferenced in %s\",           javaMethod.getDescription(), javaMethod.getSourceCodeLocation())));       }     }   });  static DescribedPredicate&lt;JavaMethod&gt; methodHasAnnotationThatEndsWith(String suffix) {   return describe(String.format(\"has annotation that ends with '%s'\", suffix),    method -&gt; method.getAnnotations().stream()      .anyMatch(annotation -&gt; annotation.getRawType().getFullName().endsWith(suffix))); }<\/code><\/pre>\n<h4>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.&nbsp;\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439&nbsp;<code>@Component<\/code>\u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c (listener) \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442.&nbsp;\u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 <code>JavaClass.getDirectDependenciesToSelf()<\/code> \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u0435\u044f\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e ArchRule \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<pre><code class=\"java\">@ArchTest static ArchRule classesShouldNotBeUnused = classes()   .that().areNotMetaAnnotatedWith(org.springframework.context.annotation.Configuration.class)   .and().areNotMetaAnnotatedWith(org.springframework.stereotype.Controller.class)   .and(not(classHasMethodWithAnnotationThatEndsWith(\"Handler\")     .or(classHasMethodWithAnnotationThatEndsWith(\"Listener\"))     .or(classHasMethodWithAnnotationThatEndsWith(\"Scheduled\"))     .and(metaAnnotatedWith(Component.class))))   .should(new ArchCondition&lt;&gt;(\"not be unreferenced\") {     @Override     public void check(JavaClass javaClass, ConditionEvents events) {       Set&lt;JavaAccess&lt;?&gt;&gt; accesses = new HashSet&lt;&gt;(javaClass.getAccessesToSelf());       accesses.removeAll(javaClass.getAccessesFromSelf());       if (accesses.isEmpty() &amp;&amp; javaClass.getDirectDependenciesToSelf().isEmpty()) {         events.add(new SimpleConditionEvent(javaClass, false, String.format(\"%s is unreferenced in %s\",           javaClass.getDescription(), javaClass.getSourceCodeLocation())));       }     }   });  static DescribedPredicate&lt;JavaClass&gt; classHasMethodWithAnnotationThatEndsWith(String suffix) {   return describe(String.format(\"has method with annotation that ends with '%s'\", suffix),     clazz -&gt; clazz.getMethods().stream()       .flatMap(method -&gt; method.getAnnotations().stream())       .anyMatch(annotation -&gt; annotation.getRawType().getFullName().endsWith(suffix))); }<\/code><\/pre>\n<h4>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0425\u043e\u0442\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 (\u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438) \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 ArchUnit.&nbsp;\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/issues\/215\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c<\/u><\/strong><\/a>.&nbsp;\u0418\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c,&nbsp;\u0447\u0442\u043e&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/issues\/115\" rel=\"noopener noreferrer nofollow\"><strong><u>\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430<\/u><\/strong><\/a>&nbsp;<a href=\"https:\/\/github.com\/TNG\/ArchUnit\/issues\/307\" rel=\"noopener noreferrer nofollow\"><strong><u>\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043a\u0430\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/u><\/strong><\/a>.&nbsp;\u0418, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ArchUnit \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0431\u0430\u0439\u0442\u043e\u0432\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e&nbsp;<a href=\"https:\/\/stackoverflow.com\/questions\/1406616\/is-java-guaranteed-to-inline-string-constants-if-they-can-be-determined-at-compi\" rel=\"noopener noreferrer nofollow\"><strong>\u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/strong><\/a>.<\/p>\n<h4>\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0436\u043d\u044b\u0445 (\u0438\u043b\u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0445!) \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439<\/h4>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 ArchConditions:&nbsp;<a href=\"https:\/\/www.archunit.org\/userguide\/html\/000_Index.html#_freezing_arch_rules\" rel=\"noopener noreferrer nofollow\"><strong><u>Freezing Arch Rules<\/u><\/strong><\/a>.&nbsp;\u041f\u0435\u0440\u0435\u0434\u0430\u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e ArchRule, \u0432 <code>FreezingArchRule.freeze(ArchRule) <\/code>\u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439.<\/p>\n<blockquote>\n<p>&nbsp;\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u043e\u0442\u043d\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439, \u0438 \u0438\u0445 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.&nbsp;\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u043c\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u043c\u0438 &#8212; \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0443\u0445\u0443\u0434\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b.&nbsp;FreezingArchRule \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 ViolationStore.&nbsp;\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u043d\u043e\u0432\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u0445 \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f.&nbsp;\u0415\u0441\u043b\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b, FreezingArchRule \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u0438\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441.&nbsp;<\/p>\n<p>                                                                   &#8212; \u0421\u0430\u0439\u0442 Archunit<\/p>\n<\/blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u043e\u0431\u0449\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0430 <code>.that()<\/code>.&nbsp;\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439 \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 &#8212; \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435, \u043d\u0435 \u0437\u0430\u0433\u0440\u044f\u0437\u043d\u044f\u044f \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e.<\/p>\n<h4>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0430\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 ArchUnit<\/h4>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u043d\u044b.&nbsp;\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b,<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320912","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320912"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320912\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}