Class DecoratorProxyFactory<T>

java.lang.Object
org.jboss.weld.bean.proxy.ProxyFactory<T>
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
  • Field Details

  • Constructor Details

  • Method Details

    • 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(org.jboss.classfilewriter.ClassFile proxyClassType, org.jboss.classfilewriter.ClassMethod staticConstructor)
      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 <class-name>_$$_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
    • isUsingProxyInstantiator

      protected boolean isUsingProxyInstantiator()
      Overrides:
      isUsingProxyInstantiator in class ProxyFactory<T>
      Returns:
      true if ProxyInstantiator is used to instantiate proxy instances