class HierarchicalTypeSignature extends ScanResultObject {
    protected AnnotationInfoList typeAnnotationInfo;

    /**
     * Add a type annotation.
     *
     * @param annotationInfo
     *            the annotation
     */
    protected void addTypeAnnotation(final AnnotationInfo annotationInfo) {
        if (typeAnnotationInfo == null) {
            typeAnnotationInfo = new AnnotationInfoList(1);
        }
        typeAnnotationInfo.add(annotationInfo);
    }

    @Override
    void setScanResult(final ScanResult scanResult) {<FILL_FUNCTION_BODY>}

    /**
     * Get a list of {@link AnnotationInfo} objects for any type annotations on this type, or null if none.
     * 
     * @return a list of {@link AnnotationInfo} objects for any type annotations on this type, or null if none.
     */
    public AnnotationInfoList getTypeAnnotationInfo() {
        return typeAnnotationInfo;
    }

    /**
     * Add a type annotation.
     *
     * @param typePath
     *            the type path
     * @param annotationInfo
     *            the annotation
     */
    protected abstract void addTypeAnnotation(List<TypePathNode> typePath, AnnotationInfo annotationInfo);

    /**
     * Render type signature to string.
     *
     * @param useSimpleNames
     *            whether to use simple names for classes.
     * @param annotationsToExclude
     *            toplevel annotations to exclude, to eliminate duplication (toplevel annotations are both
     *            class/field/method annotations and type annotations).
     * @param buf
     *            the {@link StringBuilder} to write to.
     */
    protected abstract void toStringInternal(final boolean useSimpleNames, AnnotationInfoList annotationsToExclude,
            StringBuilder buf);

    /**
     * Render type signature to string.
     *
     * @param useSimpleNames
     *            whether to use simple names for classes.
     * @param buf
     *            the {@link StringBuilder} to write to.
     */
    @Override
    protected void toString(final boolean useSimpleNames, final StringBuilder buf) {
        toStringInternal(useSimpleNames, /* annotationsToExclude = */ null, buf);
    }
}

        super.setScanResult(scanResult);
        if (typeAnnotationInfo != null) {
            for (final AnnotationInfo annotationInfo : typeAnnotationInfo) {
                annotationInfo.setScanResult(scanResult);
            }
        }
    
<methods>public java.lang.String toString() ,public java.lang.String toStringWithSimpleNames() <variables>private transient io.github.classgraph.ClassInfo classInfo,protected transient Class<?> classRef,protected transient io.github.classgraph.ScanResult scanResult