src/main/java/io/github/classgraph/ClassInfo.java
private void addFieldOrMethodAnnotationInfo(final AnnotationInfoList annotationInfoList, final boolean isField,
            final Map<String, ClassInfo> classNameToClassInfo) {
        if (annotationInfoList != null) {
            for (final AnnotationInfo fieldAnnotationInfo : annotationInfoList) {
                final ClassInfo annotationClassInfo = getOrCreateClassInfo(fieldAnnotationInfo.getName(),
                        ANNOTATION_CLASS_MODIFIER, classNameToClassInfo);
                // Mark this class as having a field or method with this annotation
                this.addRelatedClass(isField ? RelType.FIELD_ANNOTATIONS : RelType.METHOD_ANNOTATIONS,
                        annotationClassInfo);
                annotationClassInfo.addRelatedClass(
                        isField ? RelType.CLASSES_WITH_FIELD_ANNOTATION : RelType.CLASSES_WITH_METHOD_ANNOTATION,
                        this);
            }
        }
    }
/**
     * Add field or method annotation cross-links.
     *
     * @param annotationInfoList
     *            the annotation info list
     * @param isField
     *            the is field
     * @param classNameToClassInfo
     *            the map from class name to class info
     */
Add field or method annotation cross-links.
@param annotationInfoList
the annotation info list
@param isField
the is field
@param classNameToClassInfo
the map from class name to class info
Add field or method annotation cross - links . @param annotationInfoList the annotation info list @param isField the is field @param classNameToClassInfo the map from class name to class info
private void addFieldOrMethodAnnotationInfo(final AnnotationInfoList annotationInfoList, final boolean isField,
            final Map<String, ClassInfo> classNameToClassInfo) {
        if (annotationInfoList != null) {
            for (final AnnotationInfo fieldAnnotationInfo : annotationInfoList) {
                final ClassInfo annotationClassInfo = getOrCreateClassInfo(fieldAnnotationInfo.getName(),
                        ANNOTATION_CLASS_MODIFIER, classNameToClassInfo);
                this.addRelatedClass(isField ? RelType.FIELD_ANNOTATIONS : RelType.METHOD_ANNOTATIONS,
                        annotationClassInfo);
                annotationClassInfo.addRelatedClass(
                        isField ? RelType.CLASSES_WITH_FIELD_ANNOTATION : RelType.CLASSES_WITH_METHOD_ANNOTATION,
                        this);
            }
        }
    }
private void addFieldOrMethodAnnotationInfo ( final AnnotationInfoList annotationInfoList , final boolean isField , final Map < String , ClassInfo > classNameToClassInfo ) { if ( annotationInfoList != null ) { for ( final AnnotationInfo fieldAnnotationInfo : annotationInfoList ) { final ClassInfo annotationClassInfo = getOrCreateClassInfo ( fieldAnnotationInfo . getName ( ) , ANNOTATION_CLASS_MODIFIER , classNameToClassInfo ) ; this . addRelatedClass ( isField ? RelType . FIELD_ANNOTATIONS : RelType . METHOD_ANNOTATIONS , annotationClassInfo ) ; annotationClassInfo . addRelatedClass ( isField ? RelType . CLASSES_WITH_FIELD_ANNOTATION : RelType . CLASSES_WITH_METHOD_ANNOTATION , this ) ; } } }
Add field or method annotation cross-links.
Add field or method annotation cross - links .
// Mark this class as having a field or method with this annotation