How does gradle get all class names and method names in the current directory

How does gradle get all class names and method names in the current directory