01: package org.incava.qualog;
02:
03: import java.io.*;
04: import java.util.*;
05:
06: /**
07: * Wraps C-style arrays for output.
08: */
09: public class QlObjectArray {
10: public static boolean stack(QlLevel level, ANSIColor[] msgColors,
11: String name, Object[] ary, ANSIColor fileColor,
12: ANSIColor classColor, ANSIColor methodColor, int numFrames) {
13: if (ary.length == 0) {
14: return Qualog.stack(level, msgColors, name, "()",
15: fileColor, classColor, methodColor, numFrames);
16: } else {
17: boolean ret = true;
18: for (int ai = 0; ai < ary.length; ++ai) {
19: int nFrames = ai == ary.length - 1 ? numFrames : 1;
20: ret = Qualog.stack(level, msgColors, name + "[" + ai
21: + "]", ary[ai], fileColor, classColor,
22: methodColor, nFrames);
23: }
24: return ret;
25: }
26: }
27: }
|