public class ClientProxyFactory<T> extends ProxyFactory<T>
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, INIT_METHOD_NAME, LBEAN_IDENTIFIER, LJAVA_LANG_BYTE, LJAVA_LANG_CLASS, LJAVA_LANG_OBJECT, LJAVA_LANG_REFLECT_METHOD, LJAVA_LANG_STRING, LJAVA_LANG_THREAD_LOCAL, METHOD_HANDLER_FIELD_NAME, PROXY_SUFFIX| Constructor and Description |
|---|
ClientProxyFactory(String contextId,
Class<?> proxiedBeanType,
Set<? extends Type> typeClosure,
Bean<?> bean) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFields(ClassFile proxyClassType,
List<DeferredBytecode> initialValueBytecode) |
protected void |
addSerializationSupport(ClassFile proxyClassType)
Adds special serialization code.
|
T |
create(BeanInstance beanInstance)
Method to create a new proxy that wraps the bean instance.
|
protected void |
createForwardingMethodBody(ClassMethod classMethod,
MethodInformation methodInfo,
ClassMethod staticConstructor)
Calls methodHandler.invoke with a null method parameter in order to
get the underlying instance.
|
protected void |
generateEqualsMethod(ClassFile proxyClassType)
Client proxies are equal to other client proxies for the same bean.
|
protected void |
generateHashCodeMethod(ClassFile proxyClassType)
Client proxies use the following hashCode:
MyProxyName.class.hashCode() |
protected Class<? extends MethodHandler> |
getMethodHandlerType() |
protected String |
getProxyNameSuffix()
Returns a suffix to append to the name of the proxy class.
|
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructors, addInterface, addInterfacesFromTypeClosure, addMethods, addMethodsFromClass, addSpecialMethods, createInterceptorBody, createSpecialMethodBody, generateGetMethodHandlerBody, generateSetMethodHandlerBody, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getCachedProxyClass, getContextId, getMethodHandlerField, getProxyClass, invokeMethodHandler, isCreatingProxy, isProxy, isUsingUnsafeInstantiators, resolveClassLoaderForBeanProxy, setBeanInstancepublic T create(BeanInstance beanInstance)
ProxyFactorycreate in class ProxyFactory<T>beanInstance - the bean instanceprotected void addFields(ClassFile proxyClassType, List<DeferredBytecode> initialValueBytecode)
addFields in class ProxyFactory<T>protected Class<? extends MethodHandler> getMethodHandlerType()
getMethodHandlerType in class ProxyFactory<T>protected void addSerializationSupport(ClassFile proxyClassType)
ProxyFactoryaddSerializationSupport in class ProxyFactory<T>proxyClassType - the Javassist class for the proxy classprotected void createForwardingMethodBody(ClassMethod classMethod, MethodInformation methodInfo, ClassMethod staticConstructor)
createForwardingMethodBody in class ProxyFactory<T>protected void generateHashCodeMethod(ClassFile proxyClassType)
MyProxyName.class.hashCode()generateHashCodeMethod in class ProxyFactory<T>protected void generateEqualsMethod(ClassFile proxyClassType)
return other instanceof MyProxyClassType.class
generateEqualsMethod in class ProxyFactory<T>proxyClassType - The class fileprotected String getProxyNameSuffix()
ProxyFactorygetProxyNameSuffix in class ProxyFactory<T>Copyright © 2015. All Rights Reserved.