class InfoList<T extends HasName> extends PotentiallyUnmodifiableList<T> {
    /** serialVersionUID. */
    static final long serialVersionUID = 1L;

    /**
     * Constructor.
     */
    InfoList() {
        super();
    }

    /**
     * Constructor.
     *
     * @param sizeHint
     *            the size hint
     */
    InfoList(final int sizeHint) {
        super(sizeHint);
    }

    /**
     * Constructor.
     *
     * @param infoCollection
     *            the initial elements.
     */
    InfoList(final Collection<T> infoCollection) {
        super(infoCollection);
    }

    // Keep Scrutinizer happy
    @Override
    public boolean equals(final Object o) {
        return super.equals(o);
    }

    // Keep Scrutinizer happy
    @Override
    public int hashCode() {
        return super.hashCode();
    }

    // -------------------------------------------------------------------------------------------------------------

    /**
     * Get the names of all items in this list, by calling {@code getName()} on each item in the list.
     *
     * @return The names of all items in this list, by calling {@code getName()} on each item in the list.
     */
    public List<String> getNames() {
        if (this.isEmpty()) {
            return Collections.emptyList();
        } else {
            final List<String> names = new ArrayList<>(this.size());
            for (final T i : this) {
                if (i != null) {
                    names.add(i.getName());
                }
            }
            return names;
        }
    }

    /**
     * Get the String representations of all items in this list, by calling {@code toString()} on each item in the
     * list.
     *
     * @return The String representations of all items in this list, by calling {@code toString()} on each item in
     *         the list.
     */
    public List<String> getAsStrings() {<FILL_FUNCTION_BODY>}

    /**
     * Get the String representations of all items in this list, using only <a href=
     * "https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lang/Class.html#getSimpleName()">simple
     * names</a> of any named classes, by calling {@code ScanResultObject#toStringWithSimpleNames()} if the object
     * is a subclass of {@code ScanResultObject} (e.g. {@link ClassInfo}, {@link MethodInfo} or {@link FieldInfo}
     * object), otherwise calling {@code toString()}, for each item in the list.
     *
     * @return The String representations of all items in this list, using only the <a href=
     *         "https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lang/Class.html#getSimpleName()">
     *         simple names</a> of any named classes.
     */
    public List<String> getAsStringsWithSimpleNames() {
        if (this.isEmpty()) {
            return Collections.emptyList();
        } else {
            final List<String> toStringVals = new ArrayList<>(this.size());
            for (final T i : this) {
                toStringVals.add(i == null ? "null"
                        : i instanceof ScanResultObject ? ((ScanResultObject) i).toStringWithSimpleNames()
                                : i.toString());
            }
            return toStringVals;
        }
    }
}

        if (this.isEmpty()) {
            return Collections.emptyList();
        } else {
            final List<String> toStringVals = new ArrayList<>(this.size());
            for (final T i : this) {
                toStringVals.add(i == null ? "null" : i.toString());
            }
            return toStringVals;
        }
    
<methods>public boolean add(T) ,public void add(int, T) ,public boolean addAll(Collection<? extends T>) ,public boolean addAll(int, Collection<? extends T>) ,public void clear() ,public boolean equals(java.lang.Object) ,public int hashCode() ,public Iterator<T> iterator() ,public ListIterator<T> listIterator() ,public boolean remove(java.lang.Object) ,public T remove(int) ,public boolean removeAll(Collection<?>) ,public boolean retainAll(Collection<?>) ,public T set(int, T) <variables>boolean modifiable,static final long serialVersionUID