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, 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 String |
getProxyNameSuffix()
Returns a suffix to append to the name of the proxy class.
|
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructors, addInterface, addInterfacesFromTypeClosure, addMethods, addMethodsFromClass, addSpecialMethods, createInterceptorBody, createSpecialMethodBody, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getCachedProxyClass, getContextId, getProxyClass, invokeMethodHandler, isCreatingProxy, isProxy, isUsingUnsafeInstantiators, 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(org.jboss.classfilewriter.ClassFile proxyClassType, List<DeferredBytecode> initialValueBytecode)
addFields
in class ProxyFactory<T>
protected void addSerializationSupport(org.jboss.classfilewriter.ClassFile proxyClassType)
ProxyFactory
addSerializationSupport
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()
ProxyFactory
getProxyNameSuffix
in class ProxyFactory<T>
Copyright © 2016. All rights reserved.