@Test public void trimAll_A$String_annotationClass() throws Exception { TrimAnnotationFilter target = new TrimAnnotationFilter(); String src = "@SuppressWarnings(value = { \"issue 28\" }) @Documented @Retention(RetentionPolicy.RUNTIME) @Target( { ElementType.TYPE, ElementType.METHOD }) public @interface AdminRoleRequired {"; String actual = target.trimAll(src); String expected = " public interface AdminRoleRequired {"; assertEquals(expected, actual); }
@Override public String trimAll(String src) { if (src == null) { return null; } return src.replaceFirst("@interface", "interface").replaceAll("@[^\\s\r\n\\(]+(\\([^\\)]*\\))*", " ") .replaceAll("@[^\\s\r\n]+", ""); }
TrimAnnotationFilter implements TrimFilter { @Override public String trimAll(String src) { if (src == null) { return null; } return src.replaceFirst("@interface", "interface").replaceAll("@[^\\s\r\n\\(]+(\\([^\\)]*\\))*", " ") .replaceAll("@[^\\s\r\n]+", ""); } }
TrimAnnotationFilter implements TrimFilter { @Override public String trimAll(String src) { if (src == null) { return null; } return src.replaceFirst("@interface", "interface").replaceAll("@[^\\s\r\n\\(]+(\\([^\\)]*\\))*", " ") .replaceAll("@[^\\s\r\n]+", ""); }  }
TrimAnnotationFilter implements TrimFilter { @Override public String trimAll(String src) { if (src == null) { return null; } return src.replaceFirst("@interface", "interface").replaceAll("@[^\\s\r\n\\(]+(\\([^\\)]*\\))*", " ") .replaceAll("@[^\\s\r\n]+", ""); }  @Override String trimAll(String src); }
TrimAnnotationFilter implements TrimFilter { @Override public String trimAll(String src) { if (src == null) { return null; } return src.replaceFirst("@interface", "interface").replaceAll("@[^\\s\r\n\\(]+(\\([^\\)]*\\))*", " ") .replaceAll("@[^\\s\r\n]+", ""); }  @Override String trimAll(String src);  }