Skip to content

Refactor: Optimize nearestSuperClassMethod in Hilt AndroidEntryPoint processor#5170

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_916115441
May 15, 2026
Merged

Refactor: Optimize nearestSuperClassMethod in Hilt AndroidEntryPoint processor#5170
copybara-service[bot] merged 1 commit into
masterfrom
test_916115441

Conversation

@copybara-service
Copy link
Copy Markdown

Refactor: Optimize nearestSuperClassMethod in Hilt AndroidEntryPoint processor

The previous implementation used getAllMethods() and then filtered, which can be inefficient as getAllMethods() resolves all methods in the hierarchy. The new approach traverses up the superclass hierarchy, checking getDeclaredMethods() at each level, and returns as soon as the matching method is found. This is more efficient as it stops at the nearest override.

RELNOTES=N/A

…processor

The previous implementation used `getAllMethods()` and then filtered, which can be inefficient as `getAllMethods()` resolves all methods in the hierarchy. The new approach traverses up the superclass hierarchy, checking `getDeclaredMethods()` at each level, and returns as soon as the matching method is found. This is more efficient as it stops at the nearest override.

RELNOTES=N/A
PiperOrigin-RevId: 916183096
@copybara-service copybara-service Bot merged commit d0cadc9 into master May 15, 2026
@copybara-service copybara-service Bot deleted the test_916115441 branch May 15, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant