List<AbstractLayoutCodeProcessor> () { AbstractLayoutCodeProcessor current = this; List<AbstractLayoutCodeProcessor> all = new ArrayList<>(); while (current != null) { all.add(current); current = current.myPreviousCodeProcessor; } Collections.reverse(all); return all; }