Package org.jboss.errai.ioc.client.api

Examples of org.jboss.errai.ioc.client.api.ActivatedBy


    if (InjectUtil.checkIfTypeNeedsAddingToBeanStore(context, this)) {
      _registerCache = new RegisterCache(context, valueRef);
      final ContextualStatementBuilder statement;

      ActivatedBy ab = getInjectedType().getAnnotation(ActivatedBy.class);
      if (ab != null) {
        if (ab.value().isAnnotationPresent(LoadAsync.class)) {
          throw new RuntimeException(LoadAsync.class.getSimpleName()
              + " is not supported on bean activators. Check type: " + ab.value().getName());
        }
       
        statement =
            loadVariable(context.getProcessingContext().getContextVariableReference()).invoke("addBean",
                getInjectedType(), getInjectedType(), Refs.get(getCreationalCallbackVarName()), isSingleton(),
                qualifyingMetadata.render(), beanName, true, Stmt.load(ab.value()));
      }
      else {
        statement =
            loadVariable(context.getProcessingContext().getContextVariableReference()).invoke("addBean",
                getInjectedType(), getInjectedType(), Refs.get(getCreationalCallbackVarName()), isSingleton(),
View Full Code Here


        valueRef = Stmt.loadStatic(SimpleInjectionContext.class, "LAZY_INIT_REF");
      }

      final ContextualStatementBuilder statement;

      ActivatedBy ab = getInjectedType().getAnnotation(ActivatedBy.class);
      if (ab != null) {
        statement = loadVariable(context.getProcessingContext().getContextVariableReference())
            .invoke("addBean", getInjectedType(), getInjectedType(), Refs.get(getCreationalCallbackVarName()),
                valueRef, qualifyingMetadata.render(), beanName, true, Stmt.load(ab.value()));
      }
      else {
        statement = loadVariable(context.getProcessingContext().getContextVariableReference())
            .invoke("addBean", getInjectedType(), getInjectedType(), Refs.get(getCreationalCallbackVarName()),
                valueRef, qualifyingMetadata.render(), beanName, true);
View Full Code Here

  public void registerWithBeanManager(final InjectionContext context, final Statement valueRef) {

    if (InjectUtil.checkIfTypeNeedsAddingToBeanStore(context, this)) {
      final QualifyingMetadata md = delegate.getQualifyingMetadata();
     
      ActivatedBy ab = delegate.getInjectedType().getAnnotation(ActivatedBy.class);
      if (ab != null) {
        if (ab.value().isAnnotationPresent(LoadAsync.class)) {
          throw new RuntimeException(LoadAsync.class.getSimpleName()
              + " is not supported on bean activators. Check type: " + ab.value().getName());
        }
     
        context.getProcessingContext().appendToEnd(
            Stmt.loadVariable(context.getProcessingContext().getContextVariableReference())
                .invoke("addBean", type, delegate.getInjectedType(), Refs.get(getCreationalCallbackVarName()),
                    isSingleton(), md.render(), delegate.getBeanName(), false, Stmt.load(ab.value())));
      }
      else {
     
      context.getProcessingContext().appendToEnd(
          Stmt.loadVariable(context.getProcessingContext().getContextVariableReference())
View Full Code Here

                                      final Statement valueRef) {

    if (InjectUtil.checkIfTypeNeedsAddingToBeanStore(context, this)) {
      final QualifyingMetadata md = delegate.getQualifyingMetadata();
     
      ActivatedBy ab = delegate.getInjectedType().getAnnotation(ActivatedBy.class);
      if (ab != null) {
        context.getProcessingContext().appendToEnd(
            Stmt.loadVariable(context.getProcessingContext().getContextVariableReference())
                .invoke("addBean", type, delegate.getInjectedType(), Refs.get(getCreationalCallbackVarName()),
                    isSingleton() ? valueRef : null, md.render(), delegate.getBeanName(), false, Stmt.load(ab.value())));
      }
      else {
        context.getProcessingContext().appendToEnd(
            Stmt.loadVariable(context.getProcessingContext().getContextVariableReference())
                .invoke("addBean", type, delegate.getInjectedType(), Refs.get(getCreationalCallbackVarName()),
View Full Code Here

TOP

Related Classes of org.jboss.errai.ioc.client.api.ActivatedBy

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.