[webbeans-commits] Webbeans SVN: r3524 - in ri/trunk/impl/src/main/java/org/jboss/webbeans: bean/builtin/facade and 3 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Aug 16 11:37:44 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-08-16 11:37:44 -0400 (Sun, 16 Aug 2009)
New Revision: 3524
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacade.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.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/FacadeBeanResolvableTransformer.java
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/InstanceImpl.java
Removed:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacade.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacadeBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/EventBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/FacadeBeanResolvableTransformer.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceImpl.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java
Log:
move facade beans to subpackage
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacade.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacade.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacade.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.builtin;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
-
-/**
- * Common implementation for binding-type-based helpers
- *
- * @author Gavin King
- *
- * @param <T>
- */
-public abstract class AbstractFacade<T, X> implements Serializable
-{
-
- private static final long serialVersionUID = 8710258788495459128L;
-
- private static final Annotation[] EMPTY_BINDINGS = new Annotation[0];
-
- // The binding types the helper operates on
- private final Set<? extends Annotation> bindings;
- // The Web Beans manager
- private final BeanManagerImpl manager;
- // The type of the operation
- private final Type type;
-
- /**
- *
- * @param type The event type
- * @param manager The Web Beans manager
- * @param bindings The binding types
- */
- protected AbstractFacade(Type type, BeanManagerImpl manager, Set<? extends Annotation> bindings)
- {
- this.manager = manager;
- this.type = type;
- // Need to make sure the Set is serializable, some sets from Google Collections aren't
- // TODO Work out how to not do this
- this.bindings = new HashSet<Annotation>(bindings);
- }
-
- /**
- * Gets a string representation
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return "Abstract facade implmentation";
- }
-
- protected Annotation[] mergeInBindings(Annotation... newBindings)
- {
- Set<Annotation> result = new HashSet<Annotation>();
- result.addAll(bindings);
- for (Annotation newAnnotation : newBindings)
- {
- if (!getManager().getServices().get(MetaAnnotationStore.class).getBindingTypeModel(newAnnotation.annotationType()).isValid())
- {
- throw new IllegalArgumentException(newAnnotation + " is not a binding for " + this);
- }
- if (result.contains(newAnnotation))
- {
- throw new IllegalArgumentException(newAnnotation + " is already present in the bindings list for " + this);
- }
- result.add(newAnnotation);
- }
- return result.toArray(EMPTY_BINDINGS);
- }
-
- protected BeanManagerImpl getManager()
- {
- return manager.getCurrent();
- }
-
- protected Set<? extends Annotation> getBindings()
- {
- return Collections.unmodifiableSet(bindings);
- }
-
- protected Type getType()
- {
- return type;
- }
-
-}
\ No newline at end of file
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacadeBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacadeBean.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacadeBean.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.builtin;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-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.log.Log;
-import org.jboss.webbeans.log.Logging;
-
-public abstract class AbstractFacadeBean<T> extends AbstractBuiltInBean<T>
-{
-
- private static final Log log = Logging.getLog(AbstractFacadeBean.class);
-
- protected AbstractFacadeBean(BeanManagerImpl manager)
- {
- super(manager);
- }
-
- public T create(CreationalContext<T> creationalContext)
- {
- InjectionPoint injectionPoint = this.getManager().getCurrentInjectionPoint();
- if (injectionPoint != null)
- {
- Type genericType = injectionPoint.getType();
- if (genericType instanceof ParameterizedType )
- {
- Type type = ((ParameterizedType) genericType).getActualTypeArguments()[0];
- return newInstance(type, injectionPoint.getBindings());
- }
- else
- {
- throw new IllegalStateException("Must have concrete type argument " + injectionPoint);
- }
- }
- else
- {
- log.warn("Dynamic lookup of " + toString() + " is not supported");
- return null;
- }
- }
-
- public void destroy(T instance, CreationalContext<T> creationalContext)
- {
- // TODO Auto-generated method stub
- }
-
- protected abstract T newInstance(Type type, Set<Annotation> annotations);
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/EventBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/EventBean.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/EventBean.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.builtin;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.event.Event;
-import javax.enterprise.inject.TypeLiteral;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.event.EventImpl;
-import org.jboss.webbeans.literal.AnyLiteral;
-import org.jboss.webbeans.resolution.ResolvableTransformer;
-
-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);
-
-
- public static AbstractFacadeBean<Event<?>> of(BeanManagerImpl manager)
- {
- return new EventBean(manager);
- }
-
- protected EventBean(BeanManagerImpl manager)
- {
- super(manager);
- }
-
- @Override
- public Class<Event<?>> getType()
- {
- return TYPE;
- }
-
- @Override
- public Class<?> getBeanClass()
- {
- return EventImpl.class;
- }
-
- public Set<Type> getTypes()
- {
- return DEFAULT_TYPES;
- }
-
- @Override
- public Set<Annotation> getBindings()
- {
- return DEFAULT_BINDINGS;
- }
-
- @Override
- protected Event<?> newInstance(Type type, Set<Annotation> annotations)
- {
- return EventImpl.of(type, getManager(), annotations);
- }
-
- @Override
- public String toString()
- {
- return "Built-in implicit javax.event.Event bean";
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/FacadeBeanResolvableTransformer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/FacadeBeanResolvableTransformer.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/FacadeBeanResolvableTransformer.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.builtin;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.Any;
-
-import org.jboss.webbeans.literal.AnyLiteral;
-import org.jboss.webbeans.resolution.ForwardingResolvable;
-import org.jboss.webbeans.resolution.Resolvable;
-import org.jboss.webbeans.resolution.ResolvableTransformer;
-
-/**
- * AnnotatedItem transformer which can be used for FacadeBeans
- *
- * @author Pete Muir
- *
- */
-public class FacadeBeanResolvableTransformer implements ResolvableTransformer
-{
-
- private static final Set<Annotation> bindings;
-
- static
- {
- bindings = new HashSet<Annotation>();
- bindings.add(new AnyLiteral());
- }
-
- private final Class<?> clazz;
- private final HashSet<Type> types;
-
- public FacadeBeanResolvableTransformer(Class<?> clazz)
- {
- this.clazz = clazz;
- this.types = new HashSet<Type>();
- types.add(clazz);
- }
-
- public Resolvable transform(final Resolvable resolvable)
- {
- if (resolvable.isAssignableTo(clazz))
- {
- return new ForwardingResolvable()
- {
-
- @Override
- protected Resolvable delegate()
- {
- return resolvable;
- }
-
- @Override
- public Set<Annotation> getBindings()
- {
- return Collections.unmodifiableSet(bindings);
- }
-
- @Override
- public Set<Type> getTypeClosure()
- {
- return Collections.unmodifiableSet(types);
- }
-
- @Override
- public boolean isAssignableTo(Class<?> c)
- {
- return c.isAssignableFrom(clazz);
- }
-
- @Override
- public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
- {
- return Any.class.equals(annotationType);
- }
-
- };
- }
- return resolvable;
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceBean.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceBean.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.builtin;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.TypeLiteral;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.literal.AnyLiteral;
-import org.jboss.webbeans.resolution.ResolvableTransformer;
-
-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 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)
- {
- return new InstanceBean(manager);
- }
-
- protected InstanceBean(BeanManagerImpl manager)
- {
- super(manager);
- }
-
- @Override
- public Class<Instance<?>> getType()
- {
- return TYPE;
- }
-
- @Override
- public Class<?> getBeanClass()
- {
- return InstanceImpl.class;
- }
-
- public Set<Type> getTypes()
- {
- return DEFAULT_TYPES;
- }
-
- @Override
- public Set<Annotation> getBindings()
- {
- return DEFAULT_BINDINGS;
- }
-
- @Override
- protected Instance<?> newInstance(Type type, Set<Annotation> annotations)
- {
- return InstanceImpl.of(type, getManager(), annotations);
- }
-
- @Override
- public String toString()
- {
- return "Built-in implicit javax.inject.Instance bean";
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceImpl.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceImpl.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -1,136 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.bean.builtin;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.TypeLiteral;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.resolution.ResolvableWBClass;
-
-/**
- * Helper implementation for Instance for getting instances
- *
- * @author Gavin King
- *
- * @param <T>
- */
-public class InstanceImpl<T> extends AbstractFacade<T, Instance<T>> implements Instance<T>, Serializable
-{
-
- private static final long serialVersionUID = -376721889693284887L;
- private static final Annotation[] EMPTY_BINDINGS = new Annotation[0];
-
- private final Set<Bean<?>> beans;
-
- public static <I> Instance<I> of(Type type, BeanManagerImpl manager, Set<Annotation> annotations)
- {
- return new InstanceImpl<I>(type, manager, annotations);
- }
-
- private InstanceImpl(Type type, BeanManagerImpl manager, Set<Annotation> bindings)
- {
- super(type, manager, bindings);
- this.beans = getManager().getBeans(getType(), bindings.toArray(EMPTY_BINDINGS));
- }
-
- public T get(Annotation... bindings)
- {
- Annotation[] annotations = mergeInBindings(bindings);
- Bean<T> bean = getManager().getBean(ResolvableWBClass.<T>of(getType(), annotations, getManager()), annotations);
-
- @SuppressWarnings("unchecked")
- T instance = (T) getManager().getReference(bean, getType(), getManager().createCreationalContext(bean));
- return instance;
- }
-
- /**
- * Gets a string representation
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return "Obtainable instance for type " + getType() + " and binding types " + getBindings();
- }
-
- private Collection<T> getReferences()
- {
- Collection<T> instances = new ArrayList<T>();
- for (Bean<?> bean : beans)
- {
- Object object = getManager().getReference(bean, getType(), getManager().createCreationalContext(bean));
-
- @SuppressWarnings("unchecked")
- T instance = (T) object;
-
- instances.add(instance);
- }
- return instances;
- }
-
- public Iterator<T> iterator()
- {
- return getReferences().iterator();
- }
-
- public boolean isAmbiguous()
- {
- return beans.size() > 1;
- }
-
- public boolean isUnsatisfied()
- {
- return beans.size() == 0;
- }
-
- public Instance<T> select(Annotation... bindings)
- {
- return selectInstance(this.getType(), bindings);
- }
-
- public <U extends T> Instance<U> select(Class<U> subtype, Annotation... bindings)
- {
- return selectInstance(subtype, bindings);
- }
-
- public <U extends T> Instance<U> select(TypeLiteral<U> subtype, Annotation... bindings)
- {
- return selectInstance(subtype.getType(), bindings);
- }
-
- private <U extends T> Instance<U> selectInstance(Type subtype, Annotation[] bindings)
- {
- return new InstanceImpl<U>(
- subtype,
- this.getManager(),
- new HashSet<Annotation>(Arrays.asList(mergeInBindings(bindings))));
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacade.java (from rev 3523, ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacade.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacade.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacade.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.builtin.facade;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
+
+/**
+ * Common implementation for binding-type-based helpers
+ *
+ * @author Gavin King
+ *
+ * @param <T>
+ */
+public abstract class AbstractFacade<T, X> implements Serializable
+{
+
+ private static final long serialVersionUID = 8710258788495459128L;
+
+ private static final Annotation[] EMPTY_BINDINGS = new Annotation[0];
+
+ // The binding types the helper operates on
+ private final Set<? extends Annotation> bindings;
+ // The Web Beans manager
+ private final BeanManagerImpl manager;
+ // The type of the operation
+ private final Type type;
+
+ /**
+ *
+ * @param type The event type
+ * @param manager The Web Beans manager
+ * @param bindings The binding types
+ */
+ protected AbstractFacade(Type type, BeanManagerImpl manager, Set<? extends Annotation> bindings)
+ {
+ this.manager = manager;
+ this.type = type;
+ // Need to make sure the Set is serializable, some sets from Google Collections aren't
+ // TODO Work out how to not do this
+ this.bindings = new HashSet<Annotation>(bindings);
+ }
+
+ /**
+ * Gets a string representation
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return "Abstract facade implmentation";
+ }
+
+ protected Annotation[] mergeInBindings(Annotation... newBindings)
+ {
+ Set<Annotation> result = new HashSet<Annotation>();
+ result.addAll(bindings);
+ for (Annotation newAnnotation : newBindings)
+ {
+ if (!getManager().getServices().get(MetaAnnotationStore.class).getBindingTypeModel(newAnnotation.annotationType()).isValid())
+ {
+ throw new IllegalArgumentException(newAnnotation + " is not a binding for " + this);
+ }
+ if (result.contains(newAnnotation))
+ {
+ throw new IllegalArgumentException(newAnnotation + " is already present in the bindings list for " + this);
+ }
+ result.add(newAnnotation);
+ }
+ return result.toArray(EMPTY_BINDINGS);
+ }
+
+ protected BeanManagerImpl getManager()
+ {
+ return manager.getCurrent();
+ }
+
+ protected Set<? extends Annotation> getBindings()
+ {
+ return Collections.unmodifiableSet(bindings);
+ }
+
+ protected Type getType()
+ {
+ return type;
+ }
+
+}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.java (from rev 3523, ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/AbstractFacadeBean.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.builtin.facade;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+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.bean.builtin.AbstractBuiltInBean;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logging;
+
+public abstract class AbstractFacadeBean<T> extends AbstractBuiltInBean<T>
+{
+
+ private static final Log log = Logging.getLog(AbstractFacadeBean.class);
+
+ protected AbstractFacadeBean(BeanManagerImpl manager)
+ {
+ super(manager);
+ }
+
+ public T create(CreationalContext<T> creationalContext)
+ {
+ InjectionPoint injectionPoint = this.getManager().getCurrentInjectionPoint();
+ if (injectionPoint != null)
+ {
+ Type genericType = injectionPoint.getType();
+ if (genericType instanceof ParameterizedType )
+ {
+ Type type = ((ParameterizedType) genericType).getActualTypeArguments()[0];
+ return newInstance(type, injectionPoint.getBindings());
+ }
+ else
+ {
+ throw new IllegalStateException("Must have concrete type argument " + injectionPoint);
+ }
+ }
+ else
+ {
+ log.warn("Dynamic lookup of " + toString() + " is not supported");
+ return null;
+ }
+ }
+
+ public void destroy(T instance, CreationalContext<T> creationalContext)
+ {
+ // TODO Auto-generated method stub
+ }
+
+ protected abstract T newInstance(Type type, Set<Annotation> annotations);
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/AbstractFacadeBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java (from rev 3523, ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/EventBean.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.builtin.facade;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.event.Event;
+import javax.enterprise.inject.TypeLiteral;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.event.EventImpl;
+import org.jboss.webbeans.literal.AnyLiteral;
+import org.jboss.webbeans.resolution.ResolvableTransformer;
+
+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);
+
+
+ public static AbstractFacadeBean<Event<?>> of(BeanManagerImpl manager)
+ {
+ return new EventBean(manager);
+ }
+
+ protected EventBean(BeanManagerImpl manager)
+ {
+ super(manager);
+ }
+
+ @Override
+ public Class<Event<?>> getType()
+ {
+ return TYPE;
+ }
+
+ @Override
+ public Class<?> getBeanClass()
+ {
+ return EventImpl.class;
+ }
+
+ public Set<Type> getTypes()
+ {
+ return DEFAULT_TYPES;
+ }
+
+ @Override
+ public Set<Annotation> getBindings()
+ {
+ return DEFAULT_BINDINGS;
+ }
+
+ @Override
+ protected Event<?> newInstance(Type type, Set<Annotation> annotations)
+ {
+ return EventImpl.of(type, getManager(), annotations);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Built-in implicit javax.event.Event bean";
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/EventBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/FacadeBeanResolvableTransformer.java (from rev 3523, ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/FacadeBeanResolvableTransformer.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/FacadeBeanResolvableTransformer.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/FacadeBeanResolvableTransformer.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.builtin.facade;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.inject.Any;
+
+import org.jboss.webbeans.literal.AnyLiteral;
+import org.jboss.webbeans.resolution.ForwardingResolvable;
+import org.jboss.webbeans.resolution.Resolvable;
+import org.jboss.webbeans.resolution.ResolvableTransformer;
+
+/**
+ * AnnotatedItem transformer which can be used for FacadeBeans
+ *
+ * @author Pete Muir
+ *
+ */
+public class FacadeBeanResolvableTransformer implements ResolvableTransformer
+{
+
+ private static final Set<Annotation> bindings;
+
+ static
+ {
+ bindings = new HashSet<Annotation>();
+ bindings.add(new AnyLiteral());
+ }
+
+ private final Class<?> clazz;
+ private final HashSet<Type> types;
+
+ public FacadeBeanResolvableTransformer(Class<?> clazz)
+ {
+ this.clazz = clazz;
+ this.types = new HashSet<Type>();
+ types.add(clazz);
+ }
+
+ public Resolvable transform(final Resolvable resolvable)
+ {
+ if (resolvable.isAssignableTo(clazz))
+ {
+ return new ForwardingResolvable()
+ {
+
+ @Override
+ protected Resolvable delegate()
+ {
+ return resolvable;
+ }
+
+ @Override
+ public Set<Annotation> getBindings()
+ {
+ return Collections.unmodifiableSet(bindings);
+ }
+
+ @Override
+ public Set<Type> getTypeClosure()
+ {
+ return Collections.unmodifiableSet(types);
+ }
+
+ @Override
+ public boolean isAssignableTo(Class<?> c)
+ {
+ return c.isAssignableFrom(clazz);
+ }
+
+ @Override
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return Any.class.equals(annotationType);
+ }
+
+ };
+ }
+ return resolvable;
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/FacadeBeanResolvableTransformer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java (from rev 3523, ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceBean.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.builtin.facade;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.TypeLiteral;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.literal.AnyLiteral;
+import org.jboss.webbeans.resolution.ResolvableTransformer;
+
+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 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)
+ {
+ return new InstanceBean(manager);
+ }
+
+ protected InstanceBean(BeanManagerImpl manager)
+ {
+ super(manager);
+ }
+
+ @Override
+ public Class<Instance<?>> getType()
+ {
+ return TYPE;
+ }
+
+ @Override
+ public Class<?> getBeanClass()
+ {
+ return InstanceImpl.class;
+ }
+
+ public Set<Type> getTypes()
+ {
+ return DEFAULT_TYPES;
+ }
+
+ @Override
+ public Set<Annotation> getBindings()
+ {
+ return DEFAULT_BINDINGS;
+ }
+
+ @Override
+ protected Instance<?> newInstance(Type type, Set<Annotation> annotations)
+ {
+ return InstanceImpl.of(type, getManager(), annotations);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "Built-in implicit javax.inject.Instance bean";
+ }
+
+}
Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceImpl.java (from rev 3523, ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/InstanceImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/builtin/facade/InstanceImpl.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -0,0 +1,136 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.bean.builtin.facade;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.enterprise.inject.Instance;
+import javax.enterprise.inject.TypeLiteral;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.resolution.ResolvableWBClass;
+
+/**
+ * Helper implementation for Instance for getting instances
+ *
+ * @author Gavin King
+ *
+ * @param <T>
+ */
+public class InstanceImpl<T> extends AbstractFacade<T, Instance<T>> implements Instance<T>, Serializable
+{
+
+ private static final long serialVersionUID = -376721889693284887L;
+ private static final Annotation[] EMPTY_BINDINGS = new Annotation[0];
+
+ private final Set<Bean<?>> beans;
+
+ public static <I> Instance<I> of(Type type, BeanManagerImpl manager, Set<Annotation> annotations)
+ {
+ return new InstanceImpl<I>(type, manager, annotations);
+ }
+
+ private InstanceImpl(Type type, BeanManagerImpl manager, Set<Annotation> bindings)
+ {
+ super(type, manager, bindings);
+ this.beans = getManager().getBeans(getType(), bindings.toArray(EMPTY_BINDINGS));
+ }
+
+ public T get(Annotation... bindings)
+ {
+ Annotation[] annotations = mergeInBindings(bindings);
+ Bean<T> bean = getManager().getBean(ResolvableWBClass.<T>of(getType(), annotations, getManager()), annotations);
+
+ @SuppressWarnings("unchecked")
+ T instance = (T) getManager().getReference(bean, getType(), getManager().createCreationalContext(bean));
+ return instance;
+ }
+
+ /**
+ * Gets a string representation
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return "Obtainable instance for type " + getType() + " and binding types " + getBindings();
+ }
+
+ private Collection<T> getReferences()
+ {
+ Collection<T> instances = new ArrayList<T>();
+ for (Bean<?> bean : beans)
+ {
+ Object object = getManager().getReference(bean, getType(), getManager().createCreationalContext(bean));
+
+ @SuppressWarnings("unchecked")
+ T instance = (T) object;
+
+ instances.add(instance);
+ }
+ return instances;
+ }
+
+ public Iterator<T> iterator()
+ {
+ return getReferences().iterator();
+ }
+
+ public boolean isAmbiguous()
+ {
+ return beans.size() > 1;
+ }
+
+ public boolean isUnsatisfied()
+ {
+ return beans.size() == 0;
+ }
+
+ public Instance<T> select(Annotation... bindings)
+ {
+ return selectInstance(this.getType(), bindings);
+ }
+
+ public <U extends T> Instance<U> select(Class<U> subtype, Annotation... bindings)
+ {
+ return selectInstance(subtype, bindings);
+ }
+
+ public <U extends T> Instance<U> select(TypeLiteral<U> subtype, Annotation... bindings)
+ {
+ return selectInstance(subtype.getType(), bindings);
+ }
+
+ private <U extends T> Instance<U> selectInstance(Type subtype, Annotation[] bindings)
+ {
+ return new InstanceImpl<U>(
+ subtype,
+ this.getManager(),
+ new HashSet<Annotation>(Arrays.asList(mergeInBindings(bindings))));
+ }
+
+}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -29,10 +29,10 @@
import org.jboss.webbeans.DefinitionException;
import org.jboss.webbeans.DeploymentException;
import org.jboss.webbeans.Validator;
-import org.jboss.webbeans.bean.builtin.EventBean;
import org.jboss.webbeans.bean.builtin.InjectionPointBean;
-import org.jboss.webbeans.bean.builtin.InstanceBean;
import org.jboss.webbeans.bean.builtin.ManagerBean;
+import org.jboss.webbeans.bean.builtin.facade.EventBean;
+import org.jboss.webbeans.bean.builtin.facade.InstanceBean;
import org.jboss.webbeans.bootstrap.api.Bootstrap;
import org.jboss.webbeans.bootstrap.api.Environments;
import org.jboss.webbeans.bootstrap.api.helpers.AbstractBootstrap;
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -26,7 +26,7 @@
import javax.enterprise.inject.TypeLiteral;
import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.bean.builtin.AbstractFacade;
+import org.jboss.webbeans.bean.builtin.facade.AbstractFacade;
import org.jboss.webbeans.util.Strings;
/**
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java 2009-08-16 15:35:33 UTC (rev 3523)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/resolution/TypeSafeBeanResolver.java 2009-08-16 15:37:44 UTC (rev 3524)
@@ -24,8 +24,8 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.bean.builtin.EventBean;
-import org.jboss.webbeans.bean.builtin.InstanceBean;
+import org.jboss.webbeans.bean.builtin.facade.EventBean;
+import org.jboss.webbeans.bean.builtin.facade.InstanceBean;
import org.jboss.webbeans.util.Beans;
import org.jboss.webbeans.util.Reflections;
import org.jboss.webbeans.util.collections.ConcurrentCache;
More information about the weld-commits
mailing list