src/main/java/io/github/classgraph/ClassInfo.java
void addMethodInfo(final MethodInfoList methodInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
        for (final MethodInfo mi : methodInfoList) {
            // Index method annotations
            addFieldOrMethodAnnotationInfo(mi.annotationInfo, /* isField = */ false, classNameToClassInfo);

            // Index method parameter annotations
            if (mi.parameterAnnotationInfo != null) {
                for (int i = 0; i < mi.parameterAnnotationInfo.length; i++) {
                    final AnnotationInfo[] paramAnnotationInfoArr = mi.parameterAnnotationInfo[i];
                    if (paramAnnotationInfoArr != null) {
                        for (int j = 0; j < paramAnnotationInfoArr.length; j++) {
                            final AnnotationInfo methodParamAnnotationInfo = paramAnnotationInfoArr[j];
                            final ClassInfo annotationClassInfo = getOrCreateClassInfo(
                                    methodParamAnnotationInfo.getName(), ANNOTATION_CLASS_MODIFIER,
                                    classNameToClassInfo);
                            annotationClassInfo.addRelatedClass(RelType.CLASSES_WITH_METHOD_PARAMETER_ANNOTATION,
                                    this);
                            this.addRelatedClass(RelType.METHOD_PARAMETER_ANNOTATIONS, annotationClassInfo);
                        }
                    }
                }
            }
        }
        if (this.methodInfo == null) {
            this.methodInfo = methodInfoList;
        } else {
            this.methodInfo.addAll(methodInfoList);
        }
    }
/**
     * Add method info.
     *
     * @param methodInfoList
     *            the method info list
     * @param classNameToClassInfo
     *            the map from class name to class info
     */
Add method info.
@param methodInfoList
the method info list
@param classNameToClassInfo
the map from class name to class info
Add method info . @param methodInfoList the method info list @param classNameToClassInfo the map from class name to class info
void addMethodInfo(final MethodInfoList methodInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
        for (final MethodInfo mi : methodInfoList) {
            addFieldOrMethodAnnotationInfo(mi.annotationInfo, /* isField = */ false, classNameToClassInfo);
            if (mi.parameterAnnotationInfo != null) {
                for (int i = 0; i < mi.parameterAnnotationInfo.length; i++) {
                    final AnnotationInfo[] paramAnnotationInfoArr = mi.parameterAnnotationInfo[i];
                    if (paramAnnotationInfoArr != null) {
                        for (int j = 0; j < paramAnnotationInfoArr.length; j++) {
                            final AnnotationInfo methodParamAnnotationInfo = paramAnnotationInfoArr[j];
                            final ClassInfo annotationClassInfo = getOrCreateClassInfo(
                                    methodParamAnnotationInfo.getName(), ANNOTATION_CLASS_MODIFIER,
                                    classNameToClassInfo);
                            annotationClassInfo.addRelatedClass(RelType.CLASSES_WITH_METHOD_PARAMETER_ANNOTATION,
                                    this);
                            this.addRelatedClass(RelType.METHOD_PARAMETER_ANNOTATIONS, annotationClassInfo);
                        }
                    }
                }
            }
        }
        if (this.methodInfo == null) {
            this.methodInfo = methodInfoList;
        } else {
            this.methodInfo.addAll(methodInfoList);
        }
    }
void addMethodInfo ( final MethodInfoList methodInfoList , final Map < String , ClassInfo > classNameToClassInfo ) { for ( final MethodInfo mi : methodInfoList ) { addFieldOrMethodAnnotationInfo ( mi . annotationInfo , /* isField = */ false , classNameToClassInfo ) ; if ( mi . parameterAnnotationInfo != null ) { for ( int i = 0 ; i < mi . parameterAnnotationInfo . length ; i ++ ) { final AnnotationInfo [ ] paramAnnotationInfoArr = mi . parameterAnnotationInfo [ i ] ; if ( paramAnnotationInfoArr != null ) { for ( int j = 0 ; j < paramAnnotationInfoArr . length ; j ++ ) { final AnnotationInfo methodParamAnnotationInfo = paramAnnotationInfoArr [ j ] ; final ClassInfo annotationClassInfo = getOrCreateClassInfo ( methodParamAnnotationInfo . getName ( ) , ANNOTATION_CLASS_MODIFIER , classNameToClassInfo ) ; annotationClassInfo . addRelatedClass ( RelType . CLASSES_WITH_METHOD_PARAMETER_ANNOTATION , this ) ; this . addRelatedClass ( RelType . METHOD_PARAMETER_ANNOTATIONS , annotationClassInfo ) ; } } } } } if ( this . methodInfo == null ) { this . methodInfo = methodInfoList ; } else { this . methodInfo . addAll ( methodInfoList ) ; } }
Add method info.
Add method info .
// Index method annotations // Index method parameter annotations