Examples of HierarchyDiscovery


Examples of org.jboss.weld.util.reflection.HierarchyDiscovery

     * @param decorator
     * @throws DefinitionException If the delegate type doesn't implement or extend all decorated types
     */
    public static void checkDelegateType(Decorator<?> decorator) {

        Set<Type> types = new HierarchyDiscovery(decorator.getDelegateType()).getTypeClosure();

        for (Type decoratedType : decorator.getDecoratedTypes()) {
            if(!types.contains(decoratedType)) {
                throw BeanLogger.LOG.delegateMustSupportEveryDecoratedType(decoratedType, decorator);
            }
View Full Code Here

Examples of org.jboss.weld.util.reflection.HierarchyDiscovery

    protected ObserverMethodImpl(final EnhancedAnnotatedMethod<T, ? super X> observer, final RIBean<X> declaringBean, final BeanManagerImpl manager) {
        this.beanManager = manager;
        this.declaringBean = declaringBean;
        this.observerMethod = initMethodInjectionPoint(observer, declaringBean, manager);
        EnhancedAnnotatedParameter<?, ? super X> eventParameter = observer.getEnhancedParameters(Observes.class).get(0);
        this.eventType = new HierarchyDiscovery(declaringBean.getBeanClass()).resolveType(eventParameter.getBaseType());
        this.id = createId(observer, declaringBean);
        this.bindings = manager.getServices().get(SharedObjectCache.class)
                .getSharedSet(observer.getEnhancedParameters(Observes.class).get(0).getMetaAnnotations(Qualifier.class));
        Observes observesAnnotation = observer.getEnhancedParameters(Observes.class).get(0).getAnnotation(Observes.class);
        this.reception = observesAnnotation.notifyObserver();
View Full Code Here

Examples of org.jboss.weld.util.reflection.HierarchyDiscovery

        this.type = type;
    }

    @Override
    protected Set<Type> computeValue() {
        return new HierarchyDiscovery(type).getTypeClosure();
    }
View Full Code Here

Examples of org.jboss.weld.util.reflection.HierarchyDiscovery

        // this is a raw type with missing type arguments
        if (!Types.getCanonicalType(type2).equals(type2)) {
            return true;
        }

        return matches(type1, new HierarchyDiscovery(type2));
    }
View Full Code Here

Examples of org.jboss.weld.util.reflection.HierarchyDiscovery

            return false;
        }
        if (matches(type1, type2)) {
            return true;
        }
        return matches(type1, new HierarchyDiscovery(type2));
    }
View Full Code Here

Examples of org.jboss.weld.util.reflection.HierarchyDiscovery

    }

    public Set<Type> getInterfaceClosure(Class<?> rawType) {
        Set<Type> types = new HashSet<Type>();
        for (Type t : rawType.getGenericInterfaces()) {
            types.addAll(new HierarchyDiscovery(t).getTypeClosure());
        }
       
        return types;
    }
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.