|
|
|
@ -93,20 +93,20 @@ public final class LazyLoadingProxyFactory { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Create the {@link ProxyFactory} for the given type, already adding required additional interfaces. |
|
|
|
* Create the {@link ProxyFactory} for the given type, already adding required additional interfaces. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param propertyType the type to proxy |
|
|
|
* @param targetType the type to proxy. |
|
|
|
* @return the proxy type. |
|
|
|
* @return the prepared {@link ProxyFactory}. |
|
|
|
* @since 4.0.5 |
|
|
|
* @since 4.0.5 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static ProxyFactory prepareFactory(Class<?> propertyType) { |
|
|
|
public static ProxyFactory prepareFactory(Class<?> targetType) { |
|
|
|
|
|
|
|
|
|
|
|
ProxyFactory proxyFactory = new ProxyFactory(); |
|
|
|
ProxyFactory proxyFactory = new ProxyFactory(); |
|
|
|
|
|
|
|
|
|
|
|
for (Class<?> type : propertyType.getInterfaces()) { |
|
|
|
for (Class<?> type : targetType.getInterfaces()) { |
|
|
|
proxyFactory.addInterface(type); |
|
|
|
proxyFactory.addInterface(type); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
proxyFactory.addInterface(LazyLoadingProxy.class); |
|
|
|
proxyFactory.addInterface(LazyLoadingProxy.class); |
|
|
|
proxyFactory.addInterface(propertyType); |
|
|
|
proxyFactory.addInterface(targetType); |
|
|
|
|
|
|
|
|
|
|
|
return proxyFactory; |
|
|
|
return proxyFactory; |
|
|
|
} |
|
|
|
} |
|
|
|
|