/** * Attempts to convert the given object to a Class instance. * If the classObject is already a Class it will be returned * otherwise it will be converted to a String and loaded * using the default class loading mechanism. */ protected Class convertToClass(Object classObject) throws MissingAttributeException, ClassNotFoundException { if (classObject instanceof Class) { return (Class) classObject; } else if ( classObject == null ) { Class theClass = getDefaultClass(); if (theClass == null) { throw new MissingAttributeException("class"); } return theClass; } else { String className = classObject.toString(); return loadClass(className); } }
/** * Attempts to convert the given object to a Class instance. * If the classObject is already a Class it will be returned * otherwise it will be converted to a String and loaded * using the default class loading mechanism. */ protected Class convertToClass(Object classObject) throws MissingAttributeException, ClassNotFoundException { if (classObject instanceof Class) { return (Class) classObject; } else if ( classObject == null ) { Class theClass = getDefaultClass(); if (theClass == null) { throw new MissingAttributeException("class"); } return theClass; } else { String className = classObject.toString(); return loadClass(className); } }
/** * Attempts to convert the given object to a Class instance. * If the classObject is already a Class it will be returned * otherwise it will be converted to a String and loaded * using the default class loading mechanism. */ protected Class convertToClass(Object classObject) throws MissingAttributeException, ClassNotFoundException { if (classObject instanceof Class) { return (Class) classObject; } else if ( classObject == null ) { Class theClass = getDefaultClass(); if (theClass == null) { throw new MissingAttributeException("class"); } return theClass; } else { String className = classObject.toString(); return loadClass(className); } }
/** * Attempts to convert the given object to a Class instance. * If the classObject is already a Class it will be returned * otherwise it will be converted to a String and loaded * using the default class loading mechanism. */ protected Class convertToClass(Object classObject) throws MissingAttributeException, ClassNotFoundException { if (classObject instanceof Class) { return (Class) classObject; } else if ( classObject == null ) { Class theClass = getDefaultClass(); if (theClass == null) { throw new MissingAttributeException("class"); } return theClass; } else { String className = classObject.toString(); return loadClass(className); } }