Interface ClassCodeBaseHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getCodeBase​(java.lang.Class<?> cls)
      Returns some sort of codebase for the given class, or null.
      java.lang.Class<?> loadClass​(java.lang.String codebase, java.lang.String className)
      load a class given the classname and a codebase.
    • Method Detail

      • getCodeBase

        java.lang.String getCodeBase​(java.lang.Class<?> cls)
        Returns some sort of codebase for the given class, or null. It is expected that, if str is the result of getCodeBase( cls ), then loadClass( str, cls.getClassName() ) will return cls.
        Parameters:
        cls - Class for which we need a codebase
        Returns:
        A codebase to use with this handler, or null if this handler does not apply to this class.
      • loadClass

        java.lang.Class<?> loadClass​(java.lang.String codebase,
                                     java.lang.String className)
        load a class given the classname and a codebase. The className will always satisfy cls.getClassName().equals( className ) if the call succeeds and returns a Class.
        Parameters:
        codebase - A string that somehow describes which ClassLoader to use. For example, the string could be an ordinary URL that a URL ClassLoader can use, or something more specialized, such as a description of an OSGi bundles and version.
        className - The name of the class to load
        Returns:
        The loaded class, or null if the class could not be loaded.