//
if (instances.length > 0) {
Class elementClass = instances[0].getClass();
if(IInstanceInfo.class.isAssignableFrom(elementClass)) {
for(Object o : instances) {
IInstanceInfo ii = (IInstanceInfo) o;
addInstance(ii.getInstanceClass(), ii.getInstance());
moreClasses.addClass(ii.getInstanceClass());
}
}
else {
for(Object o : instances) {
addInstance(o.getClass(), o);