public ObjectGraph createObjectGraph(String typeName) { ClassLoader loader = this.contextInput.classLoader; try { Class cls = PrivilegedAccessHelper.getClassForName(typeName, true, loader); return createObjectGraph(cls); } catch (Exception ex) { throw ConversionException.couldNotBeConvertedToClass(typeName, Class.class, ex); } }
public ObjectGraph createObjectGraph(String typeName) { ClassLoader loader = this.contextInput.classLoader; try { Class cls = PrivilegedAccessHelper.getClassForName(typeName, true, loader); return createObjectGraph(cls); } catch (Exception ex) { throw ConversionException.couldNotBeConvertedToClass(typeName, Class.class, ex); } }
/** * Build a valid Class from the string that is passed in * @param sourceObject Valid instance of String */ protected Class convertObjectToClass(Object sourceObject) throws ConversionException { Class theClass = null; if (!(sourceObject instanceof String)) { throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.CLASS); } try { // bug # 2799318 theClass = getPrimitiveClass((String)sourceObject); if (theClass == null) { theClass = Class.forName((String)sourceObject, true, getLoader()); } } catch (Exception exception) { throw ConversionException.couldNotBeConvertedToClass(sourceObject, ClassConstants.CLASS, exception); } return theClass; }
/** * Build a valid Class from the string that is passed in * @param sourceObject Valid instance of String */ protected Class convertObjectToClass(Object sourceObject) throws ConversionException { Class theClass = null; if (!(sourceObject instanceof String)) { throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.CLASS); } try { // bug # 2799318 theClass = getPrimitiveClass((String)sourceObject); if (theClass == null) { theClass = Class.forName((String)sourceObject, true, getLoader()); } } catch (Exception exception) { throw ConversionException.couldNotBeConvertedToClass(sourceObject, ClassConstants.CLASS, exception); } return theClass; }
/** * Build a valid Class from the string that is passed in * @param sourceObject Valid instance of String */ protected Class convertObjectToClass(Object sourceObject) throws ConversionException { Class theClass = null; if (!(sourceObject instanceof String)) { throw ConversionException.couldNotBeConverted(sourceObject, ClassConstants.CLASS); } try { // bug # 2799318 theClass = getPrimitiveClass((String)sourceObject); if (theClass == null) { theClass = Class.forName((String)sourceObject, true, getLoader()); } } catch (Exception exception) { throw ConversionException.couldNotBeConvertedToClass(sourceObject, ClassConstants.CLASS, exception); } return theClass; }