public class Example {
// geti 生成单例语句
public static Example getInstance() {
return new Example();
}
// prsf 生成 private static final
private static final ...;
// psf 生成 public static final
public static final ...;
// psfi 生成 public static final int
public static final int ...;
// psfs 生成 public static final String
public static final String ...;
// main 或者 psvm 生成 main 函数
public static void main(String[] args) {
// fori 生成 for 循环
for (int i = 0; i < 10; i++) {
}
// C 生成 Callable
Callable<Object> callable = new Callable<Object>() {
public Object call() throws Exception {
}
};
// I 生成遍历语句
for (Object o :) {
}
// ifn 生成 if null 语句
if (callable == null) {
}
// inn 生成 if not null 语句
if (callable != null) {
}
// inst 生成 instanceof 语句
if (callable instanceof Object) {
Object o = (Object) callable;
}
// itar 生成数组遍历语句
for (int i = 0; i < args.length; i++) {
String arg = args[i];
}
// itco 生成 java.util.Collection 遍历语句
for (Iterator iterator = collection.iterator(); iterator.hasNext(); ) {
Object next = iterator.next();
}
// iten 生成 java.util.Enumeration 遍历语句
while (enumeration.hasMoreElements()) {
Object nextElement = enumeration.nextElement();
}
// iter 生成 Iterable 或 数组 遍历语句
for (String arg : args) {
}
// itit 生成 java.util.Iterator 遍历语句
while (iterator.hasNext()) {
Object next = iterator.next();
}
// itli 生成 java.util.List 遍历语句
for (int i = 0; i < list.size(); i++) {
Object o = list.get(i);
}
// ittok 生成遍历 token 的语句
for (StringTokenizer stringTokenizer = new StringTokenizer(); stringTokenizer.hasMoreTokens(); ) {
String s = stringTokenizer.nextToken();
}
// lazy 生成延迟初始化语句
if (callable == null) {
callable = new Callable<Object>();
}
// lst 生成获取数组最后一个元素语句
args[args.length - 1];
// mn 生成 Math.min
min = Math.min(min, max);
// mx 生成 Math.max
max = Math.max(max, min);
// ritar 生成降序遍历数组的语句
for (int i = args.length - 1; i >= 0; i--) {
String arg = args[i];
}
// RL 生成 ReadWriteLock.readLock()
ReadWriteLock.readLock().lock();
try {
} finally {
ReadWriteLock.readLock().unlock();
}
// serr 生成 System.err.println()
System.err.println();
// serrc 生成 System.err::println
System.err::println;
// souf 生成 System.out.printf("")
System.out.printf("");
// sout 生成 System.out.println()
System.out.println();
// soutc 生成 System.out::println
System.out::println;
// soutm 生成打印当前类和方法的语句
System.out.println("Example.main");
// soutp 生成打印当前方法的参数名字和值
System.out.println("args = " + Arrays.deepToString(args));
// soutv 生成打印一个值的语句
System.out.println("callable = " + callable);
// St 生成 String
String ;
// thr 生成 throw new
throw new;
// toar 生成 java.util.Collection 元素到数组的语句
.toArray(new Object[0]);
// WL 生成 WriteLock.writeLock() 语句
ReentrantReadWriteLock.WriteLock.writeLock().lock();
try {
} finally {
ReentrantReadWriteLock.WriteLock.writeLock().unlock();
}
}
}