if (type != null) {
return create(type);
}
// at this point the type may not have been defined or there could be a classloader issue
SDOXMLHelper xmlHelper = (SDOXMLHelper) getHelperContext().getXMLHelper();
ClassLoader contextLoader = xmlHelper.getLoader();
ClassLoader interfaceLoader = interfaceClass.getClassLoader();
boolean loadersAreRelated = false;
// check the hierarchy to see if the interface loader is a parent of the context loader
List<ClassLoader> visitedLoaders = new ArrayList<ClassLoader>();