org.apache.webbeans.proxy
Class JavassistProxyFactory

java.lang.Object
  extended by org.apache.webbeans.proxy.JavassistProxyFactory

public final class JavassistProxyFactory
extends java.lang.Object


Constructor Summary
JavassistProxyFactory()
           
 
Method Summary
 void clear()
           
 java.lang.Class<?> createAbstractDecoratorProxyClass(OwbBean<?> bean)
           
 java.lang.Object createBuildInBeanProxy(OwbBean<?> bean)
           
 java.lang.Object createDependentScopedBeanProxy(OwbBean<?> bean, java.lang.Object actualInstance, javax.enterprise.context.spi.CreationalContext<?> creastionalContext)
           
static WebBeansAnnotation createNewAnnotationProxy(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
           
 java.lang.Object createNormalScopedBeanProxy(OwbBean<?> bean, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
           
 javassist.util.proxy.ProxyFactory createProxyFactory(javax.enterprise.inject.spi.Bean<?> bean)
           
 java.lang.Class<?> defineEjbBeanProxyClass(OwbBean<?> bean, java.lang.Class<?> iface, javassist.util.proxy.ProxyFactory factory)
          Defines the proxy for the given bean and iface using callers factory.
 java.lang.Class<?> getEjbBeanProxyClass(OwbBean<?> bean, java.lang.Class<?> iface)
          Provides the proxy for the given bean and interface, if defined
static JavassistProxyFactory getInstance()
          Deprecated. 
 java.util.Map<OwbBean<?>,java.lang.Class<?>> getInterceptorProxyClasses()
           
 java.lang.Class<?> getProxyClass(javassist.util.proxy.ProxyFactory factory)
           
 java.lang.Class<?> getResourceBeanProxyClass(ResourceBean<?,?> resourceBean)
           
static boolean isProxyInstance(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavassistProxyFactory

public JavassistProxyFactory()
Method Detail

getInterceptorProxyClasses

public java.util.Map<OwbBean<?>,java.lang.Class<?>> getInterceptorProxyClasses()

getInstance

@Deprecated
public static JavassistProxyFactory getInstance()
Deprecated. 


clear

public void clear()

getEjbBeanProxyClass

public java.lang.Class<?> getEjbBeanProxyClass(OwbBean<?> bean,
                                               java.lang.Class<?> iface)
Provides the proxy for the given bean and interface, if defined

Parameters:
bean - the contextual representing the EJB
iface - the injected business local interface
Returns:
the proxy Class if one has been defined, else null

getResourceBeanProxyClass

public java.lang.Class<?> getResourceBeanProxyClass(ResourceBean<?,?> resourceBean)

defineEjbBeanProxyClass

public java.lang.Class<?> defineEjbBeanProxyClass(OwbBean<?> bean,
                                                  java.lang.Class<?> iface,
                                                  javassist.util.proxy.ProxyFactory factory)
Defines the proxy for the given bean and iface using callers factory. Due to races with the concurrentmap, this might sometimes create additional javassist-defined classes that are not used by the caller and not stored in the map. Synchronizing the entire method, and getEjbBeanProxyClass, on ejbProxyClasses is an alternative.

Parameters:
bean - the contextual representing the EJB
iface - the injected business local interface
factory -
Returns:

createAbstractDecoratorProxyClass

public java.lang.Class<?> createAbstractDecoratorProxyClass(OwbBean<?> bean)

createNormalScopedBeanProxy

public java.lang.Object createNormalScopedBeanProxy(OwbBean<?> bean,
                                                    javax.enterprise.context.spi.CreationalContext<?> creationalContext)

createBuildInBeanProxy

public java.lang.Object createBuildInBeanProxy(OwbBean<?> bean)

createDependentScopedBeanProxy

public java.lang.Object createDependentScopedBeanProxy(OwbBean<?> bean,
                                                       java.lang.Object actualInstance,
                                                       javax.enterprise.context.spi.CreationalContext<?> creastionalContext)

getProxyClass

public java.lang.Class<?> getProxyClass(javassist.util.proxy.ProxyFactory factory)

createProxyFactory

public javassist.util.proxy.ProxyFactory createProxyFactory(javax.enterprise.inject.spi.Bean<?> bean)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

createNewAnnotationProxy

public static WebBeansAnnotation createNewAnnotationProxy(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)

isProxyInstance

public static boolean isProxyInstance(java.lang.Object o)
Parameters:
o - the object to check
Returns:
true if the given object is a proxy


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.