<commit_before>package io.quarkus.arc.deployment.devconsole;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import javax.enterprise.inject.spi.InterceptionType;

import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.MethodInfo;

import io.quarkus.arc.deployment.CompletedApplicationClassPredicateBuildItem;
import io.quarkus.arc.processor.InterceptorInfo;

public class DevInterceptorInfo implements Comparable<DevInterceptorInfo> {

    public static DevInterceptorInfo from(InterceptorInfo interceptor, CompletedApplicationClassPredicateBuildItem predicate) {
        boolean isApplicationBean = predicate.test(interceptor.getBeanClass());
        Set<Name> bindings = new HashSet<>();
        for (AnnotationInstance binding : interceptor.getBindings()) {
            bindings.add(Name.from(binding));
        }
        Map<InterceptionType, MethodInfo> intercepts = new HashMap<>();
        if (interceptor.intercepts(InterceptionType.AROUND_INVOKE)) {
            intercepts.put(InterceptionType.AROUND_INVOKE, interceptor.getAroundInvoke());
        }
        if (interceptor.intercepts(InterceptionType.AROUND_CONSTRUCT)) {
            intercepts.put(InterceptionType.AROUND_CONSTRUCT, interceptor.getAroundInvoke());
        }
        if (interceptor.intercepts(InterceptionType.POST_CONSTRUCT)) {
            intercepts.put(InterceptionType.POST_CONSTRUCT, interceptor.getPostConstruct());
        }
        if (interceptor.intercepts(InterceptionType.PRE_DESTROY)) {
            intercepts.put(InterceptionType.PRE_DESTROY, interceptor.getPreDestroy());
        }
        return new DevInterceptorInfo(interceptor.getIdentifier(), Name.from(interceptor.getBeanClass()), bindings,
                interceptor.getPriority(), intercepts,
                isApplicationBean);
    }<commit_msg>Dev UI - ArC interceptors fails if AroundConstruct interceptor exists<commit_after>package io.quarkus.arc.deployment.devconsole;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import javax.enterprise.inject.spi.InterceptionType;

import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.MethodInfo;

import io.quarkus.arc.deployment.CompletedApplicationClassPredicateBuildItem;
import io.quarkus.arc.processor.InterceptorInfo;

public class DevInterceptorInfo implements Comparable<DevInterceptorInfo> {

    public static DevInterceptorInfo from(InterceptorInfo interceptor, CompletedApplicationClassPredicateBuildItem predicate) {
        boolean isApplicationBean = predicate.test(interceptor.getBeanClass());
        Set<Name> bindings = new HashSet<>();
        for (AnnotationInstance binding : interceptor.getBindings()) {
            bindings.add(Name.from(binding));
        }
        Map<InterceptionType, MethodInfo> intercepts = new HashMap<>();
        if (interceptor.intercepts(InterceptionType.AROUND_INVOKE)) {
            intercepts.put(InterceptionType.AROUND_INVOKE, interceptor.getAroundInvoke());
        }
        if (interceptor.intercepts(InterceptionType.AROUND_CONSTRUCT)) {
            intercepts.put(InterceptionType.AROUND_CONSTRUCT, interceptor.getAroundConstruct());
        }
        if (interceptor.intercepts(InterceptionType.POST_CONSTRUCT)) {
            intercepts.put(InterceptionType.POST_CONSTRUCT, interceptor.getPostConstruct());
        }
        if (interceptor.intercepts(InterceptionType.PRE_DESTROY)) {
            intercepts.put(InterceptionType.PRE_DESTROY, interceptor.getPreDestroy());
        }
        return new DevInterceptorInfo(interceptor.getIdentifier(), Name.from(interceptor.getBeanClass()), bindings,
                interceptor.getPriority(), intercepts,
                isApplicationBean);
    }
{'fraction_non_alphanumeric': 0.09484808454425363, 'fraction_numerical': 0.0, 'mean_word_length': 4.095558546433378, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7595261', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1040, 'n_words': 154}