Examples of HierarchyDiscovery


Examples of org.apache.deltaspike.core.util.HierarchyDiscovery

    {
        if (overriddenType == null)
        {
            if (genericType != null)
            {
                typeClosure = new HierarchyDiscovery(genericType).getTypeClosure();
                this.type = genericType;
            }
            else
            {
                typeClosure = new HierarchyDiscovery(type).getTypeClosure();
                this.type = type;
            }
        }
        else
        {
View Full Code Here

Examples of org.apache.deltaspike.core.util.HierarchyDiscovery

                                                                                  Set<Annotation> handlerQualifiers,
                                                                                  boolean isBefore)
    {
        final Collection<HandlerMethod<? extends Throwable>> returningHandlers =
                new TreeSet<HandlerMethod<? extends Throwable>>(new ExceptionHandlerComparator());
        final HierarchyDiscovery h = new HierarchyDiscovery(exceptionClass);
        final Set<Type> closure = h.getTypeClosure();

        for (Type hierarchyType : closure)
        {
            if (allHandlers.get(hierarchyType) != null)
            {
View Full Code Here

Examples of org.apache.deltaspike.core.util.HierarchyDiscovery

        // to re-add lines to check for this.
    }

    private int compareHierarchies(Type lhsExceptionType, Type rhsExceptionType)
    {
        HierarchyDiscovery lhsHierarchy = new HierarchyDiscovery(lhsExceptionType);
        Set<Type> lhsTypeclosure = lhsHierarchy.getTypeClosure();

        if (lhsTypeclosure.contains(rhsExceptionType))
        {
            final int indexOfLhsType = new ArrayList<Type>(lhsTypeclosure).indexOf(lhsExceptionType);
            final int indexOfRhsType = new ArrayList<Type>(lhsTypeclosure).indexOf(rhsExceptionType);
View Full Code Here

Examples of org.apache.deltaspike.core.util.HierarchyDiscovery

                                                                                  Set<Annotation> handlerQualifiers,
                                                                                  boolean isBefore)
    {
        final Collection<HandlerMethod<? extends Throwable>> returningHandlers =
                new TreeSet<HandlerMethod<? extends Throwable>>(new ExceptionHandlerComparator());
        final HierarchyDiscovery h = new HierarchyDiscovery(exceptionClass);
        final Set<Type> closure = h.getTypeClosure();

        for (Type hierarchyType : closure)
        {
            if (allHandlers.get(hierarchyType) != null)
            {
View Full Code Here

Examples of org.apache.deltaspike.core.util.HierarchyDiscovery

        // to re-add lines to check for this.
    }

    private int compareHierarchies(Type lhsExceptionType, Type rhsExceptionType)
    {
        HierarchyDiscovery lhsHierarchy = new HierarchyDiscovery(lhsExceptionType);
        Set<Type> lhsTypeclosure = lhsHierarchy.getTypeClosure();

        if (lhsTypeclosure.contains(rhsExceptionType))
        {
            final int indexOfLhsType = new ArrayList<Type>(lhsTypeclosure).indexOf(lhsExceptionType);
            final int indexOfRhsType = new ArrayList<Type>(lhsTypeclosure).indexOf(rhsExceptionType);
View Full Code Here

Examples of org.infinispan.cdi.util.HierarchyDiscovery

                        }
                        postProcessQualifierSet(qualifiers);

                        for (final Synthetic producer : producers) {
                            final DefaultBeanType beanType = beanTypeInformation.get(producer);
                            Set<Type> types = new HierarchyDiscovery(beanType.getType()).getTypeClosure();
                            if (Reflections.matches(type, types)) {
                                if (beanType.getQualifiers().equals(qualifiers)) {
                                    for (final Annotation annotation : p.getAnnotations()) {
                                        if (beanManager.isQualifier(annotation.annotationType())) {
                                            builder.removeFromMethodParameter(m.getJavaMember(), p.getPosition(), annotation.annotationType());
View Full Code Here

Examples of org.infinispan.cdi.util.HierarchyDiscovery

   private final AnnotationStore annotations;

   protected AnnotatedImpl(Class<?> type, AnnotationStore annotations, Type genericType, Type overridenType) {
      if (overridenType == null) {
         if (genericType != null) {
            typeClosure = new HierarchyDiscovery(genericType).getTypeClosure();
            this.type = genericType;
         } else {
            typeClosure = new HierarchyDiscovery(type).getTypeClosure();
            this.type = type;
         }
      } else {
         this.type = overridenType;
         this.typeClosure = Collections.singleton(overridenType);
View Full Code Here

Examples of org.jboss.cdi.tck.util.HierarchyDiscovery

        }
        return null;
    }

    private static Type[] getActualTypeArguments(Type type) {
        Type resolvedType = new HierarchyDiscovery(type).getResolvedType();
        if (resolvedType instanceof ParameterizedType) {
            return ((ParameterizedType) resolvedType).getActualTypeArguments();
        } else {
            return new Type[] {};
        }
View Full Code Here

Examples of org.jboss.cdi.tck.util.HierarchyDiscovery

        });
    }

    private Set<Type> getInterfacesImplemented(Class<?> clazz) {
        Set<Type> interfaces = new HashSet<Type>();
        interfaces.addAll(new HierarchyDiscovery(clazz).getFlattenedTypes());
        return interfaces;
    }
View Full Code Here

Examples of org.jboss.cdi.tck.util.HierarchyDiscovery

        });
    }

    private Set<Type> getInterfacesImplemented(Class<?> clazz) {
        Set<Type> interfaces = new HashSet<Type>();
        interfaces.addAll(new HierarchyDiscovery(clazz).getFlattenedTypes());
        return interfaces;
    }
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.