ariba.ui.aribaweb.util
Class AWClassLoader

java.lang.Object
  extended by ariba.ui.aribaweb.util.AWClassLoader
Direct Known Subclasses:
AWClassLoader.PairedFileLoader, AWDefaultClassLoader

public class AWClassLoader
extends java.lang.Object

Loader abstraction used by AW to load (and reload) classes for AWComponents. Subclasses can support dynamic class reloading (AWReload), alternate languages (Groovy, etc)


Nested Class Summary
static class AWClassLoader.LoadInfo
           
static class AWClassLoader.PairedFileLoader
          Loader subclass for loaders that look for a source file sitting alongside the awl
 
Field Summary
static java.lang.String ClassReloadedTopic
           
 
Constructor Summary
AWClassLoader()
           
 
Method Summary
 void checkForUpdates()
          For class loaders that support reloading non-AWComponent classes, this is a trigger point to scan previously loaded files to see if any should be reloaded (e.g.
 java.lang.Class checkReloadClass(java.lang.Class cls)
           
 java.lang.Class getClass(java.lang.String className)
          Load class.
 java.lang.String getComponentNameForClass(java.lang.String className)
           
 boolean isReloadable(java.lang.String name)
           
 void setChainedClassLoader(AWClassLoader next)
          The chained classloader is forwarded all calls not fully handled by the first AWClassLoader (when the first one calls super()).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ClassReloadedTopic

public static final java.lang.String ClassReloadedTopic
See Also:
Constant Field Values
Constructor Detail

AWClassLoader

public AWClassLoader()
Method Detail

getClass

public java.lang.Class getClass(java.lang.String className)
                         throws java.lang.ClassNotFoundException
Load class.

Returns:
null if the class is not found, the class (or a suitable subclass) otherwise
Throws:
java.lang.ClassNotFoundException

isReloadable

public boolean isReloadable(java.lang.String name)
Returns:
true if the class might be reloaded, so should not be cached.

getComponentNameForClass

public java.lang.String getComponentNameForClass(java.lang.String className)
Parameters:
className - the name of the class for the component.
Returns:
The name of the component. The className may be that of a subclass of the actual class, not the real className.

checkForUpdates

public void checkForUpdates()
For class loaders that support reloading non-AWComponent classes, this is a trigger point to scan previously loaded files to see if any should be reloaded (e.g. scanning .class files in the build directory)


checkReloadClass

public java.lang.Class checkReloadClass(java.lang.Class cls)

setChainedClassLoader

public void setChainedClassLoader(AWClassLoader next)
The chained classloader is forwarded all calls not fully handled by the first AWClassLoader (when the first one calls super()).

Parameters:
next - the loader to receive forwarded calls


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.