Package com.caucho.config.reflect

Examples of com.caucho.config.reflect.BaseType


        _delegateConstructor.setAccessible(true);
      }
     
      InjectManager manager = InjectManager.getCurrent();
     
      BaseType selfType = manager.createTargetBaseType(_selfType);
      BaseType delegateType
        = manager.createSourceBaseType(_delegateInjectionPoint.getType());
           
      _typeSet = new LinkedHashSet<Type>();
     
      for (Type type : selfType.getTypeClosure(manager)) {
        BaseType baseType = manager.createSourceBaseType(type);

        if (! baseType.getRawClass().isInterface())
          continue;
        if (baseType.getRawClass().equals(Serializable.class))
          continue;

        // ioc/0i5g, ioc/0i3r
        if (baseType.isAssignableFrom(delegateType)) {
          _typeSet.add(type);
         
          for (Method method : baseType.getRawClass().getMethods()) {
            Method implMethod = AnnotatedTypeUtil.findMethod(selfType.getRawClass().getMethods(), method);
           
            if (implMethod != null && Modifier.isFinal(implMethod.getModifiers())) {
              throw new ConfigException(L.l("'{0}.{1}' is an invalid decorator method because it is final.",
                                            implMethod.getDeclaringClass().getName(),
View Full Code Here


   
    // XXX:
    // _component = new SimpleBean(cl);
    // _component.setScopeClass(Dependent.class);
    // ioc/2601
    BaseType baseType = _cdiManager.createSourceBaseType(cl);
    AnnotatedType<T> annType = ReflectionAnnotatedFactory.introspectType(baseType);
    _annotatedType = new AnnotatedTypeImpl<T>(annType);
     
    _cdiManager.addConfiguredBean(cl.getName());
   
View Full Code Here

                             BaseType subType)
  {
    for (int i = 0; i < _observerList.size(); i++) {
      ObserverEntry<?> observer = _observerList.get(i);
     
      BaseType observerType = observer.getType();
     
      if ((observerType.isAssignableFrom(eventType)
           || observerType.isAssignableFrom(subType))
          && ! list.contains(observer)) {
        list.add(observer);
      }
    }
  }
View Full Code Here

        Named named = (Named) ann;
       
        String namedValue = named.value();

        if ("".equals(namedValue)) {
          BaseType baseType = AnnotatedTypeUtil.getBaseType(annotated);
         
          String name = baseType.getRawClass().getSimpleName();

          ann = Names.create(name);
        }

        qualifierList.add(ann);
View Full Code Here

                                                   producesMethod, producesArgs,
                                                   disposesMethod, disposesArgs);
    bean.introspect();
    bean.introspect(producesMethod);
   
    BaseType type = manager.createSourceBaseType(producesMethod.getBaseType());
   
    if (type.isGeneric()) {
      // ioc/07f0
      throw new InjectionException(L.l("'{0}' is an invalid @Produces method because it returns a generic type {1}",
                                       producesMethod.getJavaMember(),
                                       type));
    }
View Full Code Here

  public <T> Bean<T> processBean(Bean<T> bean, ProcessBean<T> processBean)
  {
    InjectManager cdi = _cdiManager;
   
    BaseType baseType = cdi.createTargetBaseType(processBean.getClass());
    baseType = baseType.fill(cdi.createTargetBaseType(bean.getBeanClass()));
   
    _pendingEventList.add(new PendingEvent(processBean, baseType));
   
    /*
    getEventManager().fireExtensionEvent(processBean, baseType);
View Full Code Here

  {
    InjectManager cdi = _cdiManager;
   
    ProcessBeanImpl<T> event = new ProcessBeanImpl<T>(_cdiManager, bean, ann);
   
    BaseType baseType = cdi.createTargetBaseType(event.getClass());
    baseType = baseType.fill(cdi.createTargetBaseType(bean.getBeanClass()));

    _pendingEventList.add(new PendingEvent(event, baseType));
   
    /*
    getEventManager().fireExtensionEvent(event, baseType);
View Full Code Here

    InjectManager cdi = _cdiManager;
   
    ProcessManagedBeanImpl<T> event
      = new ProcessManagedBeanImpl<T>(_cdiManager, bean, ann);
   
    BaseType baseType = cdi.createTargetBaseType(event.getClass());
    baseType = baseType.fill(cdi.createTargetBaseType(bean.getBeanClass()));
   
    _pendingEventList.add(new PendingEvent(event, baseType));
   
    /*
    getEventManager().fireExtensionEvent(event, baseType);
View Full Code Here

      = new ProcessProducerMethodImpl<T,X>(_cdiManager, bean);
   
    AnnotatedMethod<? super T> method = bean.getProducesMethod();
    Bean<?> producerBean = bean.getProducerBean();
   
    BaseType baseType = cdi.createTargetBaseType(event.getClass());
    baseType = baseType.fill(cdi.createTargetBaseType(method.getBaseType()),
                             cdi.createTargetBaseType(producerBean.getBeanClass()));
   
    _pendingEventList.add(new PendingEvent(event, baseType));
   
    /*
 
View Full Code Here

    ProcessProducerFieldImpl<T,X> event
      = new ProcessProducerFieldImpl<T,X>(_cdiManager, bean);
   
    AnnotatedField<? super T> field = bean.getField();
   
    BaseType baseType = cdi.createTargetBaseType(event.getClass());
    baseType = baseType.fill(cdi.createTargetBaseType(field.getBaseType()),
                             cdi.createTargetBaseType(bean.getProducerBean().getBeanClass()));
   
    _pendingEventList.add(new PendingEvent(event, baseType));
   
    /*
 
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.