classes = new ArrayList(); computeClassOrder(adaptable, classes); if (lookup == null) classSearchOrderLookup = lookup = new HashMap();
ArrayList classList = new ArrayList(); computeClassOrder(adaptable, classList); classes = (Class[]) classList.toArray(new Class[classList.size()]);
	public Class[] computeClassOrder(Class adaptable) {		List classes = null;		//cache reference to lookup to protect against concurrent flush		HashMap lookup = classSearchOrderLookup;		if (lookup != null)			classes = (List) lookup.get(adaptable);		// compute class order only if it hasn't been cached before		if (classes == null) {			classes = new ArrayList();			computeClassOrder(adaptable, classes);			if (lookup == null)				classSearchOrderLookup = lookup = new HashMap();			lookup.put(adaptable, classes);		}		return (Class[]) classes.toArray(new Class[classes.size()]);	}