@Test public void test_matchesAsInnerClass() { assertTrue(ClassMatcher.matchesAsInnerClass("hu.awm.MyClass$InnerClass", Collections.singletonList("hu.awm.MyClass"))); assertTrue(ClassMatcher.matchesAsInnerClass("hu.awm.MyClass$InnerClass$InnerInnerClass", Collections.singletonList("hu.awm.MyClass"))); assertTrue(ClassMatcher.matchesAsInnerClass("hu.awm.MyClass$InnerClass", Arrays.asList("hu.awm.SomethingElse", "hu.awm.MyClass"))); assertFalse(ClassMatcher.matchesAsInnerClass("hu.awm.MyClass", Collections.singletonList("hu.awm.MyClass"))); assertFalse(ClassMatcher.matchesAsInnerClass("hu.awm.other.package.MyClass$InnerClass", Collections.singletonList("hu.awm.MyClass"))); assertFalse(ClassMatcher.matchesAsInnerClass("hu.awm.MyClass$InnerClass", Collections.singletonList("hu.awm.SomethingElse"))); assertFalse(ClassMatcher.matchesAsInnerClass("hu.awm.MyClass$InnerClass", new ArrayList<String>())); }
static boolean matchesAsInnerClass(String classFqn, List<String> fqns) { for (String fqn : fqns) { if (classFqn.startsWith(fqn + "$")) { return true; } } return false; }
ClassMatcher { static boolean matchesAsInnerClass(String classFqn, List<String> fqns) { for (String fqn : fqns) { if (classFqn.startsWith(fqn + "$")) { return true; } } return false; } }
ClassMatcher { static boolean matchesAsInnerClass(String classFqn, List<String> fqns) { for (String fqn : fqns) { if (classFqn.startsWith(fqn + "$")) { return true; } } return false; } private  ClassMatcher(); }
ClassMatcher { static boolean matchesAsInnerClass(String classFqn, List<String> fqns) { for (String fqn : fqns) { if (classFqn.startsWith(fqn + "$")) { return true; } } return false; } private  ClassMatcher();  }
ClassMatcher { static boolean matchesAsInnerClass(String classFqn, List<String> fqns) { for (String fqn : fqns) { if (classFqn.startsWith(fqn + "$")) { return true; } } return false; } private  ClassMatcher();   }