Code example for URLClassLoader

0
     *             when the ImageView Class object could not be found within the 
     *             provided class loader. 
     */ 
    public static void setClassLoaderAndBaseClass(URL[] urlSearchPaths)
            throws ClassNotFoundException { 
        sValidationClassLoader = new URLClassLoader(urlSearchPaths);
        sImageViewElement =
            sValidationClassLoader.loadClass("android.widget.ImageView");
    } 
 
    /** 
     * Adds an attribute that will be tested for existence in 
     * {@link #startElement}. The search will always be case-insensitive. 
     */ 
    private static void addExpectedAttribute(String attribute) {
        sExpectedAttributes.add(attribute.toLowerCase());
    } 
 
    /** 
     * Initializes the class loader and {@link ImageView} Class objects.