| org.apache.tapestry.internal.services.ComponentInstantiatorSource
All known Subclasses: org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl,
ComponentInstantiatorSource | public interface ComponentInstantiatorSource extends InvalidationEventHub(Code) | | Creates
org.apache.tapestry.internal.services.Instantiator s for components, based on
component class name. This will involve transforming the component's class before it is loaded.
In addition, a source acts as an event hub for
org.apache.tapestry.internal.events.InvalidationListener s, so that any information derived from
loaded classes can be discarded and rebuilt when classes change.
The strategy used is that when any class (in a controlled package) changes, the entire
class loader is discarded, along with any instances derived from those classes. A new class
loader is created, and then invalidation events are fired to listeners.
|
Method Summary | |
void | addPackage(String packageName) Adds a controlled package. | boolean | exists(String className) Checks to see if a fully qualfied class name exists. | Instantiator | findInstantiator(String classname) Given the name of a component class, provides an instantiator for that component. | ClassFactory | getClassFactory() Returns a class factory that can be used to generate additional classes around enhanced
classes, or create subclasses of enhanced classes. |
addPackage | void addPackage(String packageName)(Code) | | Adds a controlled package. Only classes within controlled packages are subject to
transformation.
Parameters: packageName - the package name to add (must not be blank) |
exists | boolean exists(String className)(Code) | | Checks to see if a fully qualfied class name exists.
Parameters: className - name of class to check true if the class exists (there's a ".class" file), false otherwise |
findInstantiator | Instantiator findInstantiator(String classname)(Code) | | Given the name of a component class, provides an instantiator for that component.
Instantiators are cached, so repeated calls to this method with the same class name will
return the same instance; however, callers should also be aware that the instantiators may
lose validity after an invalidation (caused by changes to external Java class files).
Parameters: classname - FQCN to find (and perhaps transform and load) an object which can instantiate an instance of the component |
getClassFactory | ClassFactory getClassFactory()(Code) | | Returns a class factory that can be used to generate additional classes around enhanced
classes, or create subclasses of enhanced classes.
|
|
|