Package org.jboss.weld.bean.proxy
Class InterceptedProxyFactory<T>
- java.lang.Object
-
- org.jboss.weld.bean.proxy.ProxyFactory<T>
-
- org.jboss.weld.bean.proxy.InterceptedProxyFactory<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
PrivilegedAction<T>
public class InterceptedProxyFactory<T> extends ProxyFactory<T>
Generates proxies used to apply interceptors to custom bean instances and return values of producer methods.- Author:
- Martin Kouba, Matej Novotny
- See Also:
InterceptionFactoryImpl
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROXY_SUFFIX
-
Fields inherited from class org.jboss.weld.bean.proxy.ProxyFactory
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, INIT_METHOD_NAME, INVOKE_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, WELD_PROXY_PREFIX
-
-
Constructor Summary
Constructors Constructor Description InterceptedProxyFactory(String contextId, Class<?> proxiedBeanType, Set<? extends Type> typeClosure, Set<MethodSignature> enhancedMethodSignatures, Set<MethodSignature> interceptedMethodSignatures, String suffix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInterfacesFromTypeClosure(Set<? extends Type> typeClosure, Class<?> proxiedBeanType)
protected void
addMethodsFromClass(org.jboss.classfilewriter.ClassFile proxyClassType, org.jboss.classfilewriter.ClassMethod staticConstructor)
protected String
getProxyNameSuffix()
Returns a suffix to append to the name of the proxy class.protected boolean
isMethodAccepted(Method method, Class<?> proxySuperclass)
-
Methods inherited from class org.jboss.weld.bean.proxy.ProxyFactory
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructedGuardToMethodBody, addConstructors, addFields, addInterface, addMethods, addSerializationSupport, addSpecialMethods, create, createForwardingMethodBody, createInterceptorBody, createSpecialMethodBody, generateEqualsMethod, generateGetMethodHandlerBody, generateHashCodeMethod, generateSetMethodHandlerBody, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getContextId, getMethodHandlerField, getMethodHandlerType, getProxiedBeanType, getProxyClass, getProxySuperclass, invokeMethodHandler, isUsingProxyInstantiator, run, setBeanInstance, toClass
-
-
-
-
Field Detail
-
PROXY_SUFFIX
public static final String PROXY_SUFFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InterceptedProxyFactory
public InterceptedProxyFactory(String contextId, Class<?> proxiedBeanType, Set<? extends Type> typeClosure, Set<MethodSignature> enhancedMethodSignatures, Set<MethodSignature> interceptedMethodSignatures, String suffix)
-
-
Method Detail
-
getProxyNameSuffix
protected String getProxyNameSuffix()
Description copied from class:ProxyFactory
Returns a suffix to append to the name of the proxy class. The name already consists of_$$_Weld, to which the suffix is added. This allows the creation of different types of proxies for the same class. - Overrides:
getProxyNameSuffix
in classProxyFactory<T>
- Returns:
- a name suffix
-
addMethodsFromClass
protected void addMethodsFromClass(org.jboss.classfilewriter.ClassFile proxyClassType, org.jboss.classfilewriter.ClassMethod staticConstructor)
- Overrides:
addMethodsFromClass
in classProxyFactory<T>
-
addInterfacesFromTypeClosure
public void addInterfacesFromTypeClosure(Set<? extends Type> typeClosure, Class<?> proxiedBeanType)
- Overrides:
addInterfacesFromTypeClosure
in classProxyFactory<T>
-
isMethodAccepted
protected boolean isMethodAccepted(Method method, Class<?> proxySuperclass)
- Overrides:
isMethodAccepted
in classProxyFactory<T>
-
-