Class AbstractReloadableObjectCreator
- java.lang.Object
-
- org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator
-
- All Implemented Interfaces:
ObjectCreator,ClassLoaderDelegate,UpdateListener
- Direct Known Subclasses:
ReloadableObjectCreator,ReloadableServiceImplementationObjectCreator
public abstract class AbstractReloadableObjectCreator extends java.lang.Object implements ObjectCreator, UpdateListener, ClassLoaderDelegate
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractReloadableObjectCreator(PlasticProxyFactory proxyFactory, java.lang.ClassLoader baseClassLoader, java.lang.String implementationClassName, org.slf4j.Logger logger, OperationTracker tracker)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcheckForUpdates()Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.protected abstract java.lang.ObjectcreateInstance(java.lang.Class clazz)Invoked when an instance of the class is needed.java.lang.ObjectcreateObject()Create and return the object.java.lang.Class<?>doClassLoad(java.lang.String className)java.lang.Class<?>loadAndTransformClass(java.lang.String className)Load the class, transforming it as necessary.booleanshouldInterceptClassLoading(java.lang.String className)Identifies which classes are to be loaded.
-
-
-
Constructor Detail
-
AbstractReloadableObjectCreator
protected AbstractReloadableObjectCreator(PlasticProxyFactory proxyFactory, java.lang.ClassLoader baseClassLoader, java.lang.String implementationClassName, org.slf4j.Logger logger, OperationTracker tracker)
-
-
Method Detail
-
checkForUpdates
public void checkForUpdates()
Description copied from interface:UpdateListenerInvoked to force the receiver to check for updates to whatever underlying resources it makes use of.- Specified by:
checkForUpdatesin interfaceUpdateListener
-
createObject
public java.lang.Object createObject()
Description copied from interface:ObjectCreatorCreate and return the object. In some limited circumstances, the implementation may cache the result, returning the same object for repeated calls.- Specified by:
createObjectin interfaceObjectCreator
-
createInstance
protected abstract java.lang.Object createInstance(java.lang.Class clazz)
Invoked when an instance of the class is needed. It is the responsibility of this method (as implemented in a subclass) to instantiate the class and inject dependencies into the class.
-
shouldInterceptClassLoading
public boolean shouldInterceptClassLoading(java.lang.String className)
Description copied from interface:ClassLoaderDelegateIdentifies which classes are to be loaded.- Specified by:
shouldInterceptClassLoadingin interfaceClassLoaderDelegate- Parameters:
className- fully qualified class name- Returns:
- true if the class should be intercepted, false to let parent class loader load class
-
loadAndTransformClass
public java.lang.Class<?> loadAndTransformClass(java.lang.String className) throws java.lang.ClassNotFoundException
Description copied from interface:ClassLoaderDelegateLoad the class, transforming it as necessary.- Specified by:
loadAndTransformClassin interfaceClassLoaderDelegate- Parameters:
className- binary class name- Returns:
- loaded and (if not an inner class) transformed class
- Throws:
java.lang.ClassNotFoundException
-
doClassLoad
public java.lang.Class<?> doClassLoad(java.lang.String className) throws java.io.IOException
- Throws:
java.io.IOException
-
-