|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PlasticProxyFactory
A service used to create proxies of varying types. As a secondary concern, manages to identify the location of methods and constructors, which is important for exception reporting.
Method Summary | ||
---|---|---|
void |
clearCache()
Clears any cached information stored by the proxy factory; this is useful in Tapestry development mode when a class loader may have been discarded (because the proxy factory may indirectly keep references to classes loaded by the old class loader). |
|
|
createProxy(Class<T> interfaceType,
ObjectCreator<T> creator,
String description)
Creates a proxy instance that delegates all methods through a corresponding ObjectCreator. |
|
|
createProxy(Class<T> interfaceType,
PlasticClassTransformer callback)
Creates a proxy object that implements the indicated interface, then invokes the callback to further configure the proxy. |
|
|
createProxyTransformation(Class<T> interfaceType)
Creates the underlying PlasticClassTransformation for an interface proxy. |
|
ClassLoader |
getClassLoader()
Returns the class loader used when creating new classes, this is a child class loader of another class loader (usually, the thread's context class loader). |
|
Location |
getConstructorLocation(Constructor constructor)
Return a string representation for the constructor (including class and parameters) and (if available) file name and line number. |
|
Location |
getMethodLocation(Method method)
Converts a method to a Location , which includes information about the source file name and line number. |
Methods inherited from interface org.apache.tapestry5.plastic.PlasticClassListenerHub |
---|
addPlasticClassListener, removePlasticClassListener |
Method Detail |
---|
ClassLoader getClassLoader()
<T> ClassInstantiator<T> createProxy(Class<T> interfaceType, PlasticClassTransformer callback)
interfaceType
- interface implemented by proxycallback
- configures the proxy
<T> PlasticClassTransformation<T> createProxyTransformation(Class<T> interfaceType)
PlasticClassTransformation
for an interface proxy. This should only be
used in the cases where encapsulating the PlasticClass construction into a callback is not feasible (which is the case for some of the older APIs inside Tapestry IoC).
interfaceType
- class proxy will extend from
<T> T createProxy(Class<T> interfaceType, ObjectCreator<T> creator, String description)
ObjectCreator.createObject()
(the
creator implementation may decide to
cache the return value as appropriate).
T
- type of proxyinterfaceType
- interface class for proxycreator
- object responsible for creating the real objectdescription
- the toString()
of the proxy
Location getMethodLocation(Method method)
Location
, which includes information about the source file name and line number.
method
- to look up
Location getConstructorLocation(Constructor constructor)
void clearCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |