Adding the code to allow java function definitions

git-svn-id: http://madara.googlecode.com/svn/trunk@1254 2850746a-f1c8-11dd-b507-8b4ecd5210be