}
/* generates a proxy for a list of elements to be wrapped. */
@SuppressWarnings("unchecked")
protected <T> List<T> proxyForListLocator(ClassLoader loader, Class<T> interfaceType, ElementLocator locator) {
InvocationHandler handler = new LocatingElementListHandler(locator);
List<T> proxy;
proxy = (List<T>) Proxy.newProxyInstance(
loader, new Class[]{List.class}, handler);
return proxy;
}