public final class ComponentInstantiatorSourceImpl extends Object implements ComponentInstantiatorSource, UpdateListener, Runnable, PlasticManagerDelegate, PlasticClassListener
PlasticManager
that allows certain classes to be modified as they are loaded.Constructor and Description |
---|
ComponentInstantiatorSourceImpl(org.slf4j.Logger logger,
LoggerSource loggerSource,
PlasticProxyFactory proxyFactory,
ComponentClassTransformWorker2 transformerChain,
ClasspathURLConverter classpathURLConverter,
OperationTracker tracker,
Map<String,ControlledPackageType> configuration,
boolean productionMode,
ComponentClassResolver resolver,
InternalComponentInvalidationEventHub invalidationHub) |
Modifier and Type | Method and Description |
---|---|
void |
checkForUpdates()
Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.
|
void |
classWillLoad(PlasticClassEvent event)
Invoked just before a class is to be loaded.
|
<T> ClassInstantiator<T> |
configureInstantiator(String className,
ClassInstantiator<T> instantiator)
Configures the instantiator for a transformed PlasticClass.
|
boolean |
exists(String className)
Checks to see if a fully qualified class name exists.
|
void |
forceComponentInvalidation()
Forces invalidation logic, as if a component class on the disk had changed, forcing a reload
of all pages and components.
|
Instantiator |
getInstantiator(String className)
Given the name of a component class, provides an instantiator for that component.
|
PlasticProxyFactory |
getProxyFactory()
Returns a proxy factory that can be used to generate additional classes around enhanced classes, or create
subclasses of enhanced classes.
|
void |
listenForUpdates(UpdateListenerHub hub) |
void |
run() |
void |
transform(PlasticClass plasticClass)
Perform whatever transformations are appropriate on this PlasticClass.
|
public ComponentInstantiatorSourceImpl(org.slf4j.Logger logger, LoggerSource loggerSource, @Builtin PlasticProxyFactory proxyFactory, @Primary ComponentClassTransformWorker2 transformerChain, ClasspathURLConverter classpathURLConverter, OperationTracker tracker, Map<String,ControlledPackageType> configuration, @Symbol(value="tapestry.production-mode") boolean productionMode, ComponentClassResolver resolver, InternalComponentInvalidationEventHub invalidationHub)
@PostInjection public void listenForUpdates(UpdateListenerHub hub)
public void checkForUpdates()
UpdateListener
checkForUpdates
in interface UpdateListener
public void forceComponentInvalidation()
ComponentInstantiatorSource
forceComponentInvalidation
in interface ComponentInstantiatorSource
public Instantiator getInstantiator(String className)
ComponentInstantiatorSource
getInstantiator
in interface ComponentInstantiatorSource
className
- FQCN to find (and perhaps transform and load)public boolean exists(String className)
ComponentInstantiatorSource
exists
in interface ComponentInstantiatorSource
className
- name of class to checkpublic PlasticProxyFactory getProxyFactory()
ComponentInstantiatorSource
getProxyFactory
in interface ComponentInstantiatorSource
public void transform(PlasticClass plasticClass)
PlasticClassTransformer
transform
in interface PlasticClassTransformer
public <T> ClassInstantiator<T> configureInstantiator(String className, ClassInstantiator<T> instantiator)
PlasticManagerDelegate
configureInstantiator
in interface PlasticManagerDelegate
className
- fully qualified class name that was transformedinstantiator
- default instantiator, which has an empty InstanceContext
InstanceContext
valuespublic void classWillLoad(PlasticClassEvent event)
PlasticClassListener
classWillLoad
in interface PlasticClassListener
event
- describes the class to be loaded, and gives access to its disassembled
bytecode (for debugging purposes)5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.