Package javax.enterprise.inject

Examples of javax.enterprise.inject.Instance


    }
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public <T> Instance<T> findOne(Class<? extends T> implementationClass, AnnotationLiteral<?>... qualifiers) {
    Instance possibleConfigurations = CDI.current().select(implementationClass, qualifiers);
    return possibleConfigurations;
  }
View Full Code Here


        if (current != null) {
            /*
             * 2. Get an instance of that bean.
             */
            Instance instance = CDI.current().select(
                    current.getBean().getBeanClass(), new AnnotationLiteral<Any>() {
                    });

            try {
                /*
                 * 3. Call the required method and capture its result.
                 *
                 * Currently assuming String invoke() signature, but that obviously
                 * needs to be expanded.
                 */
                viewId = (String) current.getMethod().invoke(instance.get(), new Object[0]);
            } catch (Throwable throwable) {
                throw new FacesException(throwable);
            }
            if (context.getViewRoot() == null) {
                UIViewRoot viewRoot = new UIViewRoot();
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.Instance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.