openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r790362 [2/2] - in /incubator/openwebbeans/trunk/webbeans-impl: ./ src/main/java/org/apache/webbeans/component/ src/main/java/org/apache/webbeans/component/third/ src/main/java/org/apache/webbeans/config/ src/main/java/org/apache/webbeans/c...
Date Wed, 01 Jul 2009 20:27:50 GMT
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=790362&r1=790361&r2=790362&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
Wed Jul  1 20:27:48 2009
@@ -230,7 +230,7 @@
             i++;
         }
 
-        Set<Annotation> stereoTypesSet = component.getStereotypes();
+        Set<Annotation> stereoTypesSet = component.getOwbStereotypes();
         Annotation[] stereoTypes = new Annotation[stereoTypesSet.size()];
         stereoTypes = stereoTypesSet.toArray(stereoTypes);
         for (Annotation stero : stereoTypes)
@@ -666,7 +666,7 @@
                 Annotation[] bindingAnns = new Annotation[bindingTypes.size()];
                 bindingAnns = bindingTypes.toArray(bindingAnns);
 
-                Set<Bean<T>> set = InjectionResolver.getInstance().implResolveByType(model.getInjectionGenericType(),
bindingAnns);
+                Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(model.getInjectionGenericType(),
bindingAnns);
                 producerComponent = (XMLProducerComponentImpl<?>) set.iterator().next();
 
                 if (producerComponent == null)

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/containertests/ComponentResolutionByTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/containertests/ComponentResolutionByTypeTest.java?rev=790362&r1=790361&r2=790362&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/containertests/ComponentResolutionByTypeTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/containertests/ComponentResolutionByTypeTest.java
Wed Jul  1 20:27:48 2009
@@ -13,7 +13,6 @@
  */
 package org.apache.webbeans.test.containertests;
 
-import javax.enterprise.inject.spi.BeanManager;
 import javax.servlet.ServletContext;
 
 import org.apache.webbeans.container.ManagerImpl;
@@ -38,7 +37,7 @@
     public @AnnotationWithNonBindingMember(value = "C", arg1 = "arg11", arg2 = "arg21")
     NonBindingComponent s5 = null;
 
-    private static BeanManager cont = ManagerImpl.getManager();
+    private static ManagerImpl cont = ManagerImpl.getManager();
     private static final String CLAZZ_NAME = ComponentResolutionByTypeTest.class.getName();
 
     public ComponentResolutionByTypeTest()

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=790362&r1=790361&r2=790362&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
Wed Jul  1 20:27:48 2009
@@ -20,10 +20,14 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.el.ELResolver;
+import javax.enterprise.context.ScopeType;
 import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.Contextual;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.event.Observer;
 import javax.enterprise.inject.TypeLiteral;
+import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.Decorator;
 import javax.enterprise.inject.spi.InjectionPoint;
@@ -83,12 +87,12 @@
         return manager.addContext(context);
     }
 
-    public BeanManager addDecorator(Decorator decorator)
+    public BeanManager addDecorator(Decorator<?> decorator)
     {
         return manager.addDecorator(decorator);
     }
 
-    public BeanManager addInterceptor(Interceptor interceptor)
+    public BeanManager addInterceptor(Interceptor<?> interceptor)
     {
         manager.addInterceptor(interceptor);
         return this;
@@ -122,7 +126,6 @@
         return manager.<T>getInstanceToInject(injectionPoint, context); //X ugly <T>
due to javac bug 6302954
     }
     
-    @SuppressWarnings("unchecked")
     public Object getInstanceToInject(InjectionPoint injectionPoint)
     {
        return manager.getInstanceToInject(injectionPoint);
@@ -164,12 +167,12 @@
         return manager.resolveByName(name);
     }
 
-    public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation...
bindings)
+    public Set<Bean<?>> resolveByType(Class<?> apiType, Annotation... bindingTypes)
     {
-        return manager.resolveByType(type, bindings);
+        return manager.resolveByType(apiType, bindingTypes);
     }
 
-    public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,
Annotation... bindingTypes)
+    public Set<Bean<?>> resolveByType(TypeLiteral<?> apiType, Annotation...
bindingTypes)
     {
         return manager.resolveByType(apiType, bindingTypes);
     }
