fixing method.getParmeterCount() for non java 8