org.jboss.seam.solder.bean
Class Beans

java.lang.Object
  extended by org.jboss.seam.solder.bean.Beans

public class Beans
extends Object

A set of utility methods for working with beans.

Author:
Pete Muir

Method Summary
static void checkReturnValue(Object instance, Bean<?> bean, InjectionPoint injectionPoint, BeanManager beanManager)
           
static
<X> List<InjectionPoint>
createInjectionPoints(AnnotatedMethod<X> method, Bean<?> declaringBean, BeanManager beanManager)
          Given a method, and the bean on which the method is declared, create a collection of injection points representing the parameters of the method.
static Set<Annotation> getQualifiers(BeanManager beanManager, Annotation[]... annotations)
          Extract the qualifiers from a set of annotations.
static Set<Annotation> getQualifiers(BeanManager beanManager, Iterable<Annotation>... annotations)
          Extract the qualifiers from a set of annotations.
static Set<Annotation> getQualifiers(BeanManager beanManager, Iterable<Annotation> annotations)
          Extract the qualifiers from a set of annotations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getQualifiers

public static Set<Annotation> getQualifiers(BeanManager beanManager,
                                            Iterable<Annotation>... annotations)
Extract the qualifiers from a set of annotations.

Parameters:
beanManager - the beanManager to use to determine if an annotation is a qualifier
annotations - the annotations to check
Returns:
any qualifiers present in annotations

getQualifiers

public static Set<Annotation> getQualifiers(BeanManager beanManager,
                                            Iterable<Annotation> annotations)
Extract the qualifiers from a set of annotations.

Parameters:
beanManager - the beanManager to use to determine if an annotation is a qualifier
annotations - the annotations to check
Returns:
any qualifiers present in annotations

getQualifiers

public static Set<Annotation> getQualifiers(BeanManager beanManager,
                                            Annotation[]... annotations)
Extract the qualifiers from a set of annotations.

Parameters:
beanManager - the beanManager to use to determine if an annotation is a qualifier
annotations - the annotations to check
Returns:
any qualifiers present in annotations

checkReturnValue

public static void checkReturnValue(Object instance,
                                    Bean<?> bean,
                                    InjectionPoint injectionPoint,
                                    BeanManager beanManager)

createInjectionPoints

public static <X> List<InjectionPoint> createInjectionPoints(AnnotatedMethod<X> method,
                                                             Bean<?> declaringBean,
                                                             BeanManager beanManager)
Given a method, and the bean on which the method is declared, create a collection of injection points representing the parameters of the method.

Type Parameters:
X - the type declaring the method
Parameters:
method - the method
declaringBean - the bean on which the method is declared
beanManager - the bean manager to use to create the injection points
Returns:
the injection points


Copyright © 2008-2010 Seam Framework. All Rights Reserved.