The Tool: Shell (bash)
cd java/lang ls *.java | cut -d . -f 1 | xargs printf 'addType(new PObject(%s))\n'and we are done. Just copy/paste the output to your source file! All these years i use command-line environments, and they never cease to fill me with joy, when i fulfill simple, boring, repetitive tasks in few seconds.