Parsing source code at class declaration level instead of method declaration