public class ClientProxyFactory<T> extends ProxyFactory<T>
Modifier and Type | Field and Description |
---|---|
static String |
CLIENT_PROXY_SUFFIX |
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, log, PROXY_SUFFIX
Constructor and Description |
---|
ClientProxyFactory(Class<?> proxiedBeanType,
Set<? extends Type> typeClosure,
javax.enterprise.inject.spi.Bean<?> bean) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFields(javassist.bytecode.ClassFile proxyClassType,
javassist.bytecode.Bytecode initialValueBytecode) |
protected void |
addSerializationSupport(javassist.bytecode.ClassFile proxyClassType)
Adds special serialization code.
|
T |
create(BeanInstance beanInstance)
Method to create a new proxy that wraps the bean instance.
|
protected javassist.bytecode.Bytecode |
createForwardingMethodBody(javassist.bytecode.ClassFile file,
MethodInformation methodInfo)
Calls methodHandler.invoke with a null method parameter in order to
get the underlying instance.
|
protected javassist.bytecode.MethodInfo |
generateEqualsMethod(javassist.bytecode.ClassFile proxyClassType)
Client proxies are equal to other client proxies for the same bean.
|
protected javassist.bytecode.MethodInfo |
generateHashCodeMethod(javassist.bytecode.ClassFile proxyClassType)
Client proxies use the following hashCode:
MyProxyName.class.hashCode() |
protected String |
getProxyNameSuffix()
Returns a suffix to append to the name of the proxy class.
|
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructors, addInterface, addMethods, addMethodsFromClass, addSpecialMethods, createInterceptorBody, createSpecialMethodBody, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getProxyClass, invokeMethodHandler, isProxy, resolveClassLoaderForBeanProxy, resolveClassLoaderForBeanProxy, setBeanInstance
public static final String CLIENT_PROXY_SUFFIX
public T create(BeanInstance beanInstance)
ProxyFactory
create
in class ProxyFactory<T>
beanInstance
- the bean instanceprotected void addFields(javassist.bytecode.ClassFile proxyClassType, javassist.bytecode.Bytecode initialValueBytecode)
addFields
in class ProxyFactory<T>
protected void addSerializationSupport(javassist.bytecode.ClassFile proxyClassType)
ProxyFactory
addSerializationSupport
in class ProxyFactory<T>
proxyClassType
- the Javassist class for the proxy classprotected javassist.bytecode.Bytecode createForwardingMethodBody(javassist.bytecode.ClassFile file, MethodInformation methodInfo) throws javassist.NotFoundException
createForwardingMethodBody
in class ProxyFactory<T>
javassist.NotFoundException
protected javassist.bytecode.MethodInfo generateHashCodeMethod(javassist.bytecode.ClassFile proxyClassType)
MyProxyName.class.hashCode()
generateHashCodeMethod
in class ProxyFactory<T>
protected javassist.bytecode.MethodInfo generateEqualsMethod(javassist.bytecode.ClassFile proxyClassType)
return other instanceof MyProxyClassType.class
generateEqualsMethod
in class ProxyFactory<T>
proxyClassType
- The class fileprotected String getProxyNameSuffix()
ProxyFactory
getProxyNameSuffix
in class ProxyFactory<T>
Copyright © 2013 Seam Framework. All rights reserved.