@Test public void isPackageLocal_A$String_true() throws Exception { String methodSignature = " static final String hogehoge(List<String> list) throws Throwable { "; boolean actual = AccessModifierDetector.isPackageLocal(methodSignature); boolean expected = true; assertEquals(expected, actual); }
public static boolean isPackageLocal(String methodSignature) { return methodSignature != null && !methodSignature.matches(RegExp.Prefix + "public" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "protected" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "private" + RegExp.Suffix); }
AccessModifierDetector { public static boolean isPackageLocal(String methodSignature) { return methodSignature != null && !methodSignature.matches(RegExp.Prefix + "public" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "protected" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "private" + RegExp.Suffix); } }
AccessModifierDetector { public static boolean isPackageLocal(String methodSignature) { return methodSignature != null && !methodSignature.matches(RegExp.Prefix + "public" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "protected" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "private" + RegExp.Suffix); } private  AccessModifierDetector(); }
AccessModifierDetector { public static boolean isPackageLocal(String methodSignature) { return methodSignature != null && !methodSignature.matches(RegExp.Prefix + "public" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "protected" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "private" + RegExp.Suffix); } private  AccessModifierDetector(); static boolean isPublic(String methodSignature); static boolean isProtected(String methodSignature); static boolean isPackageLocal(String methodSignature); static boolean isPrivate(String methodSignature); }
AccessModifierDetector { public static boolean isPackageLocal(String methodSignature) { return methodSignature != null && !methodSignature.matches(RegExp.Prefix + "public" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "protected" + RegExp.Suffix) && !methodSignature.matches(RegExp.Prefix + "private" + RegExp.Suffix); } private  AccessModifierDetector(); static boolean isPublic(String methodSignature); static boolean isProtected(String methodSignature); static boolean isPackageLocal(String methodSignature); static boolean isPrivate(String methodSignature);  }