jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsMethodParameterProcessor.java
private ArrayList<ParamDetail> getResouceClasses(final CompositeIndex index,
                                   final ClassLoader classLoader,
                                   Set<String> knownResourceClasses,
                                   boolean isFromUnitTest) {

        ArrayList<ParamDetail> detailList = new ArrayList<>();
        ArrayList<String> classNameArr = new ArrayList<>();

        if (isFromUnitTest) {
            Indexer indexer = new Indexer();
            for (String className : knownResourceClasses) {
                try {
                    String pathName = className.replace(".", File.separator);
                    InputStream stream = classLoader.getResourceAsStream(pathName + ".class");
                    ClassInfo classInfo = indexer.index(stream);

                    List<AnnotationInstance> defaultValuesList =
                            classInfo.annotations().get(DEFAULT_VALUE_DOTNAME);

                    if (!defaultValuesList.isEmpty()) {
                        classNameArr.add((classInfo).name().toString());
                    }

                    stream.close();

                } catch (IOException e) {
                    JAXRS_LOGGER.classIntrospectionFailure(e.getClass().getName(),
                            e.getMessage());
                }
            }
        } else {

            for (String clazzName : knownResourceClasses) {

                ClassInfo classInfo = index.getClassByName(DotName.createSimple(clazzName));
                if (classInfo != null) {
                    Map<DotName, List<AnnotationInstance>> annotationsMap =
                            classInfo.annotations();

                    if (annotationsMap != null && !annotationsMap.isEmpty()) {
                        List<AnnotationInstance> xInstance = annotationsMap.get(
                                JaxrsAnnotations.PATH.getDotName());
                        List<AnnotationInstance> xdefaultValuesList =
                                annotationsMap.get(DEFAULT_VALUE_DOTNAME);
                        if ((xInstance != null && !xInstance.isEmpty()) &&
                             (xdefaultValuesList != null && !xdefaultValuesList.isEmpty())) {
                            classNameArr.add((classInfo).name().toString());
                        }
                    }
                }
            }
        }

        // resource classes with @DefaultValue
        // find methods and method params with @DefaultValue
        for (String className : classNameArr) {
            Class<?> clazz = null;
            try {
                clazz = classLoader.loadClass(className);
                for (Method method : clazz.getMethods()) {
                    if (clazz == method.getDeclaringClass()) {
                        Type[] genParamTypeArr = method.getGenericParameterTypes();
                        Annotation[][] annotationMatrix = method.getParameterAnnotations();

                        for (int j = 0; j < genParamTypeArr.length; j++) {
                            DefaultValue defaultValue = lookupDefaultValueAnn(annotationMatrix[j]);

                            if (defaultValue != null) {
                                Class paramClazz = checkParamType(genParamTypeArr[j],
                                        method, j, classLoader);

                                if (paramClazz != null) {
                                    detailList.add(new ParamDetail(method,
                                            defaultValue, paramClazz, annotationMatrix[j]));
                                }
                            }
                        }
                    }
                }

            } catch (ClassNotFoundException e) {
                JAXRS_LOGGER.classIntrospectionFailure(e.getClass().getName(),
                        e.getMessage());
            }
        }
        return detailList;
    }
private ArrayList<ParamDetail> getResouceClasses(final CompositeIndex index,
                                   final ClassLoader classLoader,
                                   Set<String> knownResourceClasses,
                                   boolean isFromUnitTest) {

        ArrayList<ParamDetail> detailList = new ArrayList<>();
        ArrayList<String> classNameArr = new ArrayList<>();

        if (isFromUnitTest) {
            Indexer indexer = new Indexer();
            for (String className : knownResourceClasses) {
                try {
                    String pathName = className.replace(".", File.separator);
                    InputStream stream = classLoader.getResourceAsStream(pathName + ".class");
                    ClassInfo classInfo = indexer.index(stream);

                    List<AnnotationInstance> defaultValuesList =
                            classInfo.annotations().get(DEFAULT_VALUE_DOTNAME);

                    if (!defaultValuesList.isEmpty()) {
                        classNameArr.add((classInfo).name().toString());
                    }

                    stream.close();

                } catch (IOException e) {
                    JAXRS_LOGGER.classIntrospectionFailure(e.getClass().getName(),
                            e.getMessage());
                }
            }
        } else {

            for (String clazzName : knownResourceClasses) {

                ClassInfo classInfo = index.getClassByName(DotName.createSimple(clazzName));
                if (classInfo != null) {
                    Map<DotName, List<AnnotationInstance>> annotationsMap =
                            classInfo.annotations();

                    if (annotationsMap != null && !annotationsMap.isEmpty()) {
                        List<AnnotationInstance> xInstance = annotationsMap.get(
                                JaxrsAnnotations.PATH.getDotName());
                        List<AnnotationInstance> xdefaultValuesList =
                                annotationsMap.get(DEFAULT_VALUE_DOTNAME);
                        if ((xInstance != null && !xInstance.isEmpty()) &&
                             (xdefaultValuesList != null && !xdefaultValuesList.isEmpty())) {
                            classNameArr.add((classInfo).name().toString());
                        }
                    }
                }
            }
        }

        // resource classes with @DefaultValue
        // find methods and method params with @DefaultValue
        for (String className : classNameArr) {
            Class<?> clazz = null;
            try {
                clazz = classLoader.loadClass(className);
                for (Method method : clazz.getMethods()) {
                    if (clazz == method.getDeclaringClass()) {
                        Type[] genParamTypeArr = method.getGenericParameterTypes();
                        Annotation[][] annotationMatrix = method.getParameterAnnotations();

                        for (int j = 0; j < genParamTypeArr.length; j++) {
                            DefaultValue defaultValue = lookupDefaultValueAnn(annotationMatrix[j]);

                            if (defaultValue != null) {
                                Class paramClazz = checkParamType(genParamTypeArr[j],
                                        method, j, classLoader);

                                if (paramClazz != null) {
                                    detailList.add(new ParamDetail(method,
                                            defaultValue, paramClazz, annotationMatrix[j]));
                                }
                            }
                        }
                    }
                }

            } catch (ClassNotFoundException e) {
                JAXRS_LOGGER.classIntrospectionFailure(e.getClass().getName(),
                        e.getMessage());
            }
        }
        return detailList;
    }
Create list of objects that represents resource method parameters with a
DefaultValue annontation assigned to it.

When running unitTest the classes must be indexed.  In normal deployment
the indexing is already done.

@param index
@param classLoader
@return