@@ -204,4 +207,131 @@
     {
         return manager.setCurrent(scopeType);
     }
+
+
+    @Override
+    public <T> AnnotatedType<T> createAnnotatedType(Class<T> type)
+    {
+        return this.manager.createAnnotatedType(type);
+    }
+
+
+    @Override
+    public <T> CreationalContext<T> createCreationalContext(Contextual<T>
contextual)
+    {
+        return this.manager.createCreationalContext(contextual);
+    }
+
+
+    @Override
+    public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings)
+    {
+        return this.manager.getBeans();
+    }
+
+
+    @Override
+    public Set<Bean<?>> getBeans(String name)
+    {
+        return this.manager.getBeans(name);
+    }
+
+
+    @Override
+    public ELResolver getELResolver()
+    {
+        return this.manager.getELResolver();
+    }
+
+
+    @Override
+    public Object getInjectableReference(InjectionPoint injectionPoint, CreationalContext<?>
ctx)
+    {
+        return this.manager.getInjectableReference(injectionPoint, ctx);
+    }
+
+
+    @Override
+    public Set<Annotation> getInterceptorBindingTypeDefinition(Class<? extends Annotation>
bindingType)
+    {
+        return this.manager.getInterceptorBindingTypeDefinition(bindingType);
+    }
+
+
+    @Override
+    public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean)
+    {
+        return this.manager.getMostSpecializedBean(bean);
+    }
+
+
+    @Override
+    public Bean<?> getPassivationCapableBean(String id)
+    {
+        return this.manager.getPassivationCapableBean(id);
+    }
+
+
+    @Override
+    public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?>
ctx)
+    {
+        return this.manager.getReference(bean, beanType, ctx);
+    }
+
+
+    @Override
+    public ScopeType getScopeDefinition(Class<? extends Annotation> scopeType)
+    {
+        return this.manager.getScopeDefinition(scopeType);
+    }
+
+
+    @Override
+    public Set<Annotation> getStereotypeDefinition(Class<? extends Annotation>
stereotype)
+    {
+        return this.manager.getStereotypeDefinition(stereotype);
+    }
+
+
+    @Override
+    public boolean isBindingType(Class<? extends Annotation> annotationType)
+    {
+        return this.manager.isBindingType(annotationType);
+    }
+
+
+    @Override
+    public boolean isInterceptorBindingType(Class<? extends Annotation> annotationType)
+    {
+        return this.manager.isInterceptorBindingType(annotationType);
+    }
+
+
+    @Override
+    public boolean isScopeType(Class<? extends Annotation> annotationType)
+    {
+        return this.manager.isScopeType(annotationType);
+    }
+
+
+    @Override
+    public boolean isStereotype(Class<? extends Annotation> annotationType)
+    {
+        return this.manager.isStereotype(annotationType);
+    }
+
+
+    @Override
+    public <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans)
+    {
+        return this.manager.resolve(beans);
+    }
+
+
+    @Override
+    public void validate(InjectionPoint injectionPoint)
+    {
+        this.manager.validate(injectionPoint);
+        
+    }
 }

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/DependentComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/DependentComponentTest.java?rev=790362&r1=790361&r2=790362&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/DependentComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/dependent/DependentComponentTest.java
Wed Jul  1 20:27:48 2009
@@ -15,8 +15,6 @@
 
 import java.util.List;
 
-import javax.servlet.ServletContext;
-
 import junit.framework.Assert;
 
 import org.apache.webbeans.component.AbstractComponent;

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java?rev=790362&r1=790361&r2=790362&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/typedliteral/TypedLiteralComponentTest.java
Wed Jul  1 20:27:48 2009
@@ -96,7 +96,7 @@
 
         };
 
-        Bean<ITypeLiteralComponent<List<String>>> s = ManagerImpl.getManager().resolveByType(tl,
anns).iterator().next();
+        Bean<?> s = ManagerImpl.getManager().resolveByType(tl, anns).iterator().next();
         Assert.assertNotNull(s);
 
         ContextFactory.destroyRequestContext(null);



Mime
View raw message