Changed a java8 specific to fix the project not building.

As mentioned above the use of the java 8 getParameterCount() broke the project, getParametersTypes().length returns the same result and also fixes the project.