仿华为代码风格checkstyle模板文件。
tab为4个空格,方法的括号换行上下对齐等,如下面的例子:
/**
* A sample source file for the code formatter preview
*/
package mypackage;
import java.util.LinkedList;
public class MyIntStack
{
private final LinkedList fStack;
public MyIntStack()
{
fStack = new LinkedList();
}
public int pop()
{
return ((Integer)fStack.removeFirst()).intValue();
}
public void push(int elem)
{
fStack.addFirst(new Integer(elem));
}
public boolean isEmpty()
{
return fStack.isEmpty();
}
}
1