From b3e2c3577345c1851a0b45ef6370a88180d59988 Mon Sep 17 00:00:00 2001 From: Emerson Oliveira Date: Fri, 9 Aug 2013 10:32:16 -0300 Subject: [PATCH] Adição de javadoc na classe br.gov.frameworkdemoiselle.util.Beans --- impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Beans.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+), 0 deletions(-) diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Beans.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Beans.java index 69ea286..a7ae36b 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Beans.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/util/Beans.java @@ -52,6 +52,14 @@ import javax.enterprise.inject.spi.InjectionPoint; import br.gov.frameworkdemoiselle.DemoiselleException; +/** + *

+ * Utilizes a {@link BeanManager}, obtained in the bootstrap process, to provide custom operations for obtaining contextual references for beans. + *

+ * All its public methods are static. + * + * @author SERPRO + */ public final class Beans { private static transient ResourceBundle bundle; @@ -69,6 +77,20 @@ public final class Beans { return manager; } + /** + * Obtains a injectble instance of a bean, which have the given required type and qualifiers, + * and are available for injection in the point where this method was call. + * + * @param beanClass + * the beanClass which instace is requested to be obtained. + * @param qualifiers + * a set of qualifiers with any quantity of elements (zero including). + * @return Type + * a instace of the injected beanClass. + * @throws DemoiselleException + * if no bean are avaliable to be injected for the given Class and qualifiers. + * + */ public static T getReference(final Class beanClass, Annotation... qualifiers) { T instance; @@ -91,6 +113,18 @@ public final class Beans { return instance; } + /** + * Obtains a injectble instance of a bean, which have the given required type + * and are available for injection in the point where this method was call. + * + * @param beanClass + * the beanClass which instace is requested to be obtained. + * @return Type + * a instace of the injected beanClass. + * @throws DemoiselleException + * if no bean are avaliable to be injected for the given Class. + * + */ public static T getReference(final Class beanClass) { T instance; @@ -105,6 +139,18 @@ public final class Beans { return instance; } + /** + * Obtains a injectble instance of a bean, which have the given EL name + * and are available for injection in the point where this method was call. + * + * @param beanName + * the EL name for the requested bean. + * @return Type + * a instace of the injected beanClass. + * @throws DemoiselleException + * if no bean are avaliable to be injected for the given bean name. + * + */ @SuppressWarnings("unchecked") public static T getReference(String beanName) { T instance; -- libgit2 0.21.2