svoid tok_overridableFunctionDefs(LS tok, Set overriableFunctions_out) { int i; while ((i = jfind(tok, "static overridable ")) >= 0) { int bracket = indexOf(tok, "(", i); int codeStart = indexOf(tok, "{", bracket); S fName = assertIdentifier(tok.get(bracket-2)); S type = joinSubList(tok, i+4, bracket-3); S boxedType = tok_toNonPrimitiveTypes(type); S args = joinWithComma(map tok_lastIdentifier(tok_parseArgsDeclList(subList(tok, i)))); S castIt = eq(type, "Object") ? "" : "(\*type*/)"; replaceTokens(tok, i, bracket-1, "static Object _override_\*fName*/;\n" + "static \*type*/ \*fName*/"); tokAppend(tok, codeStart, " if (_override_\*fName*/ != null) return \*castIt*/ callF(_override_\*fName*/, \*args*/);\n"); reTok(tok, i, codeStart+1); addToCollection(overriableFunctions_out, fName); } }