Package com.caucho.config.reflect

Examples of com.caucho.config.reflect.BaseType


    InjectManager cdi = _cdiManager;
   
    ProcessInjectionTargetImpl<T> processTarget
      = new ProcessInjectionTargetImpl<T>(_cdiManager, target, annotatedType);
   
    BaseType eventType = cdi.createTargetBaseType(ProcessInjectionTargetImpl.class);
    eventType = eventType.fill(cdi.createTargetBaseType(annotatedType.getBaseType()));

    getEventManager().fireExtensionEvent(processTarget, eventType);

    return (InjectionTarget<T>) processTarget.getInjectionTarget();
  }
View Full Code Here


    if (declaringType != null)
      declaringClass = declaringType.getBaseType();
    else
      declaringClass = producesMethod.getJavaMember().getDeclaringClass();
   
    BaseType eventType = cdi.createTargetBaseType(ProcessProducerImpl.class);
    eventType = eventType.fill(cdi.createTargetBaseType(producesMethod.getBaseType()),
                               cdi.createTargetBaseType(declaringClass));

    getEventManager().fireExtensionEvent(event, eventType);
   
    return event.getProducer();
View Full Code Here

    ProcessProducerImpl<T,X> event
      = new ProcessProducerImpl<T,X>(producesField, producer);
   
    AnnotatedType<X> declaringType = producesField.getDeclaringType();
   
    BaseType eventType = cdi.createTargetBaseType(ProcessProducerImpl.class);
    eventType = eventType.fill(cdi.createTargetBaseType(producesField.getBaseType()),
                               cdi.createTargetBaseType(declaringType.getBaseType()));

    getEventManager().fireExtensionEvent(event, eventType);
   
    return event.getProducer();
View Full Code Here

    AnnotatedMethod<X> annotatedMethod = event.getAnnotatedMethod();
    AnnotatedType<X> declaringType = annotatedMethod.getDeclaringType();
    ObserverMethod<T> observerMethod = event.getObserverMethod();
    Type observedType = observerMethod.getObservedType();
   
    BaseType eventType = _cdiManager.createTargetBaseType(ProcessObserverImpl.class);
    eventType = eventType.fill(_cdiManager.createTargetBaseType(observedType),
                               _cdiManager.createTargetBaseType(declaringType.getBaseType()));
   
    getEventManager().fireExtensionEvent(event, eventType);
  }
View Full Code Here

    InjectManager cdi = _cdiManager;
   
    ProcessAnnotatedTypeImpl<T> processType
      = new ProcessAnnotatedTypeImpl<T>(type);

    BaseType baseType = cdi.createTargetBaseType(ProcessAnnotatedTypeImpl.class);
    baseType = baseType.fill(cdi.createTargetBaseType(type.getBaseType()));
    getEventManager().fireExtensionEvent(processType, baseType);

    if (processType.isVeto()) {
      return null;
    }
View Full Code Here

    return adapter;
  }

  public static void validateType(Type type)
  {
    BaseType baseType = InjectManager.getCurrent().createTargetBaseType(type);
    Class<?> rawType = baseType.getRawClass();
   
    if (rawType.isPrimitive())
      throw new ConfigException(L.l("'{0}' is an invalid @NormalScope bean because it's a Java primitive.",
                                    baseType));
   
View Full Code Here

        InjectionPoint ip = null;

        args[i] = new BeanArg(inject, param[i], bindings, ip);
      }

      BaseType baseType = inject.createTargetBaseType(param[0]);

      return new ExtensionMethod(method, baseType,
                                 inject.getQualifiers(paramAnn[0]),
                                 args);
    }
View Full Code Here

      = new ProducesFieldBean(manager, producer, beanField,
                              disposesMethod, disposesArgs);
    bean.introspect();
    bean.introspect(beanField);
   
    BaseType type = manager.createSourceBaseType(beanField.getBaseType());

    if (type.isGeneric()) {
      // ioc/07f1
      throw new InjectionException(L.l("'{0}' is an invalid @Produces field because it returns a generic type {1}",
                                       beanField.getJavaMember(),
                                       type));
    }
View Full Code Here

    */
  }

  public Set<Bean<?>> resolve(Type type, Annotation []bindings)
  {
    BaseType baseType = _beanManager.createTargetBaseType(type);

    return resolve(baseType, bindings);
  }
View Full Code Here

    }
   
    HashSet<Type> closure = new HashSet<Type>();
   
    for (Decorator<?> decorator : decorators) {
      BaseType type = _manager.createTargetBaseType(decorator.getDelegateType());
     
      closure.addAll(type.getTypeClosure(_manager));
    }
   
    _decoratorClasses = new HashSet<Class<?>>();
   
    for (Type genericType : closure) {
      BaseType type = _manager.createTargetBaseType(genericType);
     
      Class<?> rawClass = type.getRawClass();

      if (Object.class.equals(rawClass))
        continue;
     
      _decoratorClasses.add(rawClass);
View Full Code Here

TOP

Related Classes of com.caucho.config.reflect.BaseType

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.