Examples of ProviderInjector


Examples of org.jboss.errai.ioc.rebind.ioc.ProviderInjector

          if (isContextual) {
            injectFactory.addInjector(new ContextualProviderInjector(bindType, type, procContext));
          }
          else {
            injectFactory.addInjector(new ProviderInjector(bindType, type, procContext));
          }
          break;
        }

        if (iface.getFullyQualifiedName().equals(ContextualTypeProvider.class.getName())) {
          contextual = true;

          MetaParameterizedType pType = iface.getParameterizedType();

          if (pType == null) {
            throw new InjectionFailure("could not determine the bind type for the IOCProvider class: "
                    + type.getFullyQualifiedName());
          }

          // todo: check for nested type parameters
          MetaType typeParm = pType.getTypeParameters()[0];
          if (typeParm instanceof MetaParameterizedType) {
            bindType = (MetaClass) ((MetaParameterizedType) typeParm).getRawType();
          }
          else {
            bindType = (MetaClass) pType.getTypeParameters()[0];
          }
          break;
        }
      }

      if (bindType == null) {
        for (MetaClass iface : type.getInterfaces()) {
          if (!typeProviderCls.isAssignableFrom(iface)) {
            continue;
          }

          MetaParameterizedType pType = iface.getParameterizedType();

          if (pType == null) {
            throw new InjectionFailure("could not determine the bind type for the IOCProvider class: "
                    + type.getFullyQualifiedName());
          }

          // todo: check for nested type parameters
          bindType = (MetaClass) pType.getTypeParameters()[0];
        }
      }

      if (bindType == null) {
        throw new InjectionFailure("the annotated provider class does not appear to implement " +
                TypeProvider.class.getName() + ": " + type.getFullyQualifiedName());
      }

      final MetaClass finalBindType = bindType;

      Injector injector;
      if (contextual) {
        injector = new ContextualProviderInjector(finalBindType, type, procContext);
      }
      else {
        injector = new ProviderInjector(finalBindType, type, procContext);
      }

      injectFactory.addInjector(injector);
    }
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.ProviderInjector

          if (isContextual) {
            injectFactory.addInjector(new ContextualProviderInjector(bindType, type, procContext));
          }
          else {
            injectFactory.addInjector(new ProviderInjector(bindType, type, procContext));
          }
          break;
        }

        if (iface.getFullyQualifiedName().equals(ContextualTypeProvider.class.getName())) {
          contextual = true;

          MetaParameterizedType pType = iface.getParameterizedType();

          if (pType == null) {
            throw new InjectionFailure("could not determine the bind type for the IOCProvider class: "
                    + type.getFullyQualifiedName());
          }

          // todo: check for nested type parameters
          MetaType typeParm = pType.getTypeParameters()[0];
          if (typeParm instanceof MetaParameterizedType) {
            bindType = (MetaClass) ((MetaParameterizedType) typeParm).getRawType();
          }
          else {
            bindType = (MetaClass) pType.getTypeParameters()[0];
          }
          break;
        }
      }

      if (bindType == null) {
        for (MetaClass iface : type.getInterfaces()) {
          if (!typeProviderCls.isAssignableFrom(iface)) {
            continue;
          }

          MetaParameterizedType pType = iface.getParameterizedType();

          if (pType == null) {
            throw new InjectionFailure("could not determine the bind type for the IOCProvider class: "
                    + type.getFullyQualifiedName());
          }

          // todo: check for nested type parameters
          bindType = (MetaClass) pType.getTypeParameters()[0];
        }
      }

      if (bindType == null) {
        throw new InjectionFailure("the annotated provider class does not appear to implement " +
                TypeProvider.class.getName() + ": " + type.getFullyQualifiedName());
      }

      final MetaClass finalBindType = bindType;

      Injector injector;
      if (contextual) {
        injector = new ContextualProviderInjector(finalBindType, type, procContext);
      }
      else {
        injector = new ProviderInjector(finalBindType, type, procContext);
      }

      injectFactory.addInjector(injector);
    }
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.ProviderInjector

          if (isContextual) {
            injectFactory.addInjector(new ContextualProviderInjector(bindType, type, procContext));
          }
          else {
            injectFactory.addInjector(new ProviderInjector(bindType, type, procContext));
          }
          break;
        }

        if (iface.getFullyQualifiedName().equals(ContextualTypeProvider.class.getName())) {
          contextual = true;

          MetaParameterizedType pType = iface.getParameterizedType();

          if (pType == null) {
            throw new InjectionFailure("could not determine the bind type for the IOCProvider class: "
                    + type.getFullyQualifiedName());
          }

          // todo: check for nested type parameters
          MetaType typeParm = pType.getTypeParameters()[0];
          if (typeParm instanceof MetaParameterizedType) {
            bindType = (MetaClass) ((MetaParameterizedType) typeParm).getRawType();
          }
          else {
            bindType = (MetaClass) pType.getTypeParameters()[0];
          }
          break;
        }
      }

      if (bindType == null) {
        for (MetaClass iface : type.getInterfaces()) {
          if (!typeProviderCls.isAssignableFrom(iface)) {
            continue;
          }

          MetaParameterizedType pType = iface.getParameterizedType();

          if (pType == null) {
            throw new InjectionFailure("could not determine the bind type for the IOCProvider class: "
                    + type.getFullyQualifiedName());
          }

          // todo: check for nested type parameters
          bindType = (MetaClass) pType.getTypeParameters()[0];
        }
      }

      if (bindType == null) {
        throw new InjectionFailure("the annotated provider class does not appear to implement " +
                TypeProvider.class.getName() + ": " + type.getFullyQualifiedName());
      }

      final MetaClass finalBindType = bindType;

      Injector injector;
      if (contextual) {
        injector = new ContextualProviderInjector(finalBindType, type, procContext);
      }
      else {
        injector = new ProviderInjector(finalBindType, type, procContext);
      }

      injectFactory.addInjector(injector);
    }
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(
                    new ProviderInjector(providedType, providerClassType, injectionContext)
                );
              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (final MetaClass interfaceType : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(interfaceType.getErased())) {
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                }
                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(new ProviderInjector(providedType, providerClassType, injectionContext));

              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (MetaClass iface : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(iface.getErased())) {
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                }
                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(new ProviderInjector(providedType, providerClassType, injectionContext));

              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (MetaClass iface : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(iface.getErased())) {
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(
                    new ProviderInjector(providedType, providerClassType, injectionContext)
                );
              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (final MetaClass interfaceType : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(interfaceType.getErased())) {
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(
                    new ProviderInjector(providedType, providerClassType, injectionContext)
                );
              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (final MetaClass interfaceType : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(interfaceType.getErased())) {
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                }
                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(new ProviderInjector(providedType, providerClassType, injectionContext));
              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (final MetaClass interfaceType : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(interfaceType.getErased())) {
                    providerInterface = interfaceType;
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.injector.ProviderInjector

                }
                else {
                  providedType = (MetaClass) parmType;
                }

                injectionContext.registerInjector(new ProviderInjector(providedType, providerClassType, injectionContext));
              }
              else if (MC_ContextualTypeProvider.isAssignableFrom(providerClassType)) {
                for (MetaClass iface : providerClassType.getInterfaces()) {
                  if (MC_ContextualTypeProvider.equals(iface.getErased())) {
                    providerInterface = iface;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.