01: package org.hibernate.bytecode;
02:
03: import org.hibernate.proxy.ProxyFactory;
04:
05: /**
06: * An interface for factories of {@link ProxyFactory proxy factory} instances.
07: * <p/>
08: * Currently used to abstract from the tupizer whether we are using CGLIB or
09: * Javassist for lazy proxy generation.
10: *
11: * @author Steve Ebersole
12: */
13: public interface ProxyFactoryFactory {
14: /**
15: * Build a proxy factory specifically for handling runtime
16: * lazy loading.
17: *
18: * @return The lazy-load proxy factory.
19: */
20: public ProxyFactory buildProxyFactory();
21:
22: /**
23: * Build a proxy factory for basic proxy concerns. The return
24: * should be capable of properly handling newInstance() calls.
25: * <p/>
26: * Should build basic proxies essentially equivalent to JDK proxies in
27: * terms of capabilities, but should be able to deal with abstract super
28: * classes in addition to proxy interfaces.
29: * <p/>
30: * Must pass in either superClass or interfaces (or both).
31: *
32: * @param superClass The abstract super class (or null if none).
33: * @param interfaces Interfaces to be proxied (or null if none).
34: * @return The proxy class
35: */
36: public BasicProxyFactory buildBasicProxyFactory(Class super Class,
37: Class[] interfaces);
38: }
|