org.jboss.weld.bean.proxy
Class DecoratorProxyFactory<T>

java.lang.Object
  extended by org.jboss.weld.bean.proxy.ProxyFactory<T>
      extended by org.jboss.weld.bean.proxy.DecoratorProxyFactory<T>

public class DecoratorProxyFactory<T>
extends ProxyFactory<T>

This special proxy factory is mostly used for abstract decorators. When a delegate field is injected, the abstract methods directly invoke the corresponding method on the delegate. All other cases forward the calls to the BeanInstance for further processing.

Author:
David Allen, Stuart Douglas

Nested Class Summary
protected static class DecoratorProxyFactory.TargetInstanceBytecodeMethodResolver
           
 
Field Summary
static String PROXY_SUFFIX
           
 
Fields inherited from class org.jboss.weld.bean.proxy.ProxyFactory
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, log
 
Constructor Summary
DecoratorProxyFactory(Class<T> proxyType, WeldInjectionPoint<?,?> delegateInjectionPoint, javax.enterprise.inject.spi.Bean<?> bean)
           
 
Method Summary
protected  void addAdditionalInterfaces(Set<Class<?>> interfaces)
          Sub classes may override to specify additional interfaces the proxy should implement
protected  void addMethodsFromClass(javassist.bytecode.ClassFile proxyClassType)
           
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
addConstructedGuardToMethodBody, addConstructors, addFields, addInterface, addMethods, addSerializationSupport, addSpecialMethods, create, createForwardingMethodBody, createInterceptorBody, createSpecialMethodBody, generateEqualsMethod, generateHashCodeMethod, 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

PROXY_SUFFIX

public static final String PROXY_SUFFIX
See Also:
Constant Field Values
Constructor Detail

DecoratorProxyFactory

public DecoratorProxyFactory(Class<T> proxyType,
                             WeldInjectionPoint<?,?> delegateInjectionPoint,
                             javax.enterprise.inject.spi.Bean<?> bean)
Method Detail

addAdditionalInterfaces

protected void addAdditionalInterfaces(Set<Class<?>> interfaces)
Description copied from class: ProxyFactory
Sub classes may override to specify additional interfaces the proxy should implement

Overrides:
addAdditionalInterfaces in class ProxyFactory<T>

addMethodsFromClass

protected void addMethodsFromClass(javassist.bytecode.ClassFile proxyClassType)
Overrides:
addMethodsFromClass in class ProxyFactory<T>

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 class ProxyFactory<T>
Returns:
a name suffix


Copyright © 2013 Seam Framework. All Rights Reserved.