@Test public void format_successful() { final Properties properties = new Properties(); properties.setProperty("org.eclipse.jdt.core.compiler.compliance", "1.4"); final String code = SourceCodeFormatter.format("interface TestObject{String getName () ;}", properties, LineEnding.LF); final StringBuilder expected = new StringBuilder(); expected.append("interface TestObject {\n"); expected.append("\tString getName();\n"); expected.append("}"); assertEquals(expected.toString(), code); }
public static String format(final String code) { return format(code, DEFAULT_PROPERTIES, LineEnding.DEFAULT_LINE_ENDING); }
SourceCodeFormatter { public static String format(final String code) { return format(code, DEFAULT_PROPERTIES, LineEnding.DEFAULT_LINE_ENDING); } }
SourceCodeFormatter { public static String format(final String code) { return format(code, DEFAULT_PROPERTIES, LineEnding.DEFAULT_LINE_ENDING); } private  SourceCodeFormatter(); }
SourceCodeFormatter { public static String format(final String code) { return format(code, DEFAULT_PROPERTIES, LineEnding.DEFAULT_LINE_ENDING); } private  SourceCodeFormatter(); static String format(final String code); static String format(final String code, final Properties options, final LineEnding lineEnding); }
SourceCodeFormatter { public static String format(final String code) { return format(code, DEFAULT_PROPERTIES, LineEnding.DEFAULT_LINE_ENDING); } private  SourceCodeFormatter(); static String format(final String code); static String format(final String code, final Properties options, final LineEnding lineEnding); static final Properties DEFAULT_PROPERTIES; }