openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r786832 - in /incubator/openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/annotation/specific/ main/java/org/apache/webbeans/component/ main/java/org/apache/webbeans/config/ main/java/org/apache/webbeans/container/ main/ja...
Date Sat, 20 Jun 2009 14:42:12 GMT
Author: gerdogdu
Date: Sat Jun 20 14:42:11 2009
New Revision: 786832

URL: http://svn.apache.org/viewvc?rev=786832&view=rev
Log:
Reflect API changes.

Added:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java   (contents, props changed)
      - copied, changed from r782277, incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/inject/Realizes.java
Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/Component.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ChildActivityManager.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java   (contents, props changed)
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/realization/RealizationComponent1.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
    incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java

Copied: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java (from r782277, incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/inject/Realizes.java)
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java?p2=incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java&p1=incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/inject/Realizes.java&r1=782277&r2=786832&rev=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/inject/Realizes.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java Sat Jun 20 14:42:11 2009
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package javax.inject;
+package org.apache.webbeans.annotation.specific;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
@@ -22,6 +22,18 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+/**
+ * This annotation support realization of
+ * generic beans via special beans.
+ * 
+ * This functionality is removed from the specification,
+ * but we want to support it.
+ * 
+ * 
+ * 
+ * @version $Rev$ $Date$
+ *
+ */
 @Target(value={ElementType.TYPE})
 @Retention(value=RetentionPolicy.RUNTIME)
 @Documented

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/specific/Realizes.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/Component.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/Component.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/Component.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/Component.java Sat Jun 20 14:42:11 2009
@@ -35,50 +35,68 @@
  * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
  * @since 1.0
  */
