Repository: tng/archunit
Issue: Modifier "static" of nested classes is not recognized

Currently, interfaces that are declared within another class and don't have the static keyword, are not considered as static. But those interfaces are implicitly static.

See [JLS, 8.5.1](https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.5.1):
> A member interface is implicitly static (§9.1.1). It is permitted for the declaration of a member interface to redundantly specify the static modifier.

Test:
```java
class ExampleTest {

    @Test
    void modifierOfInterface() {
        JavaClass javaClass = new ClassFileImporter().importClass(NestedInterface.class);
        System.out.println(Predicates.modifier(STATIC).apply(javaClass)); // ArchUnit

        System.out.println(Modifier.isStatic(NestedInterface.class.getModifiers())); // JDK
    }

    interface NestedInterface {}
}
```

Output:
```
false
true
```

Changed files:
archunit/src/test/java/com/tngtech/archunit/core/importer/ClassFileImporterTest.java
archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/nestedimport/ClassWithNestedClass.java
archunit/src/main/java/com/tngtech/archunit/core/domain/JavaModifier.java

diff --git a/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaModifier.java b/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaModifier.java
index 20989635..b5b47556 100644
--- a/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaModifier.java
+++ b/archunit/src/main/java/com/tngtech/archunit/core/domain/JavaModifier.java
@@ -34,7 +34,7 @@ public enum JavaModifier {
     @PublicAPI(usage = ACCESS)
     PRIVATE(EnumSet.allOf(ApplicableType.class), Opcodes.ACC_PRIVATE),
     @PublicAPI(usage = ACCESS)
-    STATIC(EnumSet.of(ApplicableType.FIELD, ApplicableType.METHOD), Opcodes.ACC_STATIC),
+    STATIC(EnumSet.allOf(ApplicableType.class), Opcodes.ACC_STATIC),
     @PublicAPI(usage = ACCESS)
     FINAL(EnumSet.allOf(ApplicableType.class), Opcodes.ACC_FINAL),
     @PublicAPI(usage = ACCESS)
diff --git a/archunit/src/test/java/com/tngtech/archunit/core/importer/ClassFileImporterTest.java b/archunit/src/test/java/com/tngtech/archunit/core/importer/ClassFileImporterTest.java
index 01d8c01c..126c7a25 100644
--- a/archunit/src/test/java/com/tngtech/archunit/core/importer/ClassFileImporterTest.java
+++ b/archunit/src/test/java/com/tngtech/archunit/core/importer/ClassFileImporterTest.java
@@ -306,9 +306,22 @@ public class ClassFileImporterTest {
                 ClassWithNestedClass.class,
                 ClassWithNestedClass.NestedClass.class,
                 ClassWithNestedClass.StaticNestedClass.class,
+                ClassWithNestedClass.NestedInterface.class,
+                ClassWithNestedClass.StaticNestedInterface.class,
                 Class.forName(ClassWithNestedClass.class.getName() + "$PrivateNestedClass"));
     }
 
+    @Test
+    public void handles_static_modifier_of_nested_classes() throws Exception {
+        JavaClasses classes = classesIn("testexamples/nestedimport").classes;
+
+        assertThat(classes.get(ClassWithNestedClass.class).getModifiers()).as("modifiers of ClassWithNestedClass").doesNotContain(STATIC);
+        assertThat(classes.get(ClassWithNestedClass.NestedClass.class).getModifiers()).as("modifiers of ClassWithNestedClass.NestedClass").doesNotContain(STATIC);
+        assertThat(classes.get(ClassWithNestedClass.StaticNestedClass.class).getModifiers()).as("modifiers of ClassWithNestedClass.StaticNestedClass").contains(STATIC);
+        assertThat(classes.get(ClassWithNestedClass.NestedInterface.class).getModifiers()).as("modifiers of ClassWithNestedClass.NestedInterface").contains(STATIC);
+        assertThat(classes.get(ClassWithNestedClass.StaticNestedInterface.class).getModifiers()).as("modifiers of ClassWithNestedClass.StaticNestedInterface").contains(STATIC);
+    }
+
     @Test
     public void imports_jdk_classes() {
         JavaClasses classes = new ClassFileImporter().importClasses(File.class);
diff --git a/archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/nestedimport/ClassWithNestedClass.java b/archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/nestedimport/ClassWithNestedClass.java
index 5b717958..ee2f3f4e 100644
--- a/archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/nestedimport/ClassWithNestedClass.java
+++ b/archunit/src/test/java/com/tngtech/archunit/core/importer/testexamples/nestedimport/ClassWithNestedClass.java
@@ -10,4 +10,10 @@ public class ClassWithNestedClass {
 
     public static class StaticNestedClass {
     }
+
+    public interface NestedInterface {
+    }
+
+    public static interface StaticNestedInterface {
+    }
 }