net.sf.j2s.ajax
Class AClass

java.lang.Object
  extended bynet.sf.j2s.ajax.AClass
Direct Known Subclasses:
ASWTClass

public class AClass
extends java.lang.Object

This class is an asynchronous version of Class. It is designed for function of Class#forName. While Class#forName will try to load class in synchronous mode, this class AClass#load is trying to load class in asynchronous mode. A callback object is provided for action to be executed after the class is loaded.

Author:
josson smith 2006-8-4

Method Summary
static void load(java.lang.String clazzName, java.lang.Runnable afterLoaded)
          Load the class by the given class name and execute the given callback after class is loaded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static void load(java.lang.String clazzName,
                        java.lang.Runnable afterLoaded)
Load the class by the given class name and execute the given callback after class is loaded.

Parameters:
clazzName - String given class name.
afterLoaded - Runnable given callback. If this parameter is an instance of ARunnable, the callback will receive the loaded class automatically.