|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.weld.bean.proxy.ProxyFactory<T>
org.jboss.weld.bean.proxy.ClientProxyFactory<T>
public class ClientProxyFactory<T>
Proxy factory that generates client proxies, it uses optimizations that are not valid for other proxy types.
Field Summary | |
---|---|
static String |
CLIENT_PROXY_SUFFIX
|
Fields inherited from class org.jboss.weld.bean.proxy.ProxyFactory |
---|
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, log, PROXY_SUFFIX |
Constructor Summary | |
---|---|
ClientProxyFactory(Class<?> proxiedBeanType,
Set<? extends Type> typeClosure,
javax.enterprise.inject.spi.Bean<?> bean)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.jboss.weld.bean.proxy.ProxyFactory |
---|
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructors, addInterface, addMethods, addMethodsFromClass, addSpecialMethods, createInterceptorBody, createSpecialMethodBody, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getProxyClass, invokeMethodHandler, isProxy, resolveClassLoaderForBeanProxy, resolveClassLoaderForBeanProxy, setBeanInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CLIENT_PROXY_SUFFIX
Constructor Detail |
---|
public ClientProxyFactory(Class<?> proxiedBeanType, Set<? extends Type> typeClosure, javax.enterprise.inject.spi.Bean<?> bean)
Method Detail |
---|
public T create(BeanInstance beanInstance)
ProxyFactory
create
in class ProxyFactory<T>
beanInstance
- the bean instance
protected 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>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |