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,
javax.enterprise.inject.spi.Bean<?> bean) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFields(org.jboss.classfilewriter.ClassFile proxyClassType,
List<DeferredBytecode> initialValueBytecode) |
protected void |
addSerializationSupport(org.jboss.classfilewriter.ClassFile proxyClassType)
Adds special serialization code.
|
T |
create(BeanInstance beanInstance)
Method to create a new proxy that wraps the bean instance.
|
protected void |
createForwardingMethodBody(org.jboss.classfilewriter.ClassMethod classMethod,
MethodInformation methodInfo,
org.jboss.classfilewriter.ClassMethod staticConstructor)
Calls methodHandler.invoke with a null method parameter in order to
get the underlying instance.
|
protected void |
generateEqualsMethod(org.jboss.classfilewriter.ClassFile proxyClassType)
Client proxies are equal to other client proxies for the same bean.
|
protected void |
generateHashCodeMethod(org.jboss.classfilewriter.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.
|
protected boolean |
isMethodAccepted(Method method,
Class<?> proxySuperclass) |
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructedGuardToMethodBody, addConstructors, addInterface, addInterfacesFromTypeClosure, addMethods, addMethodsFromClass, addSpecialMethods, createInterceptorBody, createSpecialMethodBody, generateGetMethodHandlerBody, generateSetMethodHandlerBody, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getContextId, getMethodHandlerField, getProxyClass, invokeMethodHandler, isProxy, resolveClassLoaderForBeanProxy, run, setBeanInstancepublic T create(BeanInstance beanInstance)
ProxyFactorycreate in class ProxyFactory<T>beanInstance - the bean instanceprotected void addFields(org.jboss.classfilewriter.ClassFile proxyClassType,
List<DeferredBytecode> initialValueBytecode)
addFields in class ProxyFactory<T>protected Class<? extends MethodHandler> getMethodHandlerType()
getMethodHandlerType in class ProxyFactory<T>protected void addSerializationSupport(org.jboss.classfilewriter.ClassFile proxyClassType)
ProxyFactoryaddSerializationSupport in class ProxyFactory<T>proxyClassType - the Javassist class for the proxy classprotected void createForwardingMethodBody(org.jboss.classfilewriter.ClassMethod classMethod,
MethodInformation methodInfo,
org.jboss.classfilewriter.ClassMethod staticConstructor)
createForwardingMethodBody in class ProxyFactory<T>protected void generateHashCodeMethod(org.jboss.classfilewriter.ClassFile proxyClassType)
MyProxyName.class.hashCode()generateHashCodeMethod in class ProxyFactory<T>protected void generateEqualsMethod(org.jboss.classfilewriter.ClassFile proxyClassType)
return other instanceof MyProxyClassType.class
generateEqualsMethod in class ProxyFactory<T>proxyClassType - The class fileprotected String getProxyNameSuffix()
ProxyFactorygetProxyNameSuffix in class ProxyFactory<T>protected boolean isMethodAccepted(Method method, Class<?> proxySuperclass)
isMethodAccepted in class ProxyFactory<T>Copyright © 2017. All rights reserved.