-public abstract class Component<T> extends Bean<T>
+public abstract class Component<T> implements Bean<T>
 {
+	/**Manager for beans*/
+    private final BeanManager manager;
+
+    /**
+     * Creates a new bean instance with given manager.
+     * 
+     * @param manager bean manager
+     */
     protected Component(BeanManager manager)
     {
-        super(manager);
+        this.manager = manager;
+    }
+    
+    /**
+     * Gets manager instance
+     * 
+     * @return manager instance
+     */
+    protected BeanManager getManager()
+    {
+        return manager;
     }
     
-    abstract public IBeanInheritedMetaData getInheritedMetaData();
+    public abstract IBeanInheritedMetaData getInheritedMetaData();
     
-    abstract public Annotation getType();
+    public abstract Annotation getType();
 
-    abstract public void setType(Annotation type);
+    public abstract void setType(Annotation type);
 
-    abstract public Annotation getImplScopeType();
+    public abstract Annotation getImplScopeType();
 
-    abstract public void setImplScopeType(Annotation scopeType);
+    public abstract void setImplScopeType(Annotation scopeType);
 
-    abstract public WebBeansType getWebBeansType();
+    public abstract WebBeansType getWebBeansType();
 
-    abstract public void addBindingType(Annotation bindingType);
+    public abstract void addBindingType(Annotation bindingType);
 
-    abstract public void addStereoType(Annotation stereoType);
+    public abstract void addStereoType(Annotation stereoType);
 
-    abstract public void addApiType(Class<?> apiType);
+    public abstract void addApiType(Class<?> apiType);
     
-    abstract public void addInjectionPoint(InjectionPoint injectionPoint);
+    public abstract void addInjectionPoint(InjectionPoint injectionPoint);
 
-    abstract public Set<Annotation> getImplBindingTypes();
+    public abstract Set<Annotation> getImplBindingTypes();
 
-    abstract public Set<Annotation> getStereotypes();
+    public abstract Set<Annotation> getStereotypes();
 
-    abstract public void setName(String name);
+    public abstract void setName(String name);
 
-    abstract public int getPrecedence();
+    public abstract int getPrecedence();
 
-    abstract public Class<T> getReturnType();
+    public abstract Class<T> getReturnType();
 
-    abstract public Object getDependent(Bean<?> dependentComponent,InjectionPoint injectionPoint);
+    public abstract Object getDependent(Bean<?> dependentComponent,InjectionPoint injectionPoint);
 
-    abstract public List<InterceptorData> getInterceptorStack();
+    public abstract List<InterceptorData> getInterceptorStack();
 
-    abstract public List<Object> getDecoratorStack();
+    public abstract List<Object> getDecoratorStack();
 
-    abstract public void setSerializable(boolean serializable);
+    public abstract void setSerializable(boolean serializable);
 
-    abstract public void setNullable(boolean nullable);
+    public abstract void setNullable(boolean nullable);
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java Sat Jun 20 14:42:11 2009
@@ -43,12 +43,12 @@
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.event.Fires;
 import javax.inject.Obtains;
-import javax.inject.Realizes;
 
 import org.apache.webbeans.annotation.AnyScopeLiteral;
 import org.apache.webbeans.annotation.CurrentLiteral;
 import org.apache.webbeans.annotation.DependentScopeLiteral;
 import org.apache.webbeans.annotation.ProductionLiteral;
+import org.apache.webbeans.annotation.specific.Realizes;
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.Component;
 import org.apache.webbeans.component.ComponentImpl;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java Sat Jun 20 14:42:11 2009
@@ -168,7 +168,7 @@
         Set<Bean<?>> beans = new HashSet<Bean<?>>();
         
         //Adding decorators to validate
-        Set<Decorator> decorators = manager.getDecorators();
+        Set<Decorator<?>> decorators = manager.getDecorators();
         for(Decorator decorator : decorators)
         {
             WebBeansDecorator wbDec = (WebBeansDecorator)decorator;
@@ -184,7 +184,7 @@
         beans.clear();
         
         //Adding interceptors to validate
-        Set<javax.enterprise.inject.spi.Interceptor> interceptors = manager.getInterceptors();
+        Set<javax.enterprise.inject.spi.Interceptor<?>> interceptors = manager.getInterceptors();
         for(javax.enterprise.inject.spi.Interceptor interceptor : interceptors)
         {
             WebBeansInterceptor wbInt = (WebBeansInterceptor)interceptor;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ChildActivityManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ChildActivityManager.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ChildActivityManager.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ChildActivityManager.java Sat Jun 20 14:42:11 2009
@@ -324,14 +324,14 @@
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    public List<Decorator> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
+    public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
     {
         return Collections.EMPTY_LIST;    
     }
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    public List<Interceptor> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
+    public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
     {
         return Collections.EMPTY_LIST;    
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ManagerImpl.java Sat Jun 20 14:42:11 2009
@@ -81,10 +81,10 @@
     private Set<Bean<?>> components = new CopyOnWriteArraySet<Bean<?>>();
 
     /**Activity interceptors*/
-    private Set<Interceptor> webBeansInterceptors = new CopyOnWriteArraySet<Interceptor>();
+    private Set<Interceptor<?>> webBeansInterceptors = new CopyOnWriteArraySet<Interceptor<?>>();
 
     /**Activity decorators*/
-    private Set<Decorator> webBeansDecorators = new CopyOnWriteArraySet<Decorator>();
+    private Set<Decorator<?>> webBeansDecorators = new CopyOnWriteArraySet<Decorator<?>>();
 
     /**Event notification manager instance*/
     private NotificationManager notificationManager = null;
@@ -468,13 +468,13 @@
         return this;
     }
 
-    public List<Decorator> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
+    public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
     {
         WebBeansUtil.checkDecoratorResolverParams(types, bindingTypes);
-        Set<Decorator> intsSet = WebBeansDecoratorConfig.findDeployedWebBeansDecorator(types, bindingTypes);
-        Iterator<Decorator> itSet = intsSet.iterator();
+        Set<Decorator<?>> intsSet = WebBeansDecoratorConfig.findDeployedWebBeansDecorator(types, bindingTypes);
+        Iterator<Decorator<?>> itSet = intsSet.iterator();
 
-        List<Decorator> decoratorList = new ArrayList<Decorator>();
+        List<Decorator<?>> decoratorList = new ArrayList<Decorator<?>>();
         while (itSet.hasNext())
         {
             WebBeansDecorator decorator = (WebBeansDecorator) itSet.next();
@@ -488,14 +488,14 @@
 
     }
 
-    public List<Interceptor> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
+    public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
     {
         WebBeansUtil.checkInterceptorResolverParams(interceptorBindings);
 
-        Set<Interceptor> intsSet = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(interceptorBindings);
-        Iterator<Interceptor> itSet = intsSet.iterator();
+        Set<Interceptor<?>> intsSet = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(interceptorBindings);
+        Iterator<Interceptor<?>> itSet = intsSet.iterator();
 
-        List<Interceptor> interceptorList = new ArrayList<Interceptor>();
+        List<Interceptor<?>> interceptorList = new ArrayList<Interceptor<?>>();
         while (itSet.hasNext())
         {
             WebBeansInterceptor interceptor = (WebBeansInterceptor) itSet.next();
@@ -517,12 +517,12 @@
         return this.components;
     }
 
-    public Set<Interceptor> getInterceptors()
+    public Set<Interceptor<?>> getInterceptors()
     {
         return this.webBeansInterceptors;
     }
 
-    public Set<Decorator> getDecorators()
+    public Set<Decorator<?>> getDecorators()
     {
         return this.webBeansDecorators;
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java Sat Jun 20 14:42:11 2009
@@ -160,7 +160,7 @@
      * @param <T>
      */
     @SuppressWarnings("unchecked")
-    public <T> void destroy()
+    public void destroy()
     {
         Set<Entry<Contextual<?>, Object>> entrySet = componentInstanceMap.entrySet();
         Iterator<Entry<Contextual<?>, Object>> it = entrySet.iterator();
@@ -170,9 +170,9 @@
         {
             component = it.next().getKey();
             
-            T instance = (T) componentInstanceMap.get(component);
+            Object instance = componentInstanceMap.get(component);
 
-            destroyInstance((Bean<T>) component, instance);
+            destroyInstance((Bean<Object>) component, instance);
 
         }
         
@@ -234,7 +234,7 @@
         remove(component);
     }
 
-    public abstract void setComponentInstanceMap();
+    protected abstract void setComponentInstanceMap();
     
     protected void checkActive()
     {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java Sat Jun 20 14:42:11 2009
@@ -13,8 +13,19 @@
  */
 package org.apache.webbeans.context;
 
+import java.util.Map;
+
 import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.apache.webbeans.context.type.ContextTypes;
 
+/**
+ * Defines spi for contexts.
+ * 
+ * @version $Rev$ $Date$
+ */
 public interface WebBeansContext extends javax.enterprise.context.spi.Context
 {
     /**
@@ -24,4 +35,33 @@
      * @param component web beans component
      */
     public <T> void remove(Contextual<T> component);
-}
+        
+    /**
+     * Destroys the context.
+     */
+    public void destroy();
+    
+    /**
+     * Return context type.
+     * 
+     * @return context type
+     */
+    public ContextTypes getType();
+    
+    /**
+     * Returns instance map.
+     * 
+     * @return instance map
+     */
+    public Map<Contextual<?>, Object> getComponentInstanceMap();
+    
+    /**
+     * Remove given bean from context.
+     * 
+     * @param <T> type of bean
+     * @param container beans container
+     * @param component bean
+     */
+    public <T> void remove(BeanManager container, Bean<T> component);
+    
+}
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/WebBeansContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java Sat Jun 20 14:42:11 2009
@@ -124,7 +124,7 @@
         Annotation[] anns = new Annotation[annSet.size()];
         anns = annSet.toArray(anns);
 
-        List<Decorator> decoratorList = ManagerImpl.getManager().resolveDecorators(component.getTypes(), anns);
+        List<Decorator<?>> decoratorList = ManagerImpl.getManager().resolveDecorators(component.getTypes(), anns);
         if (!decoratorList.isEmpty())
         {
             Class<?> clazz = component.getReturnType();
@@ -140,10 +140,10 @@
                 if (!ClassUtil.isStatic(modifiers) && !ClassUtil.isPrivate(modifiers) && ClassUtil.isFinal(modifiers))
                 {
                     // Check decorator implements this
-                    Iterator<Decorator> itDecorator = decoratorList.iterator();
+                    Iterator<Decorator<?>> itDecorator = decoratorList.iterator();
                     while (itDecorator.hasNext())
                     {
-                        WebBeansDecorator decorator = (WebBeansDecorator) itDecorator.next();
+                        WebBeansDecorator<?> decorator = (WebBeansDecorator<?>) itDecorator.next();
                         Class<?> decClazz = decorator.getClazz();
 
                         try

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java Sat Jun 20 14:42:11 2009
@@ -28,7 +28,6 @@
 
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.ComponentImpl;
-import org.apache.webbeans.container.ManagerImpl;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.InjectableField;
 import org.apache.webbeans.inject.InjectableMethods;
@@ -37,7 +36,7 @@
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
 
-public class WebBeansDecorator extends Decorator
+public class WebBeansDecorator<T> implements Decorator<T>
 {
     private static WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansDecorator.class);
 
@@ -48,19 +47,18 @@
     private Set<Type> decoratedTypes = new HashSet<Type>();
 
     /** Delegate field class type */
-    protected Class<?> delegateType;
+    protected Type delegateType;
 
     /** Delegate field binding types */
     protected Set<Annotation> delegateBindingTypes = new HashSet<Annotation>();
 
     /** Delegated component */
-    private AbstractComponent<Object> delegateComponent;
+    private AbstractComponent<T> delegateComponent;
     
     private CreationalContext<Object> creationalContext;
 
-    public WebBeansDecorator(AbstractComponent<Object> delegateComponent)
+    public WebBeansDecorator(AbstractComponent<T> delegateComponent)
     {
-        super(ManagerImpl.getManager());
         this.delegateComponent = delegateComponent;
         this.clazz = delegateComponent.getReturnType();
 
@@ -112,7 +110,7 @@
     
     private void initDelegateInternal(Field field)
     {
-        this.delegateType = field.getType();
+        this.delegateType = field.getGenericType();
 
         Annotation[] anns = field.getAnnotations();
 
@@ -130,9 +128,9 @@
     {
         boolean foundApi = false;
         for (Type t : apiType)
-        {
-            Class<?> clazz = (Class<?>)t;
-            if (this.delegateType.equals(clazz))
+        {           
+        	//TODO Check for generic
+            if (this.delegateType.equals(t))
             {
                 foundApi = true;
                 break;
@@ -181,12 +179,11 @@
     }
 
     @Override
-    public Class<?> getDelegateType()
+    public Type getDelegateType()
     {
         return delegateType;
     }
 
-    @Override
     public void setDelegate(Object instance, Object delegate)
     {
         Field field = ClassUtil.getFieldWithAnnotation(getClazz(), Decorates.class);
@@ -213,9 +210,10 @@
 
     }
 
-    public Object create(CreationalContext<Object> context)
+    @SuppressWarnings("unchecked")
+    public T create(CreationalContext<T> context)
     {
-        Object proxy = JavassistProxyFactory.createNewProxyInstance(this);
+        T proxy = (T)JavassistProxyFactory.createNewProxyInstance(this);
 
         return proxy;
     }
@@ -223,7 +221,7 @@
     public void setInjections(Object proxy)
     {
         // Set injected fields
-        ComponentImpl<Object> delegate = (ComponentImpl<Object>) this.delegateComponent;
+        ComponentImpl<T> delegate = (ComponentImpl<T>) this.delegateComponent;
 
         Set<Field> injectedFields = delegate.getInjectedFields();
         for (Field injectedField : injectedFields)
@@ -246,7 +244,7 @@
         }
     }
 
-    public void destroy(Object instance)
+    public void destroy(T instance)
     {
         delegateComponent.destroy(instance);
     }
@@ -296,7 +294,7 @@
     /**
      * @return the delegateComponent
      */
-    public AbstractComponent<Object> getDelegateComponent()
+    public AbstractComponent<T> getDelegateComponent()
     {
         return delegateComponent;
     }
@@ -340,7 +338,7 @@
             return false;
         if (getClass() != obj.getClass())
             return false;
-        final WebBeansDecorator other = (WebBeansDecorator) obj;
+        final WebBeansDecorator<?> other = (WebBeansDecorator<?>) obj;
         if (clazz == null)
         {
             if (other.clazz != null)
@@ -357,5 +355,16 @@
         return this.delegateComponent.getBeanClass();
     }
 
+	@Override
+	public Set<Annotation> getStereotypes() 
+	{
+		return this.delegateComponent.getStereotypes();
+	}
+
+	@Override
+	public Set<Type> getDecoratedTypes() {
+		return this.delegateComponent.getTypes();
+	}
+
  
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecoratorConfig.java Sat Jun 20 14:42:11 2009
@@ -40,11 +40,11 @@
 
     }
 
-    public static void configureDecoratorClass(AbstractComponent<Object> delegate)
+    public static <T> void configureDecoratorClass(AbstractComponent<T> delegate)
     {
         logger.info("Configuring the Web Beans Annoatated Decorator Class : " + delegate.getReturnType().getName() + " started");
 
-        WebBeansDecorator decorator = new WebBeansDecorator(delegate);
+        WebBeansDecorator<T> decorator = new WebBeansDecorator<T>(delegate);
 
         logger.info("Configuring the Web Beans Annotated Decorator Class : " + delegate.getReturnType() + " ended");
 
@@ -68,12 +68,12 @@
         Annotation[] anns = new Annotation[bindingTypes.size()];
         anns = bindingTypes.toArray(anns);
 
-        List<Decorator> decoratorList = ManagerImpl.getManager().resolveDecorators(component.getTypes(), anns);
-        Iterator<Decorator> itList = decoratorList.iterator();
+        List<Decorator<?>> decoratorList = ManagerImpl.getManager().resolveDecorators(component.getTypes(), anns);
+        Iterator<Decorator<?>> itList = decoratorList.iterator();
 
         while (itList.hasNext())
         {
-            WebBeansDecorator decorator = (WebBeansDecorator) itList.next();
+            WebBeansDecorator<?> decorator = (WebBeansDecorator<?>) itList.next();
 
             Object decoratorInstance = ManagerImpl.getManager().getInstance(decorator);
 
@@ -84,17 +84,17 @@
         }
     }
 
-    private static Set<Decorator> getWebBeansDecorators()
+    private static Set<Decorator<?>> getWebBeansDecorators()
     {
         return Collections.unmodifiableSet(ManagerImpl.getManager().getDecorators());
     }
 
-    public static Set<Decorator> findDeployedWebBeansDecorator(Set<Type> apiType, Annotation... anns)
+    public static Set<Decorator<?>> findDeployedWebBeansDecorator(Set<Type> apiType, Annotation... anns)
     {
-        Set<Decorator> set = new HashSet<Decorator>();
+        Set<Decorator<?>> set = new HashSet<Decorator<?>>();
 
-        Iterator<Decorator> it = getWebBeansDecorators().iterator();
-        WebBeansDecorator decorator = null;
+        Iterator<Decorator<?>> it = getWebBeansDecorators().iterator();
+        WebBeansDecorator<?> decorator = null;
 
         List<Class<? extends Annotation>> bindingTypes = new ArrayList<Class<? extends Annotation>>();
         Set<Annotation> listAnnot = new HashSet<Annotation>();
@@ -111,7 +111,7 @@
 
         while (it.hasNext())
         {
-            decorator = (WebBeansDecorator) it.next();
+            decorator = (WebBeansDecorator<?>) it.next();
 
             if (decorator.isDecoratorMatch(apiType, listAnnot))
             {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java Sat Jun 20 14:42:11 2009
@@ -140,7 +140,7 @@
      */
     public boolean isDefinedWithWebBeansInterceptor();
 
-    public void setWebBeansInterceptor(Interceptor webBeansInterceptor);
+    public void setWebBeansInterceptor(Interceptor<?> webBeansInterceptor);
 
-    public Interceptor getWebBeansInterceptor();
+    public Interceptor<?> getWebBeansInterceptor();
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java Sat Jun 20 14:42:11 2009
@@ -38,7 +38,7 @@
     /** Predestroy Method */
     private Method preDestroy = null;
 
-    private Interceptor webBeansInterceptor;
+    private Interceptor<?> webBeansInterceptor;
 
     /** Instance of the method */
     private Object interceptorInstance;
@@ -240,7 +240,7 @@
     /**
      * @return the webBeansInterceptor
      */
-    public Interceptor getWebBeansInterceptor()
+    public Interceptor<?> getWebBeansInterceptor()
     {
         return webBeansInterceptor;
     }
@@ -248,7 +248,7 @@
     /**
      * @param webBeansInterceptor the webBeansInterceptor to set
      */
-    public void setWebBeansInterceptor(Interceptor webBeansInterceptor)
+    public void setWebBeansInterceptor(Interceptor<?> webBeansInterceptor)
     {
         this.webBeansInterceptor = webBeansInterceptor;
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java Sat Jun 20 14:42:11 2009
@@ -62,8 +62,9 @@
         Context webbeansContext = ManagerImpl.getManager().getContext(component.getScopeType());
         
         Object webbeansInstance = webbeansContext.get((Contextual<Object>)this.component, (CreationalContext<Object>)CreationalContextFactory.getInstance().getCreationalContext(this.component));
-
-        if (!ClassUtil.isObjectMethod(method.getName()) && InterceptorUtil.isWebBeansBusinessMethod(method))
+        
+        //toString is supported but no other object method names!!!
+        if ((!ClassUtil.isObjectMethod(method.getName()) || method.getName().equals("toString")) && InterceptorUtil.isWebBeansBusinessMethod(method))
         {
             checkDecoratorStackForSameDecorator(method);
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java Sat Jun 20 14:42:11 2009
@@ -61,11 +61,11 @@
      * 
      * @param interceptorClazz interceptor class
      */
-    public static void configureInterceptorClass(AbstractComponent<Object> delegate, Annotation[] interceptorBindingTypes)
+    public static <T> void configureInterceptorClass(AbstractComponent<T> delegate, Annotation[] interceptorBindingTypes)
     {
         logger.info("Configuring the Web Beans Interceptor Class : " + delegate.getReturnType().getName() + " started");
 
-        WebBeansInterceptor interceptor = new WebBeansInterceptor(delegate);
+        WebBeansInterceptor<T> interceptor = new WebBeansInterceptor<T>(delegate);
 
         for (Annotation ann : interceptorBindingTypes)
         {
@@ -127,7 +127,7 @@
             anns = new Annotation[bindingTypeSet.size()];
             anns = bindingTypeSet.toArray(anns);
 
-            Set<Interceptor> set = findDeployedWebBeansInterceptor(anns);
+            Set<Interceptor<?>> set = findDeployedWebBeansInterceptor(anns);
 
             // Adding class interceptors
             addComponentInterceptors(set, stack);
@@ -138,12 +138,12 @@
 
     }
 
-    public static void addComponentInterceptors(Set<Interceptor> set, List<InterceptorData> stack)
+    public static void addComponentInterceptors(Set<Interceptor<?>> set, List<InterceptorData> stack)
     {
-        Iterator<Interceptor> it = set.iterator();
+        Iterator<Interceptor<?>> it = set.iterator();
         while (it.hasNext())
         {
-            WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();
+            WebBeansInterceptor<?> interceptor = (WebBeansInterceptor<?>) it.next();
 
             // interceptor binding
             WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, true, false, stack, null, true);
@@ -194,12 +194,12 @@
                 Annotation[] result = new Annotation[set.size()];
                 result = set.toArray(result);
 
-                Set<Interceptor> setInterceptors = findDeployedWebBeansInterceptor(result);
-                Iterator<Interceptor> it = setInterceptors.iterator();
+                Set<Interceptor<?>> setInterceptors = findDeployedWebBeansInterceptor(result);
+                Iterator<Interceptor<?>> it = setInterceptors.iterator();
 
                 while (it.hasNext())
                 {
-                    WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();
+                    WebBeansInterceptor<?> interceptor = (WebBeansInterceptor<?>) it.next();
 
                     WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, true, true, stack, method, true);
                     WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PostConstruct.class, true, true, stack, method, true);
@@ -216,7 +216,7 @@
      * 
      * @return the configured webbeans interceptors
      */
-    private static Set<Interceptor> getWebBeansInterceptors()
+    private static Set<Interceptor<?>> getWebBeansInterceptors()
     {
         return Collections.unmodifiableSet(ManagerImpl.getManager().getInterceptors());
     }
@@ -224,12 +224,12 @@
     /*
      * Find the deployed interceptors with given interceptor binding types.
      */
-    public static Set<Interceptor> findDeployedWebBeansInterceptor(Annotation[] anns)
+    public static Set<Interceptor<?>> findDeployedWebBeansInterceptor(Annotation[] anns)
     {
-        Set<Interceptor> set = new HashSet<Interceptor>();
+        Set<Interceptor<?>> set = new HashSet<Interceptor<?>>();
 
-        Iterator<Interceptor> it = getWebBeansInterceptors().iterator();
-        WebBeansInterceptor interceptor = null;
+        Iterator<Interceptor<?>> it = getWebBeansInterceptors().iterator();
+        WebBeansInterceptor<?> interceptor = null;
 
         List<Class<? extends Annotation>> bindingTypes = new ArrayList<Class<? extends Annotation>>();
         List<Annotation> listAnnot = new ArrayList<Annotation>();
@@ -241,7 +241,7 @@
 
         while (it.hasNext())
         {
-            interceptor = (WebBeansInterceptor) it.next();
+            interceptor = (WebBeansInterceptor<?>) it.next();
 
             if (interceptor.isBindingTypesExist(bindingTypes, listAnnot))
             {

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java Sat Jun 20 14:42:11 2009
@@ -30,15 +30,17 @@
 import javax.enterprise.inject.spi.InterceptionType;
 import javax.enterprise.inject.spi.Interceptor;
 import javax.interceptor.InterceptorBindingType;
+import javax.interceptor.InvocationContext;
 
 import org.apache.webbeans.component.AbstractComponent;
 import org.apache.webbeans.component.ComponentImpl;
-import org.apache.webbeans.container.ManagerImpl;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
+import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.InjectableField;
 import org.apache.webbeans.inject.InjectableMethods;
 import org.apache.webbeans.intercept.InterceptorUtil;
 import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
+import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.proxy.JavassistProxyFactory;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.WebBeansUtil;
@@ -56,8 +58,10 @@
  * 
  * @version $Rev$ $Date$
  */
-public class WebBeansInterceptor extends Interceptor
+public class WebBeansInterceptor<T> implements Interceptor<T>
 {
+	private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansInterceptor.class);
+	
     /** InterceptorBindingTypes exist on the interceptor class */
     private Map<Class<? extends Annotation>, Annotation> interceptorBindingSet = new HashMap<Class<? extends Annotation>, Annotation>();
 
@@ -65,19 +69,18 @@
     private Class<?> clazz;
 
     /** Simple Web Beans component */
-    private AbstractComponent<Object> delegateComponent;
+    private AbstractComponent<T> delegateComponent;
     
-    private CreationalContext<Object> creationalContext;
+    private CreationalContext<T> creationalContext;
 
-    public WebBeansInterceptor(AbstractComponent<Object> delegateComponent)
+    public WebBeansInterceptor(AbstractComponent<T> delegateComponent)
     {
-        super(ManagerImpl.getManager());
         this.delegateComponent = delegateComponent;
         this.clazz = getDelegate().getReturnType();
 
     }
 
-    public AbstractComponent<Object> getDelegate()
+    public AbstractComponent<T> getDelegate()
     {
         return this.delegateComponent;
     }
@@ -158,9 +161,9 @@
         return clazz;
     }
 
-    public Set<Interceptor> getMetaInceptors()
+    public Set<Interceptor<?>> getMetaInceptors()
     {
-        Set<Interceptor> set = new HashSet<Interceptor>();
+        Set<Interceptor<?>> set = new HashSet<Interceptor<?>>();
 
         Set<Class<? extends Annotation>> keys = interceptorBindingSet.keySet();
         Iterator<Class<? extends Annotation>> it = keys.iterator();
@@ -192,7 +195,7 @@
             if (anns != null && anns.length > 0)
             {
                 // For example : @Transactional @Action Interceptor
-                Set<Interceptor> metas = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(anns);
+                Set<Interceptor<?>> metas = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(anns);
                 set.addAll(metas);
 
                 // For each @Transactional and @Action Interceptor
@@ -236,7 +239,6 @@
         return set;
     }
 
-    @Override
     public Method getMethod(InterceptionType type)
     {
         Class<? extends Annotation> interceptorTypeAnnotationClazz = InterceptorUtil.getInterceptorAnnotationClazz(type);
@@ -245,9 +247,10 @@
         return method;
     }
 
-    public Object create(CreationalContext<Object> creationalContext)
+    @SuppressWarnings("unchecked")
+    public T create(CreationalContext<T> creationalContext)
     {
-        Object proxy = JavassistProxyFactory.createNewProxyInstance(this);
+        T proxy = (T)JavassistProxyFactory.createNewProxyInstance(this);
         
         this.creationalContext = creationalContext;
 
@@ -259,7 +262,7 @@
     public void setInjections(Object proxy)
     {
         // Set injected fields
-        ComponentImpl<Object> delegate = (ComponentImpl<Object>) this.delegateComponent;
+        ComponentImpl<T> delegate = (ComponentImpl<T>) this.delegateComponent;
 
         Set<Field> injectedFields = delegate.getInjectedFields();
         for (Field injectedField : injectedFields)
@@ -278,7 +281,7 @@
 
     }
 
-    public void destroy(Object instance)
+    public void destroy(T instance)
     {
         delegateComponent.destroy(instance);
     }
@@ -327,11 +330,11 @@
         if (this == obj)
             return true;
 
-        WebBeansInterceptor o = null;
+        WebBeansInterceptor<?> o = null;
 
         if (obj instanceof WebBeansInterceptor)
         {
-            o = (WebBeansInterceptor) obj;
+            o = (WebBeansInterceptor<?>) obj;
 
             if (o.clazz != null && this.clazz != null)
             {
@@ -380,4 +383,35 @@
     {
         return this.delegateComponent.getBeanClass();
     }
+
+	@Override
+	public Set<Annotation> getStereotypes() 
+	{ 
+		return this.delegateComponent.getStereotypes();
+	}
+
+	@Override
+	public Object intercept(InterceptionType type, T instance,InvocationContext ctx) 
+	{
+		Method method = getMethod(type);
+		try 
+		{
+			method.invoke(instance,new Object[]{ctx});
+		} 
+		catch (Exception e)
+		{
+			logger.error(e);
+			throw new WebBeansException(e);
+		}
+		
+		return null;
+	}
+
+	@Override
+	public boolean intercepts(InterceptionType type) 
+	{
+		Method method = getMethod(type);
+		
+		return method != null ? true : false;
+	}
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java Sat Jun 20 14:42:11 2009
@@ -34,9 +34,9 @@
 import javax.enterprise.inject.stereotype.Stereotype;
 import javax.xml.ws.WebServiceRef;
 
-import javax.inject.Realizes;
 import javax.interceptor.InterceptorBindingType;
 
+import org.apache.webbeans.annotation.specific.Realizes;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.plugins.OpenWebBeansPlugin;
 import org.apache.webbeans.plugins.PluginLoader;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java Sat Jun 20 14:42:11 2009
@@ -907,7 +907,7 @@
      * @param isDefinedWithWebBeans if interceptor is defined with WebBeans
      *            spec, not EJB spec
      */
-    public static void configureInterceptorMethods(Interceptor webBeansInterceptor, Class<?> clazz, Class<? extends Annotation> annotation, boolean definedInInterceptorClass, boolean definedInMethod, List<InterceptorData> stack, Method annotatedInterceptorClassMethod, boolean isDefinedWithWebBeans)
+    public static void configureInterceptorMethods(Interceptor<?> webBeansInterceptor, Class<?> clazz, Class<? extends Annotation> annotation, boolean definedInInterceptorClass, boolean definedInMethod, List<InterceptorData> stack, Method annotatedInterceptorClassMethod, boolean isDefinedWithWebBeans)
     {
         InterceptorData intData = null;
         Method method = null;
@@ -954,9 +954,10 @@
                     if (isDefinedWithWebBeans)
                     {
                         Object interceptorProxy = ManagerImpl.getManager().getInstance(webBeansInterceptor);
-                        WebBeansInterceptor interceptor = (WebBeansInterceptor) webBeansInterceptor;
+                        WebBeansInterceptor<?> interceptor = (WebBeansInterceptor<?>) webBeansInterceptor;
                         interceptor.setInjections(interceptorProxy);
 
+                        //Setting interceptor proxy instance
                         intData.setInterceptorInstance(interceptorProxy);
                     }
                     else

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLDefinitionUtil.java Sat Jun 20 14:42:11 2009
@@ -249,7 +249,7 @@
         Annotation[] anns = new Annotation[bindingTypeSet.size()];
         anns = bindingTypeSet.toArray(anns);
 
-        Set<Interceptor> set = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(anns);
+        Set<Interceptor<?>> set = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(anns);
 
         WebBeansInterceptorConfig.addComponentInterceptors(set, component.getInterceptorStack());
 
@@ -270,8 +270,8 @@
         Annotation[] result = new Annotation[bindingTypesSet.size()];
         result = bindingTypesSet.toArray(result);
 
-        Set<Interceptor> setInterceptors = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(result);
-        Iterator<Interceptor> it = setInterceptors.iterator();
+        Set<Interceptor<?>> setInterceptors = WebBeansInterceptorConfig.findDeployedWebBeansInterceptor(result);
+        Iterator<Interceptor<?>> it = setInterceptors.iterator();
 
         List<InterceptorData> stack = component.getInterceptorStack();
         while (it.hasNext())

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/realization/RealizationComponent1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/realization/RealizationComponent1.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/realization/RealizationComponent1.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/realization/RealizationComponent1.java Sat Jun 20 14:42:11 2009
@@ -19,8 +19,8 @@
 import java.io.Serializable;
 
 import javax.enterprise.context.SessionScoped;
-import javax.inject.Realizes;
 
+import org.apache.webbeans.annotation.specific.Realizes;
 import org.apache.webbeans.test.component.UserComponent;
 
 @SessionScoped

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/mock/MockManager.java Sat Jun 20 14:42:11 2009
@@ -174,12 +174,12 @@
         return manager.resolveByType(apiType, bindingTypes);
     }
 
-    public List<Decorator> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
+    public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindingTypes)
     {
         return manager.resolveDecorators(types, bindingTypes);
     }
 
-    public List<Interceptor> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
+    public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings)
     {
         return manager.resolveInterceptors(type, interceptorBindings);
     }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java?rev=786832&r1=786831&r2=786832&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/decorator/DecoratorTest1.java Sat Jun 20 14:42:11 2009
@@ -82,7 +82,7 @@
         Set<Type> apiTyeps = new HashSet<Type>();
         apiTyeps.add(IService.class);
 
-        List<Decorator> decs = getManager().resolveDecorators(apiTyeps, new Annotation[] { new Binding1Literal() });
+        List<Decorator<?>> decs = getManager().resolveDecorators(apiTyeps, new Annotation[] { new Binding1Literal() });
 
         ServiceDecorator dec = (ServiceDecorator) getManager().getInstance(decs.get(0));
         Assert.assertEquals("ServiceImpl1", dec.getDelegateAttr());
@@ -105,7 +105,7 @@
         Set<Type> apiTyeps = new HashSet<Type>();
         apiTyeps.add(Account.class);
 
-        List<Decorator> decs = getManager().resolveDecorators(apiTyeps, new Annotation[] { new CurrentLiteral() });
+        List<Decorator<?>> decs = getManager().resolveDecorators(apiTyeps, new Annotation[] { new CurrentLiteral() });
 
         LargeTransactionDecorator dec = (LargeTransactionDecorator) getManager().getInstance(decs.get(0));
         Assert.assertEquals(new BigDecimal(1500), dec.getDepositeAmount());



Mime
View raw message