final IErlImport erlImport, final boolean arityOnly) {
if (res instanceof OtpErlangList) {
final OtpErlangList resl = (OtpErlangList) res;
for (final OtpErlangObject i : resl) {
// {FunWithArity, FunWithParameters, [{Offset, Length}], Doc}
final OtpErlangTuple f = (OtpErlangTuple) i;
final String funWithArity = ((OtpErlangString) f.elementAt(0))
.stringValue();
if (!filterImported(erlImport, funWithArity)) {
continue;
}
String funWithParameters = arityOnly ? funWithArity
: ((OtpErlangString) f.elementAt(1)).stringValue();
final OtpErlangList parOffsets = (OtpErlangList) f.elementAt(2);
String docStr = null;
if (f.arity() > 3) {
final OtpErlangObject elt = f.elementAt(3);
if (elt instanceof OtpErlangString) {
docStr = HTMLPrinter.asHtml(Util.stringValue(elt));
}
}