/** * Return the activity hierarchy that this activity is within. The zeroth * element is the parent. */ public ActivityImple[] hierarchy () { Stack hier = new Stack(); ActivityImple ptr = this; while (ptr != null) { hier.push(ptr); ptr = ptr.parent(); } int hierSize = hier.size(); ActivityImple[] toReturn = new ActivityImple[hierSize]; for (int i = 0; i < hierSize; i++) toReturn[i] = (ActivityImple) hier.pop(); return toReturn; }
/** * Return the activity hierarchy that this activity is within. The zeroth * element is the parent. */ public ActivityImple[] hierarchy () { Stack hier = new Stack(); ActivityImple ptr = this; while (ptr != null) { hier.push(ptr); ptr = ptr.parent(); } int hierSize = hier.size(); ActivityImple[] toReturn = new ActivityImple[hierSize]; for (int i = 0; i < hierSize; i++) toReturn[i] = (ActivityImple) hier.pop(); return toReturn; }
/** * Return the activity hierarchy that this activity is within. The zeroth * element is the parent. */ public ActivityImple[] hierarchy () { Stack hier = new Stack(); ActivityImple ptr = this; while (ptr != null) { hier.push(ptr); ptr = ptr.parent(); } int hierSize = hier.size(); ActivityImple[] toReturn = new ActivityImple[hierSize]; for (int i = 0; i < hierSize; i++) toReturn[i] = (ActivityImple) hier.pop(); return toReturn; }
/** * Return the activity hierarchy that this activity is within. The zeroth * element is the parent. */ public ActivityImple[] hierarchy () { Stack hier = new Stack(); ActivityImple ptr = this; while (ptr != null) { hier.push(ptr); ptr = ptr.parent(); } int hierSize = hier.size(); ActivityImple[] toReturn = new ActivityImple[hierSize]; for (int i = 0; i < hierSize; i++) toReturn[i] = (ActivityImple) hier.pop(); return toReturn; }