org.jboss.seam.cron.util
Class CdiUtils

java.lang.Object
  extended by org.jboss.seam.cron.util.CdiUtils

public class CdiUtils
extends Object

Author:
peteroyle

Constructor Summary
CdiUtils()
           
 
Method Summary
static
<T> T
getInstanceByType(BeanManager manager, Class<T> type, Annotation... bindings)
          Utility method allowing managed instances of beans to provide entry points for non-managed beans (such as WeldContainer).
static Annotation getQualifier(Annotation binding, Class qualifierType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CdiUtils

public CdiUtils()
Method Detail

getQualifier

public static Annotation getQualifier(Annotation binding,
                                      Class qualifierType)

getInstanceByType

public static <T> T getInstanceByType(BeanManager manager,
                                      Class<T> type,
                                      Annotation... bindings)
Utility method allowing managed instances of beans to provide entry points for non-managed beans (such as WeldContainer). Should only called once CDI has finished booting.

Parameters:
manager - the BeanManager to use to access the managed instance
type - the type of the Bean
bindings - the bean's qualifiers
Returns:
a managed instance of the bean


Copyright © 2011 Seam Framework. All Rights Reserved.