[webbeans-commits] Webbeans SVN: r3527 - in ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin: facade and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Aug 16 12:16:39 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-08-16 12:16:39 -0400 (Sun, 16 Aug 2009)
New Revision: 3527
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ExtensionBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InjectionPointBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ManagerBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
Log:
Use util method to avoid warnings
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ExtensionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ExtensionBean.java 2009-08-16 16:15:56 UTC (rev 3526)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ExtensionBean.java 2009-08-16 16:16:39 UTC (rev 3527)
@@ -37,13 +37,8 @@
private final WBClass<Extension> clazz;
private final Extension instance;
- public static ExtensionBean of(BeanManagerImpl manager, WBClass<Extension> clazz, Extension instance)
+ public ExtensionBean(BeanManagerImpl manager, WBClass<Extension> clazz, Extension instance)
{
- return new ExtensionBean(manager, clazz, instance);
- }
-
- protected ExtensionBean(BeanManagerImpl manager, WBClass<Extension> clazz, Extension instance)
- {
super(manager);
this.clazz = clazz;
this.instance = instance;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InjectionPointBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InjectionPointBean.java 2009-08-16 16:15:56 UTC (rev 3526)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InjectionPointBean.java 2009-08-16 16:16:39 UTC (rev 3527)
@@ -17,14 +17,13 @@
package org.jboss.webbeans.bean.builtin;
import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashSet;
import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.InjectionPoint;
import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.util.collections.Arrays2;
/**
* Bean for InjectionPoint metadata
@@ -35,7 +34,7 @@
public class InjectionPointBean extends AbstractBuiltInBean<InjectionPoint>
{
- private static final Set<Type> TYPES = new HashSet<Type>(Arrays.asList(new Type[] { InjectionPoint.class }));
+ private static final Set<Type> TYPES = Arrays2.<Type>asSet(InjectionPoint.class, Object.class);
/**
* Creates an InjectionPoint Web Bean for the injection of the containing bean owning
@@ -45,15 +44,9 @@
* @param <S>
* @param field The annotated member field/parameter for the injection
* @param manager The RI manager implementation
- * @return a new bean for this injection point
*/
- public static InjectionPointBean of(BeanManagerImpl manager)
+ public InjectionPointBean(BeanManagerImpl manager)
{
- return new InjectionPointBean(manager);
- }
-
- protected InjectionPointBean(BeanManagerImpl manager)
- {
super(manager);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ManagerBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ManagerBean.java 2009-08-16 16:15:56 UTC (rev 3526)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/ManagerBean.java 2009-08-16 16:16:39 UTC (rev 3527)
@@ -17,27 +17,21 @@
package org.jboss.webbeans.bean.builtin;
import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashSet;
import java.util.Set;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.BeanManager;
import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.util.collections.Arrays2;
public class ManagerBean extends AbstractBuiltInBean<BeanManagerImpl>
{
- private static final Set<Type> TYPES = new HashSet<Type>(Arrays.asList(BeanManagerImpl.class, BeanManager.class));
+ private static final Set<Type> TYPES = Arrays2.<Type>asSet(Object.class, BeanManagerImpl.class, BeanManager.class);
- public static final ManagerBean of(BeanManagerImpl manager)
+ public ManagerBean(BeanManagerImpl manager)
{
- return new ManagerBean(manager);
- }
-
- protected ManagerBean(BeanManagerImpl manager)
- {
super(manager);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java 2009-08-16 16:15:56 UTC (rev 3526)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java 2009-08-16 16:16:39 UTC (rev 3527)
@@ -29,24 +29,19 @@
import org.jboss.webbeans.event.EventImpl;
import org.jboss.webbeans.literal.AnyLiteral;
import org.jboss.webbeans.resolution.ResolvableTransformer;
+import org.jboss.webbeans.util.collections.Arrays2;
public class EventBean extends AbstractFacadeBean<Event<?>>
{
- private static final Class<Event<?>> TYPE = new TypeLiteral<Event<?>>(){}.getRawType();
- private static final Set<Type> DEFAULT_TYPES = new HashSet<Type>(Arrays.asList(TYPE, Object.class));
- private static final Annotation ANY = new AnyLiteral();
- private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>(Arrays.asList(ANY));
- public static final ResolvableTransformer TRANSFORMER = new FacadeBeanResolvableTransformer(TYPE);
+ private static final Class<Event<?>> TYPE = new TypeLiteral<Event<?>>() {}.getRawType();
+ private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet(TYPE, Object.class);
+ private static final Annotation ANY = new AnyLiteral();
+ private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>(Arrays.asList(ANY));
+ public static final ResolvableTransformer TRANSFORMER = new FacadeBeanResolvableTransformer(TYPE);
-
- public static AbstractFacadeBean<Event<?>> of(BeanManagerImpl manager)
+ public EventBean(BeanManagerImpl manager)
{
- return new EventBean(manager);
- }
-
- protected EventBean(BeanManagerImpl manager)
- {
super(manager);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java 2009-08-16 16:15:56 UTC (rev 3526)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java 2009-08-16 16:16:39 UTC (rev 3527)
@@ -29,24 +29,19 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.literal.AnyLiteral;
import org.jboss.webbeans.resolution.ResolvableTransformer;
+import org.jboss.webbeans.util.collections.Arrays2;
public class InstanceBean extends AbstractFacadeBean<Instance<?>>
{
private static final Class<Instance<?>> TYPE = new TypeLiteral<Instance<?>>() {}.getRawType();
- private static final Set<Type> DEFAULT_TYPES = new HashSet<Type>(Arrays.asList(TYPE, Object.class));
+ private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet(TYPE, Object.class);
private static final Any ANY = new AnyLiteral();
private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>(Arrays.asList(ANY));
public static final ResolvableTransformer TRANSFORMER = new FacadeBeanResolvableTransformer(TYPE);
-
- public static AbstractFacadeBean<Instance<?>> of(BeanManagerImpl manager)
+ public InstanceBean(BeanManagerImpl manager)
{
- return new InstanceBean(manager);
- }
-
- protected InstanceBean(BeanManagerImpl manager)
- {
super(manager);
}
More information about the weld-commits
mailing list