Skip to content

Commit

Permalink
WELD-315 implemented BeforeBeanDiscovery.addStereotype
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Dec 7, 2009
1 parent 737ebf2 commit 3ad53cf
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -23,14 +23,14 @@
import javax.enterprise.inject.spi.BeforeBeanDiscovery;

import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.InvalidOperationException;
import org.jboss.weld.bootstrap.BeanDeployment;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.literal.BindingTypeLiteral;
import org.jboss.weld.literal.InterceptorBindingTypeLiteral;
import org.jboss.weld.literal.NormalScopeLiteral;
import org.jboss.weld.literal.ScopeLiteral;
import org.jboss.weld.literal.StereotypeLiteral;

public class BeforeBeanDiscoveryImpl extends AbstractBeanDiscoveryEvent implements BeforeBeanDiscovery
{
Expand Down Expand Up @@ -69,7 +69,11 @@ public void addScope(Class<? extends Annotation> scopeType, boolean normal, bool

public void addStereotype(Class<? extends Annotation> stereotype, Annotation... stereotypeDef)
{
throw new InvalidOperationException();
getTypeStore().add(stereotype, new StereotypeLiteral());
for(Annotation a : stereotypeDef)
{
getTypeStore().add(stereotype, a);
}
}

public void addAnnotatedType(AnnotatedType<?> type)
Expand Down

0 comments on commit 3ad53cf

Please sign in to comment.