我正在使用 google code pro Analatics 来测量代码覆盖率。
源代码
public class StackArray<T> implements Stack<T> {
private int top;
private T[] elements;
public StackArray(Class<T> type, int size) {
top = -1;
elements = (T[]) Array.newInstance(type, size);
}
//Other stack related methods
}
生成的类文件
import com.vladium.emma.rt.RT;
import java.lang.reflect.Array;
// Referenced classes of package ds.stack:
// Stack
public class StackArray implements Stack {
private int top;
private Object elements[];
private static final int $VRc[][]; /* synthetic field */
private static final long serialVersionUID = 0x927be770ed420794L; /* synthetic field */
public StackArray(Class type, int size)
{
int ai[] = ($VRc != null ? $VRc : $VRi())[0];
super();
top = -1;
elements = (Object[])Array.newInstance(type, size);
ai[0] = ai[0] + 1;
}
}
我的问题是在 this 或 super 之前的构造函数中如何允许这条线
int ai[] = ($VRc != null ? $VRc : $VRi())[0];