Class Index | File Index

Classes


Class System.ClassLoader

A class loader is responsible for loading class. Its behaviour is quite the same as ClassLoaders in Java, but since this is JavaScript, you need to be very careful of what you are doing.

Basically ZWT defines a system classLoader that should be used to load every classes. Again, this is not Java, there is no use to create a complex classLoader hierarchy.

Classes are asynchronously loaded, it means a class may not be loaded when the loadClass method returns, you should use the System.ClassLoader.ClassLoadListener to monitor classes load.


Defined in: zwt.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
System.ClassLoader(array_urls)
Construct a System.ClassLoader object.
Method Summary
Method Attributes Method Name and Description
 
addUrl(URL_url)
Append the specified URL to the list of URLs to search for classes.
 
defineClass(string_name, string_data)
Define the specified class data.
 
Return the class load event manager associated to the ClassLoader.
<static>  
System.ClassLoader.getSystemClassLoader()
Return the system class loader.
 
isClassLoaded(string_name)
Test if the specified class is already loaded.
 
loadClass(string_name)
Load the specified class.
Class Detail
System.ClassLoader(array_urls)
Construct a System.ClassLoader object.
Author: Jeremy KUHN.
Parameters:
{String[]} array_urls
The URLs used to search for classes.
See:
System.ClassLoader.ClassLoadEventManager
Method Detail
addUrl(URL_url)
Append the specified URL to the list of URLs to search for classes.
Parameters:
{URL} URL_url
The URL to add.

defineClass(string_name, string_data)
Define the specified class data.
Parameters:
{String} string_name
The class name.
{String} string_data
The string data.

{System.ClassLoader.ClassLoadEventManager} getClassLoadEventManager()
Return the class load event manager associated to the ClassLoader.
Returns:
A Class load event manager

<static> {System.ClassLoader} System.ClassLoader.getSystemClassLoader()
Return the system class loader.
Returns:
The system class loader.

{Boolean} isClassLoaded(string_name)
Test if the specified class is already loaded.
Parameters:
{String} string_name
The class to test.
Returns:
true if the string_name is loaded.

loadClass(string_name)
Load the specified class. The class is loaded asynchronously so this method may return before the class is actually loaded.
Parameters:
{String} string_name
The class name.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Nov 09 2011 19:29:06 GMT+0100 (CET)