use getDeclaredMethods to get methods of class