Package org.jboss.errai.ioc.rebind.ioc.metadata

Examples of org.jboss.errai.ioc.rebind.ioc.metadata.QualifyingMetadata


    for (final MetaMethod method : declaringClass.getDeclaredMethods()) {
      final MetaParameter[] parameters = method.getParameters();
      if (parameters.length != 1) continue;

      final QualifyingMetadata qualifyingMetadata
          = ctx.getQualifyingMetadataFactory().createFrom(parameters[0].getAnnotations());

      if (parameters[0].isAnnotationPresent(Disposes.class)
          && parameters[0].getType().isAssignableFrom(injectedType)
          && qualifyingMetadata.doesSatisfy(getQualifyingMetadata())) {
        return method;
      }
    }

    return null;
View Full Code Here


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

    if (InjectUtil.checkIfTypeNeedsAddingToBeanStore(context, this)) {
      final QualifyingMetadata md = delegate.getQualifyingMetadata();
      context.getProcessingContext().appendToEnd(
          Stmt.loadVariable(context.getProcessingContext().getContextVariableReference())
              .invoke("addBean", type, delegate.getInjectedType(), Refs.get(getCreationalCallbackVarName()),
                  isSingleton() ? valueRef : null, md.render(), null, false));

      for (final RegistrationHook hook : getRegistrationHooks()) {
        hook.onRegister(context, valueRef);
      }
    }
View Full Code Here

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

    if (InjectUtil.checkIfTypeNeedsAddingToBeanStore(context, this)) {
      final QualifyingMetadata md = delegate.getQualifyingMetadata();
      context.getProcessingContext().appendToEnd(
          Stmt.loadVariable(context.getProcessingContext().getContextVariableReference())
              .invoke("addBean", type, delegate.getInjectedType(), Refs.get(getCreationalCallbackVarName()),
                  isSingleton(), md.render(), null, false));

      for (final RegistrationHook hook : getRegistrationHooks()) {
        hook.onRegister(context, valueRef);
      }
    }
View Full Code Here

TOP

Related Classes of org.jboss.errai.ioc.rebind.ioc.metadata.QualifyingMetadata

